feat: 添加合同全量同步任务和合格供方名录路径生成功能
refactor: 重构查询服务使用ParamConstant替换ServiceConstant style: 清理无用代码和注释 fix: 修复CompanyCustomerEvaluationFormFileService查询方法 docs: 更新CloudYuVo和CompanyBankAccountVo字段注释
This commit is contained in:
1
.env
1
.env
@@ -0,0 +1 @@
|
||||
PLAYWRIGHT_MCP_EXTENSION_TOKEN=TB7T39NhEbruyS7L-E7RXIGYk39PVK7eu1h-WP8M1Cg
|
||||
@@ -195,7 +195,4 @@ Contract-Manager/
|
||||
2. 优化数据库查询性能
|
||||
3. 增强系统安全机制
|
||||
4. 改进用户界面体验
|
||||
5. 扩展更多云端服务集成
|
||||
|
||||
|
||||
|
||||
5. 扩展更多云端服务集成
|
||||
@@ -45,15 +45,33 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
||||
protected CompletableFuture<T> loadedFuture;
|
||||
private final ObservableList<TabSkin> tabSkins = FXCollections.observableArrayList();
|
||||
|
||||
|
||||
@Override
|
||||
public void onShown(WindowEvent windowEvent) {
|
||||
super.onShown(windowEvent);
|
||||
// 载数据
|
||||
initializeData();
|
||||
// 注册 skin
|
||||
registerTabSkins();
|
||||
// 初始化保存按钮
|
||||
initializeSaveBtn();
|
||||
// 安装 skin
|
||||
installTabSkins();
|
||||
}
|
||||
|
||||
protected void initializeSaveBtn() {
|
||||
if (saveBtn != null) {
|
||||
saveBtn.disableProperty().bind(createTabSkinChangedBindings().not());
|
||||
saveBtn.setOnAction(event -> saveTabSkins());
|
||||
}
|
||||
}
|
||||
|
||||
protected void initializeData() {
|
||||
ViewModelService<T, TV> service = getViewModelService();
|
||||
|
||||
if (service instanceof QueryService<T, TV> queryService) {
|
||||
setStatus("读取...");
|
||||
loadedFuture = queryService.asyncFindById(viewModel.getId().get());
|
||||
|
||||
} else {
|
||||
loadedFuture = CompletableFuture.supplyAsync(() -> {
|
||||
return getViewModelService().findById(viewModel.getId().get());
|
||||
@@ -72,14 +90,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
||||
handleException("载入失败,#" + viewModel.getId().get(), ex);
|
||||
return null;
|
||||
});
|
||||
|
||||
registerTabSkins();
|
||||
if (saveBtn != null) {
|
||||
saveBtn.disableProperty().bind(createTabSkinChangedBindings().not());
|
||||
saveBtn.setOnAction(event -> saveTabSkins());
|
||||
}
|
||||
|
||||
installTabSkins();
|
||||
}
|
||||
|
||||
protected void updateViewModel(T entity) {
|
||||
@@ -105,6 +115,19 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
||||
return saved;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
T entity = getEntity();
|
||||
if (entity == null) {
|
||||
return;
|
||||
}
|
||||
if (viewModel.copyTo(entity)) {
|
||||
save(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册 skin
|
||||
*/
|
||||
protected void registerTabSkins() {
|
||||
}
|
||||
|
||||
@@ -116,6 +139,9 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
||||
return f;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装 skin
|
||||
*/
|
||||
protected void installTabSkins() {
|
||||
for (TabSkin tabSkin : tabSkins) {
|
||||
try {
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.ecep.contract.controller.AbstEntityManagerSkin;
|
||||
import com.ecep.contract.controller.ManagerSkin;
|
||||
import com.ecep.contract.controller.company.CompanyWindowController;
|
||||
import com.ecep.contract.controller.table.cell.CompanyTableCell;
|
||||
import com.ecep.contract.controller.table.cell.LocalDateFieldTableCell;
|
||||
import com.ecep.contract.controller.table.cell.LocalDateTimeTableCell;
|
||||
import com.ecep.contract.service.CompanyService;
|
||||
import com.ecep.contract.service.YongYouU8Service;
|
||||
@@ -15,6 +16,7 @@ import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ContextMenu;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.control.cell.CheckBoxTableCell;
|
||||
|
||||
public class YongYouU8ManagerSkin
|
||||
extends
|
||||
@@ -36,10 +38,9 @@ public class YongYouU8ManagerSkin
|
||||
@Override
|
||||
public void initializeTable() {
|
||||
controller.idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
|
||||
controller.companyColumn.setCellFactory(param -> new CompanyTableCell<>(getCompanyService()));
|
||||
|
||||
controller.cloudIdColumn.setCellValueFactory(param -> param.getValue().getCloudId());
|
||||
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
|
||||
controller.companyColumn.setCellFactory( CompanyTableCell.forTableColumn(getCompanyService()));
|
||||
|
||||
controller.latestUpdateColumn.setCellValueFactory(param -> param.getValue().getLatestUpdate());
|
||||
controller.latestUpdateColumn.setCellFactory(param -> new LocalDateTimeTableCell<>());
|
||||
@@ -47,7 +48,14 @@ public class YongYouU8ManagerSkin
|
||||
controller.cloudLatestColumn.setCellValueFactory(param -> param.getValue().getCloudLatest());
|
||||
controller.cloudLatestColumn.setCellFactory(param -> new LocalDateTimeTableCell<>());
|
||||
|
||||
controller.descriptionColumn.setCellValueFactory(param -> param.getValue().getVendorCode());
|
||||
controller.cloudVendorUpdateDateColumn.setCellValueFactory(param -> param.getValue().getVendorUpdateDate());
|
||||
|
||||
controller.cloudCustomerUpdateDateColumn.setCellValueFactory(param -> param.getValue().getCustomerUpdateDate());
|
||||
|
||||
controller.activeColumn.setCellValueFactory(param -> param.getValue().getActive());
|
||||
controller.activeColumn.setCellFactory(CheckBoxTableCell.forTableColumn(controller.activeColumn));
|
||||
|
||||
controller.descriptionColumn.setCellValueFactory(param -> param.getValue().getExceptionMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,7 +81,7 @@ public class YongYouU8ManagerSkin
|
||||
}
|
||||
for (CloudYuInfoViewModel selectedItem : selectedItems) {
|
||||
CloudYuVo yongYouU8Vo = getU8Service().findById(selectedItem.getId().get());
|
||||
selectedItem.getCustomerCode().set("");
|
||||
selectedItem.getExceptionMessage().set("");
|
||||
if (selectedItem.copyTo(yongYouU8Vo)) {
|
||||
CloudYuVo saved = getU8Service().save(yongYouU8Vo);
|
||||
selectedItem.update(saved);
|
||||
|
||||
@@ -37,8 +37,10 @@ public class YongYouU8ManagerWindowController
|
||||
public TableColumn<CloudYuInfoViewModel, Number> idColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, LocalDateTime> latestUpdateColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, Integer> companyColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, String> cloudIdColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, LocalDateTime> cloudLatestColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, java.time.LocalDate> cloudVendorUpdateDateColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, java.time.LocalDate> cloudCustomerUpdateDateColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, Boolean> activeColumn;
|
||||
public TableColumn<CloudYuInfoViewModel, String> descriptionColumn;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.ecep.contract.controller.tab.TabSkin;
|
||||
import com.ecep.contract.controller.table.EditableEntityTableTabSkin;
|
||||
import com.ecep.contract.controller.table.cell.ContractFileTypeTableCell;
|
||||
import com.ecep.contract.controller.table.cell.LocalDateFieldTableCell;
|
||||
import com.ecep.contract.model.ContractFileTypeLocal;
|
||||
import com.ecep.contract.service.ContractFileService;
|
||||
import com.ecep.contract.service.ContractFileTypeService;
|
||||
import com.ecep.contract.util.FxmlPath;
|
||||
@@ -22,7 +21,6 @@ import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.TextFieldTableCell;
|
||||
import javafx.stage.WindowEvent;
|
||||
import javafx.util.StringConverter;
|
||||
import lombok.Setter;
|
||||
import org.apache.pdfbox.Loader;
|
||||
import org.apache.pdfbox.io.IOUtils;
|
||||
@@ -95,21 +93,6 @@ public class ContractTabSkinFiles
|
||||
return controller.fileTab;
|
||||
}
|
||||
|
||||
static class ContractFileTypeLocalStringConverter extends StringConverter<ContractFileTypeLocal> {
|
||||
@Override
|
||||
public String toString(ContractFileTypeLocal local) {
|
||||
if (local == null) {
|
||||
return "-";
|
||||
}
|
||||
return local.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractFileTypeLocal fromString(String string) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeTab() {
|
||||
TableView<ContractFileViewModel> table = getTableView();
|
||||
@@ -135,6 +118,7 @@ public class ContractTabSkinFiles
|
||||
.setCellFactory(ContractFileTypeTableCell.forTableColumn(getCachedBean(ContractFileTypeService.class)));
|
||||
fileTable_typeColumn.setEditable(false);
|
||||
|
||||
|
||||
/* 文件名编辑器 */
|
||||
fileTable_filePathColumn.setCellValueFactory(param -> param.getValue().getFileName());
|
||||
fileTable_filePathColumn.setCellFactory(TextFieldTableCell.forTableColumn());
|
||||
@@ -194,6 +178,34 @@ public class ContractTabSkinFiles
|
||||
createVendorContractRequestByTemplateUpdateMenuItem(),
|
||||
createVendorContractApplyByTemplateUpdateMenuItem());
|
||||
|
||||
|
||||
runAsync(() -> {
|
||||
getCachedBean(ContractFileTypeService.class).findAll(getLocale()).forEach((k, v) -> {
|
||||
if (isCustomer && !k.isSupportCustomer()) {
|
||||
return;
|
||||
}
|
||||
if (isVendor && !k.isSupportVendor()) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
MenuItem item = new MenuItem();
|
||||
item.setText(v.getValue());
|
||||
item.getProperties().put("typeLocal", v);
|
||||
item.setOnAction(this::onFileTableContextMenuChangeTypeAndNameAction);
|
||||
fileTable_menu_change_type.getItems().add(item);
|
||||
}
|
||||
if (StringUtils.hasText(v.getSuggestFileName())) {
|
||||
MenuItem item = new MenuItem();
|
||||
item.setText(v.getValue());
|
||||
item.getProperties().put("typeLocal", v);
|
||||
item.getProperties().put("rename", true);
|
||||
item.setOnAction(this::onFileTableContextMenuChangeTypeAndNameAction);
|
||||
fileTable_menu_change_type_and_name.getItems().add(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
super.initializeTab();
|
||||
}
|
||||
|
||||
@@ -541,13 +553,13 @@ public class ContractTabSkinFiles
|
||||
//
|
||||
fileTable_menu_change_type.setVisible(true);
|
||||
for (MenuItem item : fileTable_menu_change_type.getItems()) {
|
||||
ContractFileTypeLocal typeLocal = (ContractFileTypeLocal) item.getProperties().get("typeLocal");
|
||||
ContractFileTypeLocalVo typeLocal = (ContractFileTypeLocalVo) item.getProperties().get("typeLocal");
|
||||
item.setVisible(typeLocal.getType() != selectedItem.getType().get());
|
||||
}
|
||||
|
||||
fileTable_menu_change_type_and_name.setVisible(true);
|
||||
for (MenuItem item : fileTable_menu_change_type.getItems()) {
|
||||
ContractFileTypeLocal typeLocal = (ContractFileTypeLocal) item.getProperties().get("typeLocal");
|
||||
ContractFileTypeLocalVo typeLocal = (ContractFileTypeLocalVo) item.getProperties().get("typeLocal");
|
||||
item.setVisible(typeLocal.getType() != selectedItem.getType().get());
|
||||
}
|
||||
|
||||
@@ -560,7 +572,7 @@ public class ContractTabSkinFiles
|
||||
if (selectedItems == null || selectedItems.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
ContractFileTypeLocal typeLocal = (ContractFileTypeLocal) item.getProperties().get("typeLocal");
|
||||
ContractFileTypeLocalVo typeLocal = (ContractFileTypeLocalVo) item.getProperties().get("typeLocal");
|
||||
if (typeLocal == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
package com.ecep.contract.controller.customer;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.ecep.contract.controller.AbstEntityController;
|
||||
import com.ecep.contract.controller.tab.TabSkin;
|
||||
import com.ecep.contract.service.CompanyCustomerFileTypeService;
|
||||
import com.ecep.contract.service.ViewModelService;
|
||||
import com.ecep.contract.util.FxmlPath;
|
||||
import com.ecep.contract.vo.CustomerFileTypeLocalVo;
|
||||
import javafx.beans.binding.BooleanBinding;
|
||||
import javafx.beans.property.*;
|
||||
import javafx.scene.input.MouseButton;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.text.FontWeight;
|
||||
import javafx.util.converter.LocalDateStringConverter;
|
||||
import org.apache.pdfbox.Loader;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
@@ -18,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.controller.BaseController;
|
||||
@@ -32,11 +45,9 @@ import com.ecep.contract.vm.CustomerFileViewModel;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.geometry.Bounds;
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.DatePicker;
|
||||
import javafx.scene.control.Label;
|
||||
@@ -58,8 +69,16 @@ import javafx.stage.WindowEvent;
|
||||
@Scope("prototype")
|
||||
@Component
|
||||
@FxmlPath("/ui/company/customer/customer_evaluation_form.fxml")
|
||||
public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntityController<CompanyCustomerEvaluationFormFileVo, CompanyCustomerEvaluationFormFileViewModel> {
|
||||
private static final Logger logger = LoggerFactory.getLogger(CompanyCustomerEvaluationFormFileWindowController.class);
|
||||
public class CompanyCustomerEvaluationFormFileWindowController
|
||||
extends AbstEntityController<CompanyCustomerEvaluationFormFileVo, CompanyCustomerEvaluationFormFileViewModel> {
|
||||
private static final Logger logger = LoggerFactory
|
||||
.getLogger(CompanyCustomerEvaluationFormFileWindowController.class);
|
||||
|
||||
public static void show(CustomerFileViewModel item, Window window) {
|
||||
show(CompanyCustomerEvaluationFormFileWindowController.class, window, controller -> {
|
||||
controller.fileViewModel = item;
|
||||
});
|
||||
}
|
||||
|
||||
public static void show(CompanyCustomerEvaluationFormFileVo saved, Window window) {
|
||||
show(CompanyCustomerEvaluationFormFileViewModel.from(saved), window);
|
||||
@@ -69,7 +88,6 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
show(CompanyCustomerEvaluationFormFileWindowController.class, viewModel, window);
|
||||
}
|
||||
|
||||
|
||||
public Label idField;
|
||||
public TextField filePathField;
|
||||
public CheckBox validField;
|
||||
@@ -88,67 +106,66 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
public ScrollPane leftPane;
|
||||
public Label totalCreditScoreLabel;
|
||||
|
||||
private final SimpleStringProperty catalogProperty = new SimpleStringProperty("");
|
||||
private final SimpleStringProperty levelProperty = new SimpleStringProperty("");
|
||||
private final SimpleIntegerProperty score1Property = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty score2Property = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty score3Property = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty score4Property = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty score5Property = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty creditLevelProperty = new SimpleIntegerProperty(-1);
|
||||
private final SimpleIntegerProperty totalCreditScoreProperty = new SimpleIntegerProperty(-1);
|
||||
|
||||
private SimpleObjectProperty<Image> imageProperty = new SimpleObjectProperty<>();
|
||||
private CustomerFileViewModel fileViewModel;
|
||||
|
||||
private SimpleStringProperty filePathProperty = new SimpleStringProperty();
|
||||
private SimpleStringProperty editFilePathProperty = new SimpleStringProperty();
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private CompanyCustomerFileService companyCustomerFileService;
|
||||
private SimpleBooleanProperty changed = new SimpleBooleanProperty(false);
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
private CompanyCustomerEvaluationFormFileService evaluationFormFileService;
|
||||
|
||||
|
||||
@Override
|
||||
public void show(Stage stage) {
|
||||
super.show(stage);
|
||||
stage.setFullScreen(false);
|
||||
// Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds();
|
||||
//
|
||||
// stage.setX(screenBounds.getMinX());
|
||||
// stage.setY(screenBounds.getMinY());
|
||||
// stage.setWidth(screenBounds.getWidth());
|
||||
// stage.setHeight(screenBounds.getHeight());
|
||||
//
|
||||
// stage.isMaximized();
|
||||
stage.setMaximized(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShown(WindowEvent windowEvent) {
|
||||
super.onShown(windowEvent);
|
||||
getTitle().set("客户评估表单");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void registerTabSkins() {
|
||||
initializePane();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateViewModel(CompanyCustomerEvaluationFormFileVo entity) {
|
||||
super.updateViewModel(entity);
|
||||
CustomerFileVo file = companyCustomerFileService.findById(entity.getCustomerFile());
|
||||
Platform.runLater(() -> {
|
||||
filePathProperty.set(file.getFilePath());
|
||||
editFilePathProperty.set(file.getEditFilePath());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewModelService<CompanyCustomerEvaluationFormFileVo, CompanyCustomerEvaluationFormFileViewModel> getViewModelService() {
|
||||
return evaluationFormFileService;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeData() {
|
||||
CompanyCustomerEvaluationFormFileViewModel viewModel = new CompanyCustomerEvaluationFormFileViewModel();
|
||||
setViewModel(viewModel);
|
||||
runAsync(() -> {
|
||||
CompanyCustomerEvaluationFormFileVo item = getCachedBean(CompanyCustomerEvaluationFormFileService.class)
|
||||
.findByCustomerFile(fileViewModel.getId().get());
|
||||
viewModel.getId().set(item.getId());
|
||||
updateViewModel(item);
|
||||
super.initializeData();
|
||||
Platform.runLater(this::initializePane);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateViewModel(CompanyCustomerEvaluationFormFileVo entity) {
|
||||
super.updateViewModel(entity);
|
||||
changed.set(false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BooleanBinding createTabSkinChangedBindings() {
|
||||
return viewModel.getChanged().or(fileViewModel.getChanged()).or(changed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveTabSkins() {
|
||||
save();
|
||||
changed.setValue(false);
|
||||
}
|
||||
|
||||
BiConsumer<ToggleGroup, String> stringRadioGroupUpdater = (group, newValue) -> {
|
||||
if (newValue != null) {
|
||||
for (Toggle toggle : group.getToggles()) {
|
||||
@@ -164,14 +181,15 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
return;
|
||||
}
|
||||
}
|
||||
changed.set(true);
|
||||
}
|
||||
Platform.runLater(() -> {
|
||||
group.selectToggle(null);
|
||||
// Toggle first = group.getToggles().getFirst();
|
||||
// first.setSelected(true);
|
||||
// first.setSelected(false);
|
||||
// RadioButton btn = (RadioButton) first;
|
||||
// btn.setText(newValue);
|
||||
// Toggle first = group.getToggles().getFirst();
|
||||
// first.setSelected(true);
|
||||
// first.setSelected(false);
|
||||
// RadioButton btn = (RadioButton) first;
|
||||
// btn.setText(newValue);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -182,9 +200,11 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
}
|
||||
String data = (String) toggle.getUserData();
|
||||
property.set(data);
|
||||
changed.set(true);
|
||||
};
|
||||
|
||||
BiConsumer<ToggleGroup, Number> numberRadioGroupUpdater = (group, newValue) -> {
|
||||
System.out.println("group = " + group + ", newValue = " + newValue);
|
||||
String value = String.valueOf(newValue);
|
||||
for (Toggle toggle : group.getToggles()) {
|
||||
String data = (String) toggle.getUserData();
|
||||
@@ -195,12 +215,13 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
}
|
||||
Platform.runLater(() -> {
|
||||
group.selectToggle(null);
|
||||
// Toggle first = group.getToggles().getFirst();
|
||||
// first.setSelected(true);
|
||||
// first.setSelected(false);
|
||||
// RadioButton btn = (RadioButton) first;
|
||||
// btn.setText(String.valueOf(newValue));
|
||||
// Toggle first = group.getToggles().getFirst();
|
||||
// first.setSelected(true);
|
||||
// first.setSelected(false);
|
||||
// RadioButton btn = (RadioButton) first;
|
||||
// btn.setText(String.valueOf(newValue));
|
||||
});
|
||||
changed.set(true);
|
||||
};
|
||||
|
||||
BiConsumer<SimpleIntegerProperty, Toggle> numberPropertyUpdater = (property, toggle) -> {
|
||||
@@ -210,9 +231,9 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
}
|
||||
String data = (String) toggle.getUserData();
|
||||
property.set(Integer.parseInt(data));
|
||||
changed.set(true);
|
||||
};
|
||||
|
||||
|
||||
int totalScoreToLevel(int score) {
|
||||
if (score >= 200) {
|
||||
return 4;
|
||||
@@ -227,63 +248,73 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
}
|
||||
|
||||
boolean calcValid() {
|
||||
if (creditLevelProperty.get() <= 0) {
|
||||
if (viewModel.getCreditLevel().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (!StringUtils.hasText(catalogProperty.get())) {
|
||||
if (!StringUtils.hasText(viewModel.getCatalog().get())) {
|
||||
return false;
|
||||
}
|
||||
if (!StringUtils.hasText(levelProperty.get())) {
|
||||
if (!StringUtils.hasText(viewModel.getLevel().get())) {
|
||||
return false;
|
||||
}
|
||||
if (score1Property.get() <= 0) {
|
||||
|
||||
if (viewModel.getScore1().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (score2Property.get() <= 0) {
|
||||
if (viewModel.getScore2().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (score3Property.get() <= 0) {
|
||||
if (viewModel.getScore3().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (score4Property.get() <= 0) {
|
||||
if (viewModel.getScore4().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (score5Property.get() <= 0) {
|
||||
if (viewModel.getScore5().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (creditLevelProperty.get() <= 0) {
|
||||
if (viewModel.getCreditLevel().get() <= 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void initializePane() {
|
||||
setStatus("");
|
||||
idField.textProperty().bind(viewModel.getId().asString());
|
||||
filePathField.textProperty().bind(filePathProperty);
|
||||
editFilePathField.textProperty().bind(editFilePathProperty);
|
||||
// signDateField.valueProperty().bindBidirectional(viewModel.getSignDate());
|
||||
// validField.selectedProperty().bindBidirectional(viewModel.getValid());
|
||||
|
||||
initializeRadioGroup(catalog, catalogProperty);
|
||||
initializeRadioGroup(level, levelProperty);
|
||||
|
||||
initializeRadioGroup(score1, score1Property);
|
||||
initializeRadioGroup(score2, score2Property);
|
||||
initializeRadioGroup(score3, score3Property);
|
||||
initializeRadioGroup(score4, score4Property);
|
||||
initializeRadioGroup(score5, score5Property);
|
||||
|
||||
creditLevelProperty.addListener((observable, oldValue, newValue) -> {
|
||||
numberRadioGroupUpdater.accept(creditLevel, newValue);
|
||||
filePathField.textProperty().bind(fileViewModel.getFilePath());
|
||||
editFilePathField.textProperty().bind(fileViewModel.getEditFilePath());
|
||||
String pattern = "yyyy-MM-dd";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
||||
signDateField.setConverter(new LocalDateStringConverter(formatter, null));
|
||||
signDateField.valueProperty().bindBidirectional(fileViewModel.getSignDate());
|
||||
signDateField.valueProperty().addListener((observable, oldValue, newValue) -> {
|
||||
changed.set(true);
|
||||
});
|
||||
|
||||
SimpleIntegerProperty[] scores = new SimpleIntegerProperty[]{score1Property, score2Property, score3Property, score4Property, score5Property};
|
||||
initializeRadioGroup(catalog, viewModel.getCatalog());
|
||||
initializeRadioGroup(level, viewModel.getLevel());
|
||||
|
||||
initializeRadioGroup(score1, viewModel.getScore1());
|
||||
initializeRadioGroup(score2, viewModel.getScore2());
|
||||
initializeRadioGroup(score3, viewModel.getScore3());
|
||||
initializeRadioGroup(score4, viewModel.getScore4());
|
||||
initializeRadioGroup(score5, viewModel.getScore5());
|
||||
|
||||
// 信用等级
|
||||
viewModel.getCreditLevel().addListener((observable, oldValue, newValue) -> {
|
||||
numberRadioGroupUpdater.accept(creditLevel, newValue);
|
||||
});
|
||||
numberRadioGroupUpdater.accept(creditLevel, viewModel.getCreditLevel().get());
|
||||
|
||||
SimpleIntegerProperty[] scores = new SimpleIntegerProperty[]{viewModel.getScore1(), viewModel.getScore2(),
|
||||
viewModel.getScore3(), viewModel.getScore4(), viewModel.getScore5()};
|
||||
totalCreditScoreProperty.bind(Bindings.createIntegerBinding(() -> {
|
||||
int total = 0;
|
||||
for (SimpleIntegerProperty score : scores) {
|
||||
total += score.get();
|
||||
}
|
||||
creditLevelProperty.set(totalScoreToLevel(total));
|
||||
viewModel.getCreditLevel().set(totalScoreToLevel(total));
|
||||
return total;
|
||||
}, scores));
|
||||
|
||||
@@ -291,70 +322,205 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
return "合计总分:" + score;
|
||||
}));
|
||||
|
||||
Bindings.createBooleanBinding(() -> {
|
||||
boolean valid = calcValid();
|
||||
// viewModel.getValid().set(valid);
|
||||
return valid;
|
||||
}, catalogProperty, levelProperty, score1Property, score2Property, score3Property, score4Property, score5Property, creditLevelProperty).addListener(((observable, oldValue, newValue) -> {
|
||||
logger.info("valid:{}", newValue);
|
||||
}));
|
||||
Bindings.createBooleanBinding(this::calcValid, viewModel.getCatalog(), viewModel.getLevel(),
|
||||
viewModel.getScore1(), viewModel.getScore2(), viewModel.getScore3(), viewModel.getScore4(),
|
||||
viewModel.getScore5(), viewModel.getCreditLevel())
|
||||
.addListener((observable, oldValue, newValue) -> {
|
||||
fileViewModel.getValid().set(newValue);
|
||||
changed.set(true);
|
||||
});
|
||||
validField.selectedProperty().bindBidirectional(fileViewModel.getValid());
|
||||
validField.setSelected(fileViewModel.getValid().getValue());
|
||||
|
||||
|
||||
imageView.imageProperty().bind(filePathProperty.map(path -> {
|
||||
if (FileUtils.withExtensions(path, FileUtils.PDF)) {
|
||||
File pdfFile = new File(path);
|
||||
try (PDDocument pdDocument = Loader.loadPDF(pdfFile)) {
|
||||
PDFRenderer pdfRenderer = new PDFRenderer(pdDocument);
|
||||
BufferedImage bufferedImage = pdfRenderer.renderImageWithDPI(0, 300);
|
||||
|
||||
// 获取 BufferedImage 的宽度和高度
|
||||
int width = bufferedImage.getWidth();
|
||||
int height = bufferedImage.getHeight();
|
||||
WritableImage writableImage = new WritableImage(width, height);
|
||||
PixelWriter pixelWriter = writableImage.getPixelWriter();
|
||||
// 将 BufferedImage 的像素数据复制到 WritableImage
|
||||
for (int y = 0; y < height; y++) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
int argb = bufferedImage.getRGB(x, y);
|
||||
pixelWriter.setArgb(x, y, argb);
|
||||
}
|
||||
}
|
||||
return writableImage;
|
||||
} catch (Exception e) {
|
||||
setStatus(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
File file = new File(path);
|
||||
Image image = new Image(file.toURI().toString());
|
||||
return image;
|
||||
}
|
||||
}));
|
||||
fileViewModel.getFilePath().addListener((observable, oldValue, newValue) -> {
|
||||
File file = new File(newValue);
|
||||
loadFile(file);
|
||||
});
|
||||
if (StringUtils.hasText(fileViewModel.getFilePath().get())) {
|
||||
loadFile(new File(fileViewModel.getFilePath().get()));
|
||||
}
|
||||
|
||||
|
||||
leftPane.widthProperty().addListener((observable, oldValue, newValue) -> {
|
||||
Platform.runLater(() -> {
|
||||
imageView.setFitWidth(leftPane.getWidth());
|
||||
imageView.setFitHeight(leftPane.getHeight());
|
||||
imageView.setFitHeight(-1);
|
||||
});
|
||||
});
|
||||
|
||||
imageView.setFitWidth(leftPane.getWidth());
|
||||
imageView.setFitHeight(leftPane.getHeight());
|
||||
imageView.setFitHeight(-1);
|
||||
|
||||
imageView.setOnScroll(event -> {
|
||||
System.out.println("event = " + event);
|
||||
System.out.println("event.getDeltaY() = " + event.getDeltaY());
|
||||
Bounds bounds = imageView.getBoundsInLocal();
|
||||
// Bounds latestBounds = (Bounds) imageView.getProperties().get("latestBounds");
|
||||
// if (latestBounds != null) {
|
||||
// double latestBoundsWidth = latestBounds.getWidth();
|
||||
// }
|
||||
// if (bounds.getWidth() < leftPane.getWidth()) {
|
||||
imageView.setFitWidth(bounds.getWidth() + event.getDeltaY());
|
||||
// } else {
|
||||
imageView.setFitHeight(bounds.getHeight() + event.getDeltaY());
|
||||
// }
|
||||
imageView.setFitHeight(-1);
|
||||
event.consume();
|
||||
});
|
||||
|
||||
imageView.setOnMouseClicked(event -> {
|
||||
System.out.println("imageView.getFitWidth() = " + imageView.getFitWidth());
|
||||
System.out.println("imageView.getFitHeight() = " + imageView.getFitHeight());
|
||||
|
||||
System.out.println("leftPane.getWidth() = " + leftPane.getWidth());
|
||||
System.out.println("leftPane.getViewportBounds().getWidth() = " + leftPane.getViewportBounds().getWidth());
|
||||
|
||||
if (event.getClickCount() == 2 && event.getButton() == MouseButton.PRIMARY) {
|
||||
Image image = imageView.getImage();
|
||||
if (image != null) {
|
||||
System.out.println("image.getWidth() = " + image.getWidth());
|
||||
if (image.getWidth() > imageView.getFitWidth()) {
|
||||
imageView.setFitWidth(image.getWidth());
|
||||
} else {
|
||||
imageView.setFitWidth(leftPane.getWidth());
|
||||
}
|
||||
imageView.setFitHeight(-1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadFile(File file) {
|
||||
setStatus("文件" + file.getAbsolutePath() + " 加载中...");
|
||||
if (FileUtils.withExtensions(file.getName(), FileUtils.PDF)) {
|
||||
loadPdf(file);
|
||||
return;
|
||||
}
|
||||
Image image = new Image(file.toURI().toString(), true);
|
||||
imageView.setImage(image);
|
||||
}
|
||||
|
||||
private void loadPdf(File pdfFile) {
|
||||
// 绘制文字, 等待加载
|
||||
// 创建画布并绘制备用占位文字
|
||||
javafx.scene.canvas.Canvas canvas = new javafx.scene.canvas.Canvas(leftPane.getWidth(), leftPane.getHeight());
|
||||
GraphicsContext gc = canvas.getGraphicsContext2D();
|
||||
gc.setFill(javafx.scene.paint.Color.RED);
|
||||
var h1 = javafx.scene.text.Font.font("Microsoft YaHei", FontWeight.BOLD, 24);
|
||||
var h2 = javafx.scene.text.Font.font("Microsoft YaHei", FontWeight.NORMAL, 18);
|
||||
gc.setFont(h1);
|
||||
gc.fillText(fileViewModel.getType().get().name(), 50, 100);
|
||||
|
||||
Runnable updateImage = () -> {
|
||||
WritableImage writableImage = new WritableImage((int) canvas.getWidth(), (int) canvas.getHeight());
|
||||
// 将画布内容转为图像
|
||||
Platform.runLater(() -> {
|
||||
canvas.snapshot(null, writableImage);
|
||||
imageView.setImage(writableImage);
|
||||
});
|
||||
};
|
||||
|
||||
runAsync(() -> {
|
||||
CustomerFileTypeLocalVo localVo = getCachedBean(CompanyCustomerFileTypeService.class).findByLocaleAndType(getLocale(), fileViewModel.getType().get());
|
||||
gc.setFill(Color.WHITE);
|
||||
// 覆盖 fileViewModel.getType() 文字
|
||||
gc.fillRect(0, 55, canvas.getWidth(), 55);
|
||||
|
||||
// 绘制 文件类型
|
||||
gc.setFill(javafx.scene.paint.Color.RED);
|
||||
gc.setFont(h1);
|
||||
gc.fillText(localVo.getValue(), 50, 100);
|
||||
|
||||
updateImage.run();
|
||||
});
|
||||
|
||||
gc.setStroke(javafx.scene.paint.Color.BLACK);
|
||||
gc.setFont(h2);
|
||||
gc.strokeText("正在加载文件..." + pdfFile.getName(), 50, 150);
|
||||
updateImage.run();
|
||||
|
||||
runAsync(() -> {
|
||||
|
||||
//FileSystemUtils.
|
||||
long fileSize = pdfFile.length();
|
||||
byte[] bytes = new byte[0];
|
||||
try (java.io.FileInputStream fis = new java.io.FileInputStream(pdfFile);
|
||||
java.io.BufferedInputStream bis = new java.io.BufferedInputStream(fis)) {
|
||||
|
||||
bytes = new byte[(int) fileSize];
|
||||
int totalBytesRead = 0;
|
||||
int bytesRead;
|
||||
byte[] buffer = new byte[8192]; // 8KB buffer
|
||||
|
||||
while ((bytesRead = bis.read(buffer)) != -1) {
|
||||
System.arraycopy(buffer, 0, bytes, totalBytesRead, bytesRead);
|
||||
totalBytesRead += bytesRead;
|
||||
|
||||
// 更新进度
|
||||
double progress = (double) totalBytesRead / fileSize * 100;
|
||||
final String status = String.format("正在加载文件... %s (%.1f%%)",
|
||||
pdfFile.getName(), progress);
|
||||
|
||||
gc.setFill(Color.WHITE);
|
||||
gc.fillRect(0, 200, canvas.getWidth(), 80);
|
||||
|
||||
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.setFont(h2);
|
||||
gc.fillText(status, 50, 250);
|
||||
|
||||
|
||||
// 绘制进度条背景
|
||||
gc.setFill(Color.LIGHTGRAY);
|
||||
gc.fillRect(50, 270, 400, 20);
|
||||
|
||||
// 绘制进度条
|
||||
gc.setFill(Color.GREEN);
|
||||
gc.fillRect(50, 270, 400 * (totalBytesRead / (double) fileSize), 20);
|
||||
|
||||
// 绘制进度条边框
|
||||
gc.setStroke(Color.BLACK);
|
||||
gc.setLineWidth(1);
|
||||
gc.strokeRect(50, 270, 400, 20);
|
||||
|
||||
|
||||
updateImage.run();
|
||||
}
|
||||
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.setFont(h2);
|
||||
gc.fillText("Loading file: " + pdfFile.getName() + ", size: " + bytes.length + " bytes", 50, 320);
|
||||
updateImage.run();
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
try (PDDocument pdDocument = Loader.loadPDF(bytes)) {
|
||||
gc.setFill(Color.BLACK);
|
||||
gc.setFont(h2);
|
||||
gc.fillText("PDF has " + pdDocument.getNumberOfPages() + " pages", 50, 380);
|
||||
updateImage.run();
|
||||
|
||||
PDFRenderer pdfRenderer = new PDFRenderer(pdDocument);
|
||||
|
||||
BufferedImage bufferedImage = pdfRenderer.renderImageWithDPI(0, 300);
|
||||
|
||||
// 获取 BufferedImage 的宽度和高度
|
||||
int width = bufferedImage.getWidth();
|
||||
int height = bufferedImage.getHeight();
|
||||
canvas.resize(width, height);
|
||||
GraphicsContext graphic = canvas.getGraphicsContext2D();
|
||||
|
||||
WritableImage writableImage1 = new WritableImage(width, height);
|
||||
|
||||
PixelWriter pixelWriter = writableImage1.getPixelWriter();
|
||||
// 将 BufferedImage 的像素数据复制到 WritableImage
|
||||
for (int y = 0; y < height; y++) {
|
||||
for (int x = 0; x < width; x++) {
|
||||
int argb = bufferedImage.getRGB(x, y);
|
||||
pixelWriter.setArgb(x, y, argb);
|
||||
}
|
||||
}
|
||||
setStatus();
|
||||
Platform.runLater(() -> {
|
||||
imageView.setImage(writableImage1);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
setStatus(e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -365,6 +531,7 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
toggleGroup.selectedToggleProperty().addListener((observable, oldValue, newValue) -> {
|
||||
stringPropertyUpdater.accept(property, newValue);
|
||||
});
|
||||
stringRadioGroupUpdater.accept(toggleGroup, property.getValue());
|
||||
}
|
||||
|
||||
private void initializeRadioGroup(ToggleGroup toggleGroup, SimpleIntegerProperty property) {
|
||||
@@ -375,21 +542,8 @@ public class CompanyCustomerEvaluationFormFileWindowController extends AbstEntit
|
||||
toggleGroup.selectedToggleProperty().addListener((observable, oldValue, newValue) -> {
|
||||
numberPropertyUpdater.accept(property, newValue);
|
||||
});
|
||||
numberRadioGroupUpdater.accept(toggleGroup, property.getValue());
|
||||
}
|
||||
|
||||
private void update(CompanyCustomerEvaluationFormFileVo formFile) {
|
||||
|
||||
viewModel.update(formFile);
|
||||
|
||||
// formFile.getScoreTemplateVersion();
|
||||
|
||||
catalogProperty.set(formFile.getCatalog());
|
||||
levelProperty.set(formFile.getLevel());
|
||||
score1Property.set(formFile.getScore1());
|
||||
score2Property.set(formFile.getScore2());
|
||||
score3Property.set(formFile.getScore3());
|
||||
score4Property.set(formFile.getScore4());
|
||||
score5Property.set(formFile.getScore5());
|
||||
creditLevelProperty.set(formFile.getCreditLevel());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,9 +161,7 @@ public class CustomerTabSkinFile
|
||||
// 文件不是 Excel 文件时,打开编辑UI
|
||||
if (!FileUtils.withExtensions(item.getFilePath().get(), FileUtils.XLS,
|
||||
FileUtils.XLSX)) {
|
||||
CompanyCustomerEvaluationFormFileVo evaluationFormFile = getEvaluationFormFileService()
|
||||
.findByCustomerFile(item.getId().get());
|
||||
CompanyCustomerEvaluationFormFileWindowController.show(evaluationFormFile,
|
||||
CompanyCustomerEvaluationFormFileWindowController.show(item,
|
||||
controller.root.getScene().getWindow());
|
||||
return;
|
||||
}
|
||||
@@ -211,10 +209,7 @@ public class CustomerTabSkinFile
|
||||
model.update(saved);
|
||||
dataSet.add(model);
|
||||
|
||||
CompanyCustomerEvaluationFormFileVo evaluationFormFile = getCachedBean(
|
||||
CompanyCustomerEvaluationFormFileService.class).findByCustomerFile(saved);
|
||||
|
||||
CompanyCustomerEvaluationFormFileWindowController.show(evaluationFormFile,
|
||||
CompanyCustomerEvaluationFormFileWindowController.show(model,
|
||||
getTableView().getScene().getWindow());
|
||||
});
|
||||
return;
|
||||
|
||||
@@ -69,11 +69,6 @@ public class CompanyTabSkinBankAccount
|
||||
bankAccountTable_openingBankColumn.setCellValueFactory(param -> param.getValue().getOpeningBank());
|
||||
bankAccountTable_accountColumn.setCellValueFactory(param -> param.getValue().getAccount());
|
||||
|
||||
|
||||
bankAccountTable_menu_refresh.setOnAction(this::onTableRefreshAction);
|
||||
bankAccountTable_menu_add.setOnAction(this::onTableAddAction);
|
||||
bankAccountTable_menu_del.setOnAction(this::onTableDeleteAction);
|
||||
|
||||
super.initializeTab();
|
||||
}
|
||||
|
||||
|
||||
@@ -97,8 +97,10 @@ public class CompanyTabSkinOther
|
||||
// Yu //
|
||||
public TitledPane yuCloudPane;
|
||||
public TextField cloudYuIdField;
|
||||
public TextField cloudYuCloudIdField;
|
||||
public TextField cloudYuLatestField;
|
||||
public TextField cloudYuVendorUpdateDateField;
|
||||
public TextField cloudYuCustomerUpdateDateField;
|
||||
public CheckBox cloudYuActiveField;
|
||||
public Label cloudYuVersionLabel;
|
||||
public Button yuCloudPaneSaveButton;
|
||||
|
||||
@@ -417,8 +419,10 @@ public class CompanyTabSkinOther
|
||||
}
|
||||
|
||||
cloudYuIdField.textProperty().bind(yuCloudInfoViewModel.getId().asString());
|
||||
cloudYuCloudIdField.textProperty().bindBidirectional(yuCloudInfoViewModel.getCloudId());
|
||||
cloudYuLatestField.textProperty().bind(yuCloudInfoViewModel.getLatestUpdate().map(MyDateTimeUtils::format));
|
||||
cloudYuVendorUpdateDateField.textProperty().bind(yuCloudInfoViewModel.getVendorUpdateDate().map(MyDateTimeUtils::format));
|
||||
cloudYuCustomerUpdateDateField.textProperty().bind(yuCloudInfoViewModel.getCustomerUpdateDate().map(MyDateTimeUtils::format));
|
||||
cloudYuActiveField.selectedProperty().bindBidirectional(yuCloudInfoViewModel.getActive());
|
||||
cloudYuVersionLabel.textProperty().bind(yuCloudInfoViewModel.getVersion().asString("Ver:%s"));
|
||||
|
||||
Button button = yuCloudPaneSaveButton;
|
||||
@@ -436,6 +440,34 @@ public class CompanyTabSkinOther
|
||||
button.setDisable(false);
|
||||
});
|
||||
});
|
||||
|
||||
DelayOnceExecutor saveExecutor = new DelayOnceExecutor(() -> {
|
||||
save(yuCloudInfoViewModel);
|
||||
cloudYuActiveField.setBorder(null);
|
||||
}, 2, TimeUnit.SECONDS).exception(e -> logger.error(e.getMessage(), e));
|
||||
cloudYuActiveField.setOnMouseClicked(event -> {
|
||||
cloudYuActiveField.setBorder(Border.stroke(Color.RED));
|
||||
saveExecutor.tick();
|
||||
});
|
||||
}
|
||||
|
||||
public void save(CloudYuInfoViewModel viewModel) {
|
||||
int infoId = viewModel.getId().get();
|
||||
YongYouU8Service service = getYongYouU8Service();
|
||||
CloudYuVo cloudYu = service.findById(infoId);
|
||||
if (cloudYu == null) {
|
||||
throw new RuntimeException("CloudTyc not found");
|
||||
}
|
||||
if (viewModel.copyTo(cloudYu)) {
|
||||
CloudYuVo saved = service.save(cloudYu);
|
||||
if (Platform.isFxApplicationThread()) {
|
||||
viewModel.update(saved);
|
||||
} else {
|
||||
Platform.runLater(() -> {
|
||||
viewModel.update(saved);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void onCloudYuUpdateButtonClicked(ActionEvent event) {
|
||||
@@ -516,9 +548,11 @@ public class CompanyTabSkinOther
|
||||
CompanyExtendInfoViewModel viewModel = extendInfoViewModel;
|
||||
CompanyExtendInfoService service = getExtendInfoService();
|
||||
CompanyExtendInfoVo extendInfo = service.findByCompany(company);
|
||||
Platform.runLater(() -> {
|
||||
viewModel.update(extendInfo);
|
||||
});
|
||||
if (extendInfo != null) {
|
||||
Platform.runLater(() -> {
|
||||
viewModel.update(extendInfo);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
CloudRkService getCloudRkService() {
|
||||
|
||||
@@ -42,7 +42,6 @@ public class VendorTypeTableCell<T> extends AsyncUpdateTableCell<T, VendorType,
|
||||
protected VendorTypeLocalVo initialize() {
|
||||
VendorType item = getItem();
|
||||
VendorTypeLocalVo localVo = getServiceBean().findByType(item);
|
||||
System.out.println("item = " + item + ", localVo = " + getServiceBean().getStringConverter().toString(localVo));
|
||||
return localVo;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +213,7 @@ public class VendorApprovedListTabSkinVendors
|
||||
task.setEveryYearMinContracts(qualifiedVendorEveryYearMinContractsSpinner.getValue());
|
||||
|
||||
UITools.showTaskDialogAndWait("导入供方", task, null);
|
||||
loadTableDataSet();
|
||||
}
|
||||
|
||||
public void onVendorTableRefreshAction(ActionEvent event) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ecep.contract.constant.CompanyVendorConstant;
|
||||
import com.ecep.contract.service.*;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
@@ -119,7 +120,8 @@ public class VendorApprovedListVendorExportTask extends Tasker<Object> {
|
||||
}
|
||||
|
||||
private File getVendorApprovedListTemplate() {
|
||||
return getVendorService().getVendorApprovedListTemplate();
|
||||
String path = getConfService().getString(CompanyVendorConstant.KEY_APPROVED_LIST_TEMPLATE);
|
||||
return new File(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -95,6 +95,7 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
}
|
||||
|
||||
service = getBean(VendorApprovedService.class);
|
||||
// 检索供方
|
||||
VendorService vendorService = getBean(VendorService.class);
|
||||
Page<VendorVo> page = vendorService.findAll(
|
||||
ParamUtils.builder()
|
||||
@@ -136,7 +137,17 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
// 明确 company 实例
|
||||
CompanyVo company = initializedVendorCompany(vendor);
|
||||
if (company == null) {
|
||||
// 无效
|
||||
// 无效, 删除异常数据
|
||||
holder.error("供方(#" + vendor.getId() + ")无对应的公司消息");
|
||||
List<VendorApprovedItemVo> items = getItemService().findAllByListAndVendor(approvedList, vendor);
|
||||
if (items != null && !items.isEmpty()) {
|
||||
// 删除
|
||||
MessageHolder subHolder = holder.sub(" - ");
|
||||
items.forEach(item -> {
|
||||
getItemService().delete(item);
|
||||
subHolder.info("删除 #" + item.getId() + ", " + item.getVendorName());
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -144,15 +155,15 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
|
||||
VendorType vendorType = vendor.getType();
|
||||
if (vendorType == null) {
|
||||
subHolder.error("供方的分类为空");
|
||||
return;
|
||||
subHolder.debug("供方分类未设置");
|
||||
}
|
||||
|
||||
// 确认供方的developDate 是否在供方名录的发布日期之后
|
||||
LocalDate developDate = vendor.getDevelopDate();
|
||||
if (developDate == null) {
|
||||
subHolder.error("供方的开发日期为空");
|
||||
subHolder.error("开发日期未设置");
|
||||
} else if (developDate.isAfter(approvedList.getPublishDate())) {
|
||||
subHolder.info("开发日期在供方名录发布之后, 跳过...");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -160,108 +171,13 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
List<VendorApprovedItemVo> items = getItemService().findAllByListAndVendor(approvedList, vendor);
|
||||
if (items == null || items.isEmpty()) {
|
||||
// 供方不在供方名录中时,新建一个
|
||||
VendorApprovedItemVo item = new VendorApprovedItemVo();
|
||||
item.setListId(approvedList.getId());
|
||||
item.setVendorId(vendor.getId());
|
||||
|
||||
// 当前供应商分类是不合格供应商时
|
||||
if (vendorType == VendorType.UNQUALIFIED) {
|
||||
// 检索查看供方的评价表, 看与发布日期期间是否有评价表
|
||||
if (!checkAsQualifiedVendorByEvaluationFormFiles(vendor, item, subHolder)) {
|
||||
// 不合同供方,跳过
|
||||
if (logUnqualifiedVendor) {
|
||||
subHolder.info("供方是不合格供方, 不纳入名录");
|
||||
}
|
||||
// 上一年度的供方目录中是否有此供应商
|
||||
return;
|
||||
}
|
||||
item.setDescription("");
|
||||
}
|
||||
// 当前供应商分类是合格供方时
|
||||
else if (vendorType == VendorType.TYPICALLY) {
|
||||
// 协议经销商,认定为合格供方
|
||||
if (vendor.isProtocolProvider()) {
|
||||
item.setType(VendorType.QUALIFIED);
|
||||
item.setDescription("协议经销商");
|
||||
}
|
||||
// 非协议经销商
|
||||
else {
|
||||
// 查看供方的合同,看近3年期间是否有合同
|
||||
List<ContractVo> contracts = findAllVendorContracts(vendor, approvedList.getPublishDate());
|
||||
if (contracts.isEmpty()) {
|
||||
// 没有合同,应该归入不合格供应商
|
||||
// 保持一般供应商分类,后期流程处理是否变更分类
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
if (logTypicallyVendorNoThreeYearContract) {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年没有合作, 应该转为不合格供应商");
|
||||
}
|
||||
item.setDescription(STR_MEET_UNQUALIFIED);
|
||||
} else {
|
||||
// 检查近3年期间是否都有合同
|
||||
if (checkAllYearHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 每年都有合同,合同数是否符合合格供方标准
|
||||
if (checkAllYearMinHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 保持一般供应商分类,后期流程处理是否变更分类
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
subHolder.info("供方近" + vendorContractMinusYear + "年每年都有合作, 符合合格供方标准");
|
||||
item.setDescription(STR_MEET_QUALIFIED);
|
||||
} else {
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年每年都有合作, 但是合同数不足, 应转为一般供应商");
|
||||
item.setDescription(STR_MEET_TYPICALLY);
|
||||
}
|
||||
} else {
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
item.setDescription("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 当前供应商分类是合格供方时
|
||||
else if (vendorType == VendorType.QUALIFIED) {
|
||||
// 查看供方的合同,看近3年期间是否有合同
|
||||
List<ContractVo> contracts = findAllVendorContracts(vendor, approvedList.getPublishDate());
|
||||
item.setType(vendorType);
|
||||
if (contracts.isEmpty()) {
|
||||
if (logTypicallyVendorNoThreeYearContract) {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年没有合作, 应该转为不合格供应商");
|
||||
}
|
||||
item.setDescription(STR_MEET_UNQUALIFIED);
|
||||
} else {
|
||||
// 检查近3年期间是否都有合同
|
||||
if (checkAllYearHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 每年都有合同,合同数是否符合合格供方标准
|
||||
if (checkAllYearMinHasContract(contracts, approvedList.getPublishDate())) {
|
||||
item.setDescription("");
|
||||
} else {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年每年都有合作, 但是合同数不足, 应转为一般供应商");
|
||||
item.setDescription(STR_MEET_TYPICALLY);
|
||||
}
|
||||
} else {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年非每年都有合作");
|
||||
item.setDescription("");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 未知分类时
|
||||
else {
|
||||
item.setDescription("未知供方分类");
|
||||
}
|
||||
|
||||
// 匹配的历史名称
|
||||
updateVendorNameWithOldName(vendor, item);
|
||||
getItemService().save(item);
|
||||
syncWhenNoItem(vendor, company, subHolder);
|
||||
return;
|
||||
}
|
||||
|
||||
if (items.size() == 1) {
|
||||
VendorApprovedItemVo first = items.getFirst();
|
||||
if (!StringUtils.hasText(first.getVendorName())) {
|
||||
updateVendorNameWithOldName(vendor, first);
|
||||
}
|
||||
updateItem(vendor, first, subHolder);
|
||||
return;
|
||||
}
|
||||
VendorApprovedItemVo first = items.getFirst();
|
||||
syncItem(vendor, company, first, subHolder);
|
||||
|
||||
|
||||
for (int i = 1; i < items.size(); i++) {
|
||||
VendorApprovedItemVo item = items.get(i);
|
||||
@@ -270,11 +186,123 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateVendorNameWithOldName(VendorVo vendor, VendorApprovedItemVo item) {
|
||||
CompanyVo company = initializedVendorCompany(vendor);
|
||||
if (company == null) {
|
||||
/**
|
||||
* 当没有匹配的供方名录项时
|
||||
*
|
||||
* @param vendor
|
||||
* @param company
|
||||
* @param subHolder
|
||||
*/
|
||||
private void syncWhenNoItem(VendorVo vendor, CompanyVo company, MessageHolder subHolder) {
|
||||
VendorType vendorType = vendor.getType();
|
||||
if (vendorType == null) {
|
||||
subHolder.debug("供方分类未设置");
|
||||
}
|
||||
|
||||
VendorApprovedItemVo item = new VendorApprovedItemVo();
|
||||
item.setListId(approvedList.getId());
|
||||
item.setVendorId(vendor.getId());
|
||||
|
||||
// 当前供应商分类是不合格供应商时
|
||||
if (vendorType == VendorType.UNQUALIFIED) {
|
||||
// 检索查看供方的评价表, 看与发布日期期间是否有评价表
|
||||
if (!checkAsQualifiedVendorByEvaluationFormFiles(vendor, item, subHolder)) {
|
||||
// 不合同供方,跳过
|
||||
if (logUnqualifiedVendor) {
|
||||
subHolder.info("供方是不合格供方, 不纳入名录");
|
||||
}
|
||||
// 上一年度的供方目录中是否有此供应商
|
||||
return;
|
||||
}
|
||||
item.setDescription("");
|
||||
}
|
||||
// 当前供应商分类是合格供方时
|
||||
else if (vendorType == VendorType.TYPICALLY) {
|
||||
// 协议经销商,认定为合格供方
|
||||
if (vendor.isProtocolProvider()) {
|
||||
item.setType(VendorType.QUALIFIED);
|
||||
item.setDescription("协议经销商");
|
||||
}
|
||||
// 非协议经销商
|
||||
else {
|
||||
// 查看供方的合同,看近3年期间是否有合同
|
||||
List<ContractVo> contracts = findAllVendorContracts(vendor, approvedList.getPublishDate());
|
||||
if (contracts.isEmpty()) {
|
||||
// 没有合同,应该归入不合格供应商
|
||||
// 保持一般供应商分类,后期流程处理是否变更分类
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
if (logTypicallyVendorNoThreeYearContract) {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年没有合作, 应该转为不合格供应商");
|
||||
}
|
||||
item.setDescription(STR_MEET_UNQUALIFIED + "(缺合同1)");
|
||||
} else {
|
||||
// 检查近3年期间是否都有合同
|
||||
if (checkAllYearHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 每年都有合同,合同数是否符合合格供方标准
|
||||
if (checkAllYearMinHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 保持一般供应商分类,后期流程处理是否变更分类
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
subHolder.info("供方近" + vendorContractMinusYear + "年每年都有合作, 符合合格供方标准");
|
||||
item.setDescription(STR_MEET_QUALIFIED);
|
||||
} else {
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年每年都有合作, 但是合同数不足, 应转为一般供应商");
|
||||
item.setDescription(STR_MEET_TYPICALLY);
|
||||
}
|
||||
} else {
|
||||
item.setType(VendorType.TYPICALLY);
|
||||
item.setDescription("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 当前供应商分类是合格供方时
|
||||
else if (vendorType == VendorType.QUALIFIED) {
|
||||
// 查看供方的合同,看近3年期间是否有合同
|
||||
List<ContractVo> contracts = findAllVendorContracts(vendor, approvedList.getPublishDate());
|
||||
item.setType(vendorType);
|
||||
if (contracts.isEmpty()) {
|
||||
if (logTypicallyVendorNoThreeYearContract) {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年没有合作, 应该转为不合格供应商");
|
||||
}
|
||||
item.setDescription(STR_MEET_UNQUALIFIED + "(缺合同2)");
|
||||
} else {
|
||||
// 检查近3年期间是否都有合同
|
||||
if (checkAllYearHasContract(contracts, approvedList.getPublishDate())) {
|
||||
// 每年都有合同,合同数是否符合合格供方标准
|
||||
if (checkAllYearMinHasContract(contracts, approvedList.getPublishDate())) {
|
||||
item.setDescription("");
|
||||
} else {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年每年都有合作, 但是合同数不足, 应转为一般供应商");
|
||||
item.setDescription(STR_MEET_TYPICALLY);
|
||||
}
|
||||
} else {
|
||||
subHolder.warn("供方近" + vendorContractMinusYear + "年非每年都有合作");
|
||||
item.setDescription("");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 未知分类时
|
||||
else {
|
||||
item.setDescription("未知供方分类");
|
||||
}
|
||||
|
||||
// 匹配的历史名称
|
||||
updateVendorNameWithOldName(company, item);
|
||||
getItemService().save(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配历史名称,当前供方名称为空时
|
||||
* @param company
|
||||
* @param item
|
||||
*/
|
||||
private void updateVendorNameWithOldName(CompanyVo company, VendorApprovedItemVo item) {
|
||||
if (StringUtils.hasText(item.getVendorName())) {
|
||||
// 已经有供方名称时,不更新
|
||||
return;
|
||||
}
|
||||
|
||||
CompanyOldNameVo companyOldName = getCompanyOldNameService().findMatchByDate(company,
|
||||
approvedList.getPublishDate());
|
||||
if (companyOldName != null) {
|
||||
@@ -288,11 +316,12 @@ public class VendorApprovedListVendorImportTask extends Tasker<Object> {
|
||||
@Setter
|
||||
private boolean logUnqualifiedVendorRemove = true;
|
||||
|
||||
private void updateItem(
|
||||
VendorVo vendor, VendorApprovedItemVo item, MessageHolder holder) {
|
||||
private void syncItem(
|
||||
VendorVo vendor, CompanyVo company, VendorApprovedItemVo item, MessageHolder holder) {
|
||||
VendorType t1 = item.getType();
|
||||
VendorType vendorType = vendor.getType();
|
||||
VendorApprovedItemService itemService = getItemService();
|
||||
updateVendorNameWithOldName(company, item);
|
||||
if (t1 != vendorType) {
|
||||
holder.warn("注意分类不一致, " + t1 + ", " + vendorType + ".");
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.controller.vendor.approved_list;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.ecep.contract.task.VendorApprovedListMakePathTask;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -104,15 +105,13 @@ public class VendorApprovedListWindowController
|
||||
}
|
||||
|
||||
public void onApprovedListCreatePathAction(ActionEvent event) {
|
||||
VendorApprovedListMakePathTask task = new VendorApprovedListMakePathTask();
|
||||
task.setApprovedList(getEntity());
|
||||
UITools.showTaskDialogAndWait("创建目录", task, null);
|
||||
|
||||
int id = viewModel.getId().get();
|
||||
VendorApprovedVo list = service.findById(id);
|
||||
|
||||
if (service.makePathAbsent(list)) {
|
||||
VendorApprovedVo saved = service.save(list);
|
||||
viewModel.update(saved);
|
||||
} else {
|
||||
setStatus("目录存在或创建失败");
|
||||
}
|
||||
viewModel.update(list);
|
||||
}
|
||||
|
||||
public void onApprovedListChangePathAction(ActionEvent event) {
|
||||
@@ -123,8 +122,4 @@ public class VendorApprovedListWindowController
|
||||
task.setApprovedList(getEntity());
|
||||
UITools.showTaskDialogAndWait("导出供方", task, null);
|
||||
}
|
||||
|
||||
private void save(ActionEvent event) {
|
||||
saveTabSkins();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ public class VendorCatalogStringConverter extends StringConverter<VendorCatalogV
|
||||
|
||||
@Override
|
||||
public String toString(VendorCatalogVo object) {
|
||||
if (object == null) {
|
||||
return "-";
|
||||
}
|
||||
return object.getName();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,18 +29,11 @@ public class CompanyCustomerEvaluationFormFileService
|
||||
* 根据客户文件查找评估表文件
|
||||
*/
|
||||
public CompanyCustomerEvaluationFormFileVo findByCustomerFile(CustomerFileVo customerFile) {
|
||||
return findByCustomerFile(customerFile.getId());
|
||||
return findOneByProperty("customerFile", customerFile.getId());
|
||||
}
|
||||
|
||||
public CompanyCustomerEvaluationFormFileVo findByCustomerFile(Integer customerFileId) {
|
||||
List<CompanyCustomerEvaluationFormFileVo> page = findAll(ParamUtils.builder()
|
||||
.equals("customerFile", customerFileId)
|
||||
.build(), Pageable.ofSize(1))
|
||||
.getContent();
|
||||
if (page.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return page.getFirst();
|
||||
return findOneByProperty("customerFile", customerFileId);
|
||||
}
|
||||
|
||||
public List<CompanyCustomerEvaluationFormFileVo> searchByCompany(Integer companyId, String searchText) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import javafx.util.StringConverter;
|
||||
@CacheConfig(cacheNames = "company-customer-file-type")
|
||||
public class CompanyCustomerFileTypeService
|
||||
extends QueryService<CustomerFileTypeLocalVo, CompanyCustomerFileTypeLocalViewModel> {
|
||||
private final StringConverter<CustomerFileTypeLocalVo> stringConverter = new CustomerFileTypeStringConverter(this);
|
||||
private final CustomerFileTypeStringConverter stringConverter = new CustomerFileTypeStringConverter(this);
|
||||
|
||||
@Cacheable(key = "#p0")
|
||||
@Override
|
||||
|
||||
@@ -71,11 +71,16 @@ public class CompanyOldNameService extends QueryService<CompanyOldNameVo, Compan
|
||||
}
|
||||
|
||||
public CompanyOldNameVo findMatchByDate(CompanyVo company, LocalDate localDate) {
|
||||
findAll(ParamUtils.builder()
|
||||
.equals("company", company.getId())
|
||||
.equals("ambiguity", true)
|
||||
.isNotNull("beginDate")
|
||||
.build(), Pageable.unpaged()).getContent();
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<CompanyOldNameVo> findAllByCompanyAndName(CompanyVo company, String oldName) {
|
||||
return findAll(ParamUtils.builder().equals("company", company.getId()).equals("oldName", oldName).build(),
|
||||
return findAll(ParamUtils.builder().equals("company", company.getId()).equals("name", oldName).build(),
|
||||
Pageable.unpaged()).getContent();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.service;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -9,6 +10,7 @@ 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.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -37,13 +39,13 @@ public class ContractFileTypeService extends QueryService<ContractFileTypeLocalV
|
||||
return super.findAll();
|
||||
}
|
||||
|
||||
@Caching(put = { @CachePut(key = "#p0.id"), @CachePut(key = "'all'") })
|
||||
@Caching(put = {@CachePut(key = "#p0.id"), @CachePut(key = "'all'")})
|
||||
@Override
|
||||
public ContractFileTypeLocalVo save(ContractFileTypeLocalVo entity) {
|
||||
return super.save(entity);
|
||||
}
|
||||
|
||||
@Caching(put = { @CachePut(key = "#p0.id"), @CachePut(key = "'all'") })
|
||||
@Caching(put = {@CachePut(key = "#p0.id"), @CachePut(key = "'all'")})
|
||||
@Override
|
||||
public void delete(ContractFileTypeLocalVo entity) {
|
||||
super.delete(entity);
|
||||
@@ -55,6 +57,10 @@ public class ContractFileTypeService extends QueryService<ContractFileTypeLocalV
|
||||
.collect(Collectors.toMap(ContractFileTypeLocalVo::getType, Function.identity()));
|
||||
}
|
||||
|
||||
public CompletableFuture<Page<ContractFileTypeLocalVo>> asyncFindAll(Locale locale) {
|
||||
return asyncFindAll(ParamUtils.builder().equals("lang", locale.toLanguageTag()).build(), Pageable.unpaged());
|
||||
}
|
||||
|
||||
@Cacheable
|
||||
public ContractFileTypeLocalVo findByType(Locale locale, ContractFileType type) {
|
||||
return findAll(ParamUtils.builder().equals("lang", locale.toLanguageTag()).equals("type", type).build(), Pageable.ofSize(1)).stream().findFirst().orElse(null);
|
||||
@@ -67,7 +73,7 @@ public class ContractFileTypeService extends QueryService<ContractFileTypeLocalV
|
||||
|
||||
/**
|
||||
* 根据语言标签和参数查找单个 ContractFileTypeLocalVo 对象
|
||||
*
|
||||
*
|
||||
* @param locale 语言区域
|
||||
* @param key 参数键
|
||||
* @param value 参数值
|
||||
@@ -82,7 +88,7 @@ public class ContractFileTypeService extends QueryService<ContractFileTypeLocalV
|
||||
public ContractFileTypeLocalVo findByLocaleAndValue(Locale locale, String string) {
|
||||
return findOneByLang(locale, "value", string);
|
||||
}
|
||||
|
||||
|
||||
public ContractFileTypeLocalVo findByLocaleAndType(Locale locale, ContractFileType type) {
|
||||
return findOneByLang(locale, "type", type);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ public class SysConfService {
|
||||
if (ex != null) {
|
||||
throw new RuntimeException("远程方法+findById+调用失败", ex);
|
||||
}
|
||||
if (response == null || response.isNull()) {
|
||||
return null;
|
||||
}
|
||||
SysConf newEntity = new SysConf();
|
||||
try {
|
||||
objectMapper.updateValue(newEntity, response);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ecep.contract.service;
|
||||
|
||||
import com.ecep.contract.util.ParamUtils;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
@@ -12,13 +14,14 @@ public class VendorApprovedFileService
|
||||
extends QueryService<VendorApprovedFileVo, CompanyVendorApprovedFileViewModel> {
|
||||
|
||||
public VendorApprovedFileVo findByName(VendorApprovedVo approvedList, String name) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findByName'");
|
||||
return findOneByProperty(approvedList, "fileName", name);
|
||||
}
|
||||
|
||||
public boolean reBuildingFiles(VendorApprovedVo list, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'reBuildingFiles'");
|
||||
public VendorApprovedFileVo findOneByProperty(VendorApprovedVo list, String propertyName, Object propertyValue) {
|
||||
return findAll(ParamUtils.builder()
|
||||
.equals("list", list.getId())
|
||||
.equals(propertyName, propertyValue)
|
||||
.build(), Pageable.ofSize(1)).stream()
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.vo.VendorApprovedFileVo;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -23,4 +24,12 @@ public class VendorApprovedItemService
|
||||
.build(), Pageable.unpaged()).getContent();
|
||||
}
|
||||
|
||||
public VendorApprovedItemVo findOneByProperty(VendorApprovedVo list, String propertyName, Object propertyValue) {
|
||||
return findAll(ParamUtils.builder()
|
||||
.equals("list", list.getId())
|
||||
.equals(propertyName, propertyValue)
|
||||
.build(), Pageable.ofSize(1)).stream()
|
||||
.findFirst().orElse(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,23 +6,23 @@ import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.vm.CompanyVendorApprovedListViewModel;
|
||||
import com.ecep.contract.vo.VendorApprovedVo;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Service
|
||||
public class VendorApprovedService
|
||||
extends QueryService<VendorApprovedVo, CompanyVendorApprovedListViewModel> {
|
||||
|
||||
public boolean makePathAbsent(VendorApprovedVo list) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'makePathAbsent'");
|
||||
}
|
||||
|
||||
public boolean reBuildingFiles(VendorApprovedVo list, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'reBuildingFiles'");
|
||||
}
|
||||
|
||||
public boolean existPath(VendorApprovedVo entity) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'existPath'");
|
||||
try {
|
||||
return async("existPath", entity.getId(), Integer.class).handle((response, ex) -> {
|
||||
if (ex != null) {
|
||||
throw new RuntimeException("远程方法+existPath+调用失败", ex);
|
||||
}
|
||||
return response != null && response.isBoolean() && response.asBoolean();
|
||||
}).get();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,15 +43,6 @@ public class VendorService extends QueryService<VendorVo, CompanyVendorViewModel
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public File getVendorApprovedListTemplate() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getVendorApprovedListTemplate'");
|
||||
}
|
||||
|
||||
public VendorCatalog findCatalogById(Integer id) {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findCatalogById'");
|
||||
}
|
||||
|
||||
@Cacheable(key = "'company-'+#p0.id")
|
||||
public VendorVo findByCompany(CompanyVo company) {
|
||||
return findOneByProperty("company", company.getId());
|
||||
|
||||
@@ -1,11 +1,41 @@
|
||||
package com.ecep.contract.task;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.WebSocketClientTasker;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* 合同全量同步任务
|
||||
* 通过WebSocket与服务器进行通信,实现合同数据的全量同步
|
||||
*/
|
||||
public class ContractSyncAllTask extends Tasker<Object> implements WebSocketClientTasker {
|
||||
private static final String TASK_NAME = "ContractSyncAllTask";
|
||||
|
||||
public class ContractSyncAllTask extends Tasker<Object> {
|
||||
@Override
|
||||
public Object execute(MessageHolder holder) {
|
||||
return null;
|
||||
public String getTaskName() {
|
||||
return TASK_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgress(long current, long total) {
|
||||
super.updateProgress(current, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object execute(MessageHolder holder) {
|
||||
// 更新任务状态信息
|
||||
updateTitle("开始合同全量同步任务");
|
||||
holder.info("准备连接服务器进行合同数据同步...");
|
||||
|
||||
try {
|
||||
// 调用远程任务
|
||||
Object result = callRemoteTask(holder, Locale.getDefault());
|
||||
holder.info("合同全量同步任务完成");
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
holder.error("同步失败: " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.ecep.contract.task;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.WebSocketClientTasker;
|
||||
import com.ecep.contract.vo.VendorApprovedVo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 合格供方名录生成路径任务器客户端实现
|
||||
* 用于通过WebSocket与服务器通信,为合格供方名录生成文件路径
|
||||
*/
|
||||
public class VendorApprovedListMakePathTask extends Tasker<Object> implements WebSocketClientTasker {
|
||||
private static final Logger logger = LoggerFactory.getLogger(VendorApprovedListMakePathTask.class);
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private VendorApprovedVo approvedList;
|
||||
|
||||
@Getter
|
||||
protected boolean modified = false;
|
||||
|
||||
@Override
|
||||
public String getTaskName() {
|
||||
return "VendorApprovedListMakePathTask";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgress(long current, long total) {
|
||||
super.updateProgress(current, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object execute(MessageHolder holder) throws Exception {
|
||||
updateTitle("生成合格供方名录文件路径");
|
||||
if (approvedList == null) {
|
||||
holder.addMessage(java.util.logging.Level.SEVERE, "合格供方名录信息不能为空");
|
||||
return null;
|
||||
}
|
||||
return callRemoteTask(holder, getLocale(), approvedList.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理从服务器返回的修改状态
|
||||
* 当服务器端更新此属性时,客户端会接收到更新
|
||||
*
|
||||
* @param modified 文件是否被修改
|
||||
*/
|
||||
public void setModified(boolean modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,11 @@ package com.ecep.contract.util;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
|
||||
/**
|
||||
* 参数工具类,用于构建查询条件参数
|
||||
@@ -103,6 +104,7 @@ public class ParamUtils {
|
||||
*/
|
||||
public static class Builder {
|
||||
// 存储构建的查询参数
|
||||
private String searchText;
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
/**
|
||||
@@ -112,6 +114,18 @@ public class ParamUtils {
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
private void addParam(String field, String action, Object value) {
|
||||
Object map = params.computeIfAbsent(field, k -> new HashMap<>());
|
||||
if (map instanceof Map) {
|
||||
((Map) map).put(action, value);
|
||||
return;
|
||||
}
|
||||
HashMap<String, Object> m = new HashMap<>();
|
||||
m.put(action, value);
|
||||
m.put(ParamConstant.KEY_equal, map);
|
||||
params.put(field, m);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加非空条件到构建器
|
||||
*
|
||||
@@ -119,7 +133,7 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder isNotNull(String key) {
|
||||
params.put(key, Map.of("isNotNull", true));
|
||||
addParam(key, ParamConstant.KEY_isNotNull, true);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -131,7 +145,7 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder lessThan(String key, LocalDate value) {
|
||||
params.put(key, Map.of("lessThan", value));
|
||||
addParam(key, ParamConstant.KEY_lessThan, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -143,7 +157,7 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder greaterThan(String key, LocalDate value) {
|
||||
params.put(key, Map.of("greaterThan", value));
|
||||
addParam(key, ParamConstant.KEY_greaterThan, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -155,7 +169,7 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder equals(String key, Object value) {
|
||||
params.put(key, value);
|
||||
addParam(key, ParamConstant.KEY_equal, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -168,10 +182,7 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder between(String key, LocalDate begin, LocalDate end) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("begin", begin);
|
||||
params.put("end", end);
|
||||
this.params.put(key, params);
|
||||
addParam(key, ParamConstant.KEY_between, new Object[]{begin, end});
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -183,17 +194,34 @@ public class ParamUtils {
|
||||
* @return 当前Builder实例,支持链式调用
|
||||
*/
|
||||
public Builder search(String searchText) {
|
||||
params.put(ServiceConstant.KEY_SEARCH_TEXT, searchText);
|
||||
this.searchText = searchText;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建并返回查询参数Map
|
||||
* <pre>
|
||||
* {
|
||||
* searchText: "搜索文本",
|
||||
* and: [
|
||||
* {field: "字段名", action: "equal", value: "值"},
|
||||
* {field: "字段名", action: "between", value: [begin, end]}
|
||||
* {field: "字段名", action: "or", value: [
|
||||
* {field: "字段名", action: "equal", value: "值"},
|
||||
* ]}
|
||||
* ],
|
||||
* or: [
|
||||
* {field: "字段名", action: "操作符", value: "值"}
|
||||
* ]
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @return 包含所有添加条件的查询参数Map
|
||||
*/
|
||||
public Map<String, Object> build() {
|
||||
return params;
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put(ParamConstant.KEY_SEARCH_TEXT, searchText);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,7 +233,7 @@ public class ParamUtils {
|
||||
public Builder and(Consumer<Builder> consumer) {
|
||||
Builder builder = new Builder();
|
||||
consumer.accept(builder);
|
||||
params.put("and", builder);
|
||||
params.put(ParamConstant.KEY_AND, builder);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -218,7 +246,7 @@ public class ParamUtils {
|
||||
public Builder or(Consumer<Builder> consumer) {
|
||||
Builder builder = new Builder();
|
||||
consumer.accept(builder);
|
||||
params.put("or", builder);
|
||||
params.put(ParamConstant.KEY_OR, builder);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,6 @@ public class UITools {
|
||||
|
||||
Platform.runLater(() -> {
|
||||
box.getChildren().add(progressBar);
|
||||
System.out.println("add progressBar = " + progressBar);
|
||||
});
|
||||
|
||||
// progressBar.disabledProperty().bind(task.runningProperty());
|
||||
@@ -223,19 +222,17 @@ public class UITools {
|
||||
|
||||
if (task instanceof Tasker<?> tasker) {
|
||||
// 提交任务
|
||||
try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {
|
||||
executor.submit(tasker);
|
||||
}
|
||||
new Thread(tasker).start();
|
||||
// try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {
|
||||
// executor.submit(tasker);
|
||||
// System.out.println("executor = " + executor);
|
||||
// }
|
||||
}
|
||||
if (init != null) {
|
||||
init.accept(consumer::test);
|
||||
}
|
||||
dialog.showAndWait();
|
||||
if (task.getProgress() < 1) {
|
||||
task.cancel();
|
||||
}
|
||||
// if (task.isRunning()) {
|
||||
// }
|
||||
task.cancel();
|
||||
}
|
||||
|
||||
private static String printStackTrace(Throwable e) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.vo.CloudYuVo;
|
||||
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
@@ -15,10 +16,6 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CloudYuInfoViewModel extends IdentityViewModel<CloudYuVo> {
|
||||
/**
|
||||
* 云端Id
|
||||
*/
|
||||
private SimpleStringProperty cloudId = new SimpleStringProperty();
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
@@ -28,15 +25,16 @@ public class CloudYuInfoViewModel extends IdentityViewModel<CloudYuVo> {
|
||||
*/
|
||||
private SimpleObjectProperty<LocalDateTime> latestUpdate = new SimpleObjectProperty<>();
|
||||
|
||||
private SimpleStringProperty vendorCode = new SimpleStringProperty();
|
||||
private SimpleStringProperty vendorClassCode = new SimpleStringProperty();
|
||||
private SimpleObjectProperty<LocalDate> vendorDevelopDate = new SimpleObjectProperty<>();
|
||||
private SimpleStringProperty exceptionMessage = new SimpleStringProperty();
|
||||
|
||||
private SimpleStringProperty customerCode = new SimpleStringProperty();
|
||||
private SimpleStringProperty customerClassCode = new SimpleStringProperty();
|
||||
private SimpleObjectProperty<LocalDate> customerDevelopDate = new SimpleObjectProperty<>();
|
||||
private SimpleObjectProperty<LocalDate> vendorUpdateDate = new SimpleObjectProperty<>();
|
||||
private SimpleObjectProperty<LocalDate> customerUpdateDate = new SimpleObjectProperty<>();
|
||||
|
||||
private SimpleObjectProperty<LocalDateTime> cloudLatest = new SimpleObjectProperty<>();
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
private SimpleBooleanProperty active = new SimpleBooleanProperty();
|
||||
|
||||
/**
|
||||
* Version
|
||||
@@ -46,11 +44,13 @@ public class CloudYuInfoViewModel extends IdentityViewModel<CloudYuVo> {
|
||||
@Override
|
||||
protected void updateFrom(CloudYuVo info) {
|
||||
super.updateFrom(info);
|
||||
vendorCode.set(info.getExceptionMessage());
|
||||
vendorDevelopDate.set(info.getVendorUpdateDate());
|
||||
customerDevelopDate.set(info.getCustomerUpdateDate());
|
||||
company.set(info.getCompanyId());
|
||||
exceptionMessage.set(info.getExceptionMessage());
|
||||
vendorUpdateDate.set(info.getVendorUpdateDate());
|
||||
customerUpdateDate.set(info.getCustomerUpdateDate());
|
||||
cloudLatest.set(info.getCloudLatest());
|
||||
latestUpdate.set(info.getLatestUpdate());
|
||||
active.set(info.isActive());
|
||||
version.set(info.getVersion());
|
||||
}
|
||||
|
||||
@@ -65,16 +65,20 @@ public class CloudYuInfoViewModel extends IdentityViewModel<CloudYuVo> {
|
||||
|
||||
private boolean copyTo_(CloudYuVo info) {
|
||||
boolean modified = false;
|
||||
if (!Objects.equals(info.getExceptionMessage(), vendorCode.get())) {
|
||||
info.setExceptionMessage(vendorCode.get());
|
||||
if (!Objects.equals(info.getCompanyId(), company.get())) {
|
||||
info.setCompanyId(company.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(info.getVendorUpdateDate(), vendorDevelopDate.get())) {
|
||||
info.setVendorUpdateDate(vendorDevelopDate.get());
|
||||
if (!Objects.equals(info.getExceptionMessage(), exceptionMessage.get())) {
|
||||
info.setExceptionMessage(exceptionMessage.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(info.getCustomerUpdateDate(), customerDevelopDate.get())) {
|
||||
info.setCustomerUpdateDate(customerDevelopDate.get());
|
||||
if (!Objects.equals(info.getVendorUpdateDate(), vendorUpdateDate.get())) {
|
||||
info.setVendorUpdateDate(vendorUpdateDate.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(info.getCustomerUpdateDate(), customerUpdateDate.get())) {
|
||||
info.setCustomerUpdateDate(customerUpdateDate.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
@@ -86,6 +90,10 @@ public class CloudYuInfoViewModel extends IdentityViewModel<CloudYuVo> {
|
||||
info.setLatestUpdate(latestUpdate.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(info.isActive(), active.get())) {
|
||||
info.setActive(active.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(info.getVersion(), version.get())) {
|
||||
info.setVersion(version.get());
|
||||
modified = true;
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.vo.CompanyBankAccountVo;
|
||||
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
@@ -15,8 +16,6 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CompanyBankAccountViewModel extends IdentityViewModel<CompanyBankAccountVo>
|
||||
implements CompanyBasedViewModel {
|
||||
private SimpleIntegerProperty id = new SimpleIntegerProperty();
|
||||
|
||||
private SimpleObjectProperty<Integer> companyId = new SimpleObjectProperty<>();
|
||||
private SimpleObjectProperty<Integer> bankId = new SimpleObjectProperty<>();
|
||||
|
||||
@@ -24,25 +23,27 @@ public class CompanyBankAccountViewModel extends IdentityViewModel<CompanyBankAc
|
||||
private SimpleStringProperty account = new SimpleStringProperty();
|
||||
|
||||
private SimpleObjectProperty<LocalDate> created = new SimpleObjectProperty<>();
|
||||
|
||||
private SimpleStringProperty description = new SimpleStringProperty();
|
||||
private SimpleBooleanProperty active = new SimpleBooleanProperty();
|
||||
private SimpleIntegerProperty version = new SimpleIntegerProperty();
|
||||
|
||||
|
||||
@Override
|
||||
protected void updateFrom(CompanyBankAccountVo v) {
|
||||
getId().set(v.getId());
|
||||
super.updateFrom(v);
|
||||
companyId.set(v.getCompanyId());
|
||||
bankId.set(v.getBankId());
|
||||
getOpeningBank().set(v.getOpeningBank());
|
||||
getAccount().set(v.getAccount());
|
||||
created.set(v.getCreated());
|
||||
description.set(v.getDescription());
|
||||
active.set(v.isActive());
|
||||
version.set(v.getVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean copyTo(CompanyBankAccountVo v) {
|
||||
boolean modified = super.copyTo(v);
|
||||
if (!Objects.equals(id.get(), v.getId())) {
|
||||
v.setId(id.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(companyId.get(), v.getCompanyId())) {
|
||||
v.setCompanyId(companyId.get());
|
||||
modified = true;
|
||||
@@ -59,6 +60,18 @@ public class CompanyBankAccountViewModel extends IdentityViewModel<CompanyBankAc
|
||||
v.setAccount(account.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(created.get(), v.getCreated())) {
|
||||
v.setCreated(created.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(description.get(), v.getDescription())) {
|
||||
v.setDescription(description.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(active.get(), v.isActive())) {
|
||||
v.setActive(active.get());
|
||||
modified = true;
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
||||
import com.ecep.contract.vo.CompanyCustomerEvaluationFormFileVo;
|
||||
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,7 +14,7 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CompanyCustomerEvaluationFormFileViewModel extends IdentityViewModel<CompanyCustomerEvaluationFormFileVo> {
|
||||
|
||||
private SimpleIntegerProperty customerFile = new SimpleIntegerProperty();
|
||||
private SimpleObjectProperty<Integer> customerFile = new SimpleObjectProperty<>();
|
||||
private SimpleStringProperty catalog = new SimpleStringProperty();
|
||||
private SimpleStringProperty level = new SimpleStringProperty();
|
||||
private SimpleIntegerProperty creditLevel = new SimpleIntegerProperty(0);
|
||||
@@ -65,6 +66,7 @@ public class CompanyCustomerEvaluationFormFileViewModel extends IdentityViewMode
|
||||
if (vo.getScoreTemplateVersion() != null) {
|
||||
scoreTemplateVersion.set(vo.getScoreTemplateVersion());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<VBox prefHeight="400.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.manager.cloud.tyc.CloudTycManagerWindowController">
|
||||
fx:controller="com.ecep.contract.controller.cloud.tyc.CloudTycManagerWindowController">
|
||||
<children>
|
||||
<MenuBar VBox.vgrow="NEVER">
|
||||
<menus>
|
||||
@@ -39,7 +39,6 @@
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Help">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#onDateTransferAction" text="数据迁移"/>
|
||||
<MenuItem mnemonicParsing="false" text="About MyHelloApp"/>
|
||||
</items>
|
||||
</Menu>
|
||||
|
||||
@@ -9,38 +9,42 @@
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import org.controlsfx.control.ToggleSwitch?>
|
||||
|
||||
<VBox prefHeight="400.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.cloud.u8.YongYouU8ConfigWindowController">
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="50.0" prefWidth="250.0" />
|
||||
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" maxWidth="5.0" minWidth="5.0" prefWidth="5.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="同步时公司未创建时, 公司开发日期在此之后的自动创建" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<DatePicker fx:id="auto_create_company_after" GridPane.columnIndex="2" />
|
||||
<Label text="cloud.u8.contract.latestDate" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="contract_latest_date" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<Label text="cloud.u8.contract.latestId" GridPane.rowIndex="5" />
|
||||
<TextField fx:id="contract_latest_id" GridPane.columnIndex="2" GridPane.rowIndex="5" />
|
||||
<Label text="cloud.u8.sync.elapse" GridPane.rowIndex="6" />
|
||||
<TextField fx:id="sync_elapse" GridPane.columnIndex="2" GridPane.rowIndex="6" />
|
||||
<Label text="创建在此之后日期的公司" />
|
||||
<ToggleSwitch fx:id="use_latest_id" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<Label text="使用latestId同步" GridPane.rowIndex="2" />
|
||||
<Label text="合同同步时是否使用最后更新的Id来判断更新范围,否则使用最后更新的合同日期来判断更新范围" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
<VBox prefHeight="400.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.controller.cloud.u8.YongYouU8ConfigWindowController">
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="50.0" prefWidth="250.0"/>
|
||||
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" maxWidth="5.0" minWidth="5.0"
|
||||
prefWidth="5.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="同步时公司未创建时, 公司开发日期在此之后的自动创建" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="1"/>
|
||||
<DatePicker fx:id="auto_create_company_after" GridPane.columnIndex="2"/>
|
||||
<Label text="cloud.u8.contract.latestDate" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="contract_latest_date" GridPane.columnIndex="2" GridPane.rowIndex="4"/>
|
||||
<Label text="cloud.u8.contract.latestId" GridPane.rowIndex="5"/>
|
||||
<TextField fx:id="contract_latest_id" GridPane.columnIndex="2" GridPane.rowIndex="5"/>
|
||||
<Label text="cloud.u8.sync.elapse" GridPane.rowIndex="6"/>
|
||||
<TextField fx:id="sync_elapse" GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||
<Label text="创建在此之后日期的公司"/>
|
||||
<ToggleSwitch fx:id="use_latest_id" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<Label text="使用latestId同步" GridPane.rowIndex="2"/>
|
||||
<Label text="合同同步时是否使用最后更新的Id来判断更新范围,否则使用最后更新的合同日期来判断更新范围"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="3"/>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
<TableColumn fx:id="idColumn" prefWidth="75.0" text="ID"/>
|
||||
<TableColumn fx:id="companyColumn" prefWidth="200.0" text="公司"/>
|
||||
<TableColumn fx:id="latestUpdateColumn" prefWidth="160.0" text="更新日期"/>
|
||||
<TableColumn fx:id="cloudIdColumn" prefWidth="150.0" text="平台编号"/>
|
||||
<TableColumn fx:id="cloudLatestColumn" prefWidth="160.0"
|
||||
text="平台更新日期"/>
|
||||
<TableColumn fx:id="cloudLatestColumn" prefWidth="160.0" text="平台更新日期"/>
|
||||
<TableColumn fx:id="cloudVendorUpdateDateColumn" prefWidth="160.0" text="供方更新日期"/>
|
||||
<TableColumn fx:id="cloudCustomerUpdateDateColumn" prefWidth="160.0" text="客户更新日期"/>
|
||||
<TableColumn fx:id="activeColumn" text="启用"/>
|
||||
<TableColumn fx:id="descriptionColumn" text="Description"/>
|
||||
</columns>
|
||||
</TableView>
|
||||
|
||||
@@ -22,14 +22,5 @@
|
||||
<TableColumn fx:id="bankAccountTable_openingBankColumn" prefWidth="300" text="开户行"/>
|
||||
<TableColumn fx:id="bankAccountTable_accountColumn" prefWidth="300.0" text="账号"/>
|
||||
</columns>
|
||||
<contextMenu>
|
||||
<ContextMenu>
|
||||
<items>
|
||||
<MenuItem fx:id="bankAccountTable_menu_refresh" mnemonicParsing="false" text="刷新"/>
|
||||
<MenuItem fx:id="bankAccountTable_menu_add" mnemonicParsing="false" text="新建"/>
|
||||
<MenuItem fx:id="bankAccountTable_menu_del" mnemonicParsing="false" text="删除"/>
|
||||
</items>
|
||||
</ContextMenu>
|
||||
</contextMenu>
|
||||
</TableView>
|
||||
</AnchorPane>
|
||||
@@ -1,88 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<ScrollPane fitToWidth="true" minHeight="300.0" minWidth="400.0" xmlns="http://javafx.com/javafx/22"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinOther">
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.CheckBox?>
|
||||
<?import javafx.scene.control.Hyperlink?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ScrollPane?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.control.TitledPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<ScrollPane fitToWidth="true" minHeight="300.0" minWidth="400.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinOther">
|
||||
<content>
|
||||
<VBox spacing="5.0">
|
||||
<children>
|
||||
<TitledPane fx:id="rkCloudPane" animated="false" collapsible="false" text="集团相关方平台"
|
||||
VBox.vgrow="NEVER">
|
||||
<TitledPane fx:id="rkCloudPane" animated="false" collapsible="false" text="集团相关方平台" VBox.vgrow="NEVER">
|
||||
<content>
|
||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" maxWidth="200.0" minWidth="80.0"
|
||||
prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
<ColumnConstraints halignment="CENTER" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="记录编号"/>
|
||||
<TextField fx:id="cloudRkIdField" editable="false" text="-" GridPane.columnIndex="1"/>
|
||||
<Label text="平台编号" GridPane.columnIndex="2"/>
|
||||
<TextField fx:id="cloudRkCloudIdField" layoutX="255.0" layoutY="14.0" text="-"
|
||||
GridPane.columnIndex="3"/>
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="7"/>
|
||||
<TextField fx:id="cloudRkLatestField" editable="false" layoutX="255.0" layoutY="44.0"
|
||||
text="-" GridPane.columnIndex="3" GridPane.rowIndex="7"/>
|
||||
<Label text="客户评级" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="cloudRkCustomerGradeField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<Label text="客户得分" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="cloudRkCustomerScoreField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
<Label text="企业资信评级" GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="cloudRkCreditRankField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<Label layoutX="44.0" layoutY="58.0" text="企业资信评级说明" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="cloudRkCreditRankDescriptionField" editable="false" layoutX="140.0"
|
||||
layoutY="54.0" text="-" GridPane.columnIndex="3" GridPane.rowIndex="1"/>
|
||||
<Label text="平台更新日期" GridPane.rowIndex="5"/>
|
||||
<TextField fx:id="cloudRkCloudLatestField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="5"/>
|
||||
<Label text="黑名单更新日期" GridPane.rowIndex="7"/>
|
||||
<TextField fx:id="cloudRkBlackListUpdatedField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="7"/>
|
||||
<Label text="供方评级" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="cloudRkVendorGradeField" editable="false" text="-"
|
||||
GridPane.columnIndex="3" GridPane.rowIndex="2"/>
|
||||
<Label text="供方得分" GridPane.columnIndex="2" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="cloudRkVendorScoreField" editable="false" text="-"
|
||||
GridPane.columnIndex="3" GridPane.rowIndex="3"/>
|
||||
<Label text="工商信息更新日期" wrapText="true" GridPane.rowIndex="6"/>
|
||||
<TextField fx:id="cloudRkEntUpdateField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="6"/>
|
||||
<Label fx:id="cloudRkVersionLabel" text="\@Version" GridPane.rowIndex="8"/>
|
||||
<Button mnemonicParsing="false" onAction="#onCloudRkUpdateButtonClickedAction"
|
||||
text="从平台更新" GridPane.columnIndex="3" GridPane.halignment="RIGHT"
|
||||
GridPane.rowIndex="8"/>
|
||||
<CheckBox fx:id="cloudRkAutoUpdateField" mnemonicParsing="false" text="自动更新"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="8"/>
|
||||
<Label text="客户评级说明" GridPane.rowIndex="4"/>
|
||||
<Label text="供方评级说明" GridPane.columnIndex="2" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="cloudRkCustomerDescriptionField" editable="false" text="-"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="cloudRkVendorDescriptionField" editable="false" text="-"
|
||||
GridPane.columnIndex="3" GridPane.rowIndex="4"/>
|
||||
<Label text="记录编号" />
|
||||
<TextField fx:id="cloudRkIdField" editable="false" text="-" GridPane.columnIndex="1" />
|
||||
<Label text="平台编号" GridPane.columnIndex="2" />
|
||||
<TextField fx:id="cloudRkCloudIdField" layoutX="255.0" layoutY="14.0" text="-" GridPane.columnIndex="3" />
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="7" />
|
||||
<TextField fx:id="cloudRkLatestField" editable="false" layoutX="255.0" layoutY="44.0" text="-" GridPane.columnIndex="3" GridPane.rowIndex="7" />
|
||||
<Label text="客户评级" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="cloudRkCustomerGradeField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<Label text="客户得分" GridPane.rowIndex="3" />
|
||||
<TextField fx:id="cloudRkCustomerScoreField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<Label text="企业资信评级" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="cloudRkCreditRankField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Label layoutX="44.0" layoutY="58.0" text="企业资信评级说明" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="cloudRkCreditRankDescriptionField" editable="false" layoutX="140.0" layoutY="54.0" text="-" GridPane.columnIndex="3" GridPane.rowIndex="1" />
|
||||
<Label text="平台更新日期" GridPane.rowIndex="5" />
|
||||
<TextField fx:id="cloudRkCloudLatestField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="5" />
|
||||
<Label text="黑名单更新日期" GridPane.rowIndex="7" />
|
||||
<TextField fx:id="cloudRkBlackListUpdatedField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="7" />
|
||||
<Label text="供方评级" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="cloudRkVendorGradeField" editable="false" text="-" GridPane.columnIndex="3" GridPane.rowIndex="2" />
|
||||
<Label text="供方得分" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<TextField fx:id="cloudRkVendorScoreField" editable="false" text="-" GridPane.columnIndex="3" GridPane.rowIndex="3" />
|
||||
<Label text="工商信息更新日期" wrapText="true" GridPane.rowIndex="6" />
|
||||
<TextField fx:id="cloudRkEntUpdateField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="6" />
|
||||
<Label fx:id="cloudRkVersionLabel" text="\@Version" GridPane.rowIndex="8" />
|
||||
<Button mnemonicParsing="false" onAction="#onCloudRkUpdateButtonClickedAction" text="从平台更新" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="8" />
|
||||
<CheckBox fx:id="cloudRkAutoUpdateField" mnemonicParsing="false" text="自动更新" GridPane.columnIndex="1" GridPane.rowIndex="8" />
|
||||
<Label text="客户评级说明" GridPane.rowIndex="4" />
|
||||
<Label text="供方评级说明" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="cloudRkCustomerDescriptionField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="cloudRkVendorDescriptionField" editable="false" text="-" GridPane.columnIndex="3" GridPane.rowIndex="4" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</content>
|
||||
@@ -91,43 +78,34 @@
|
||||
<content>
|
||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="记录编号"/>
|
||||
<Label text="平台编号" GridPane.columnIndex="2"/>
|
||||
<Label text="天眼评分" GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="cloudTycIdField" editable="false" text="-" GridPane.columnIndex="1"/>
|
||||
<TextField fx:id="cloudTycCloudIdField" text="-" GridPane.columnIndex="3"/>
|
||||
<TextField fx:id="cloudTycLatestField" editable="false" layoutX="255.0" layoutY="44.0"
|
||||
text="-" GridPane.columnIndex="3" GridPane.rowIndex="2"/>
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="tycCloudPaneCloudScore" text="-" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<Hyperlink onAction="#onTycCloudPaneHyperLinkClickedAction" text="浏览器打开"
|
||||
GridPane.columnIndex="3" GridPane.halignment="RIGHT"/>
|
||||
<HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1"
|
||||
GridPane.columnSpan="3" GridPane.rowIndex="3">
|
||||
<Label text="记录编号" />
|
||||
<Label text="平台编号" GridPane.columnIndex="2" />
|
||||
<Label text="天眼评分" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="cloudTycIdField" editable="false" text="-" GridPane.columnIndex="1" />
|
||||
<TextField fx:id="cloudTycCloudIdField" text="-" GridPane.columnIndex="3" />
|
||||
<TextField fx:id="cloudTycLatestField" editable="false" layoutX="255.0" layoutY="44.0" text="-" GridPane.columnIndex="3" GridPane.rowIndex="2" />
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="tycCloudPaneCloudScore" text="-" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Hyperlink onAction="#onTycCloudPaneHyperLinkClickedAction" text="浏览器打开" GridPane.columnIndex="3" GridPane.halignment="RIGHT" />
|
||||
<HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="3">
|
||||
<children>
|
||||
<Button mnemonicParsing="false" onAction="#onCloudTycUpdateButtonClickedAction"
|
||||
text="更新"/>
|
||||
<Button fx:id="tycCloudPaneSaveButton" mnemonicParsing="false" text="保存"/>
|
||||
<Button mnemonicParsing="false" onAction="#onCloudTycUpdateButtonClickedAction" text="更新" />
|
||||
<Button fx:id="tycCloudPaneSaveButton" mnemonicParsing="false" text="保存" />
|
||||
</children>
|
||||
</HBox>
|
||||
<Label fx:id="cloudTycVersionLabel" text="\@Version" GridPane.rowIndex="3"/>
|
||||
<Label fx:id="cloudTycVersionLabel" text="\@Version" GridPane.rowIndex="3" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</content>
|
||||
@@ -136,33 +114,30 @@
|
||||
<content>
|
||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="记录编号"/>
|
||||
<TextField fx:id="cloudYuIdField" editable="false" text="-" GridPane.columnIndex="1"/>
|
||||
<Label text="U8编号" GridPane.columnIndex="2"/>
|
||||
<TextField fx:id="cloudYuCloudIdField" text="-" GridPane.columnIndex="3"/>
|
||||
<Label text="客户编号" GridPane.rowIndex="1"/>
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="cloudYuLatestField" editable="false" text="-" GridPane.columnIndex="3"
|
||||
GridPane.rowIndex="2"/>
|
||||
<Button fx:id="yuCloudPaneSaveButton" mnemonicParsing="false" text="更新"
|
||||
GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="3"/>
|
||||
<Label fx:id="cloudYuVersionLabel" text="\@Version" GridPane.rowIndex="3"/>
|
||||
<Label text="记录编号" />
|
||||
<TextField fx:id="cloudYuIdField" editable="false" text="-" GridPane.columnIndex="1" />
|
||||
<Label text="更新日期" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="cloudYuLatestField" editable="false" text="-" GridPane.columnIndex="3" GridPane.rowIndex="2" />
|
||||
<Button fx:id="yuCloudPaneSaveButton" mnemonicParsing="false" text="更新" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||
<Label fx:id="cloudYuVersionLabel" text="\@Version" GridPane.rowIndex="3" />
|
||||
<Label text="供方更新" GridPane.rowIndex="1" />
|
||||
<Label text="客户更新" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="cloudYuVendorUpdateDateField" editable="false" text="-" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="cloudYuCustomerUpdateDateField" editable="false" text="-" GridPane.columnIndex="3" GridPane.rowIndex="1" />
|
||||
<Label text="启用" GridPane.rowIndex="2" />
|
||||
<CheckBox fx:id="cloudYuActiveField" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</content>
|
||||
@@ -171,30 +146,23 @@
|
||||
<content>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0"
|
||||
minWidth="80.0" prefWidth="120.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0"
|
||||
prefWidth="220.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="80.0" prefWidth="120.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="100.0" prefWidth="220.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="记录编号"/>
|
||||
<TextField fx:id="extendInfoIdField" editable="false" text="-"
|
||||
GridPane.columnIndex="1"/>
|
||||
<Button fx:id="extendInfoPaneSaveButton" mnemonicParsing="false" text="更新"
|
||||
GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="2"/>
|
||||
<Label fx:id="extendInfoVersionLabel" text="\@Version" GridPane.rowIndex="2"/>
|
||||
<CheckBox fx:id="extendInfoDisableVerifyField" mnemonicParsing="false"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<Label text="禁用核验" GridPane.rowIndex="1"/>
|
||||
<Label text="记录编号" />
|
||||
<TextField fx:id="extendInfoIdField" editable="false" text="-" GridPane.columnIndex="1" />
|
||||
<Button fx:id="extendInfoPaneSaveButton" mnemonicParsing="false" text="更新" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
|
||||
<Label fx:id="extendInfoVersionLabel" text="\@Version" GridPane.rowIndex="2" />
|
||||
<CheckBox fx:id="extendInfoDisableVerifyField" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Label text="禁用核验" GridPane.rowIndex="1" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</content>
|
||||
@@ -203,6 +171,6 @@
|
||||
</VBox>
|
||||
</content>
|
||||
<padding>
|
||||
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
|
||||
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
|
||||
</padding>
|
||||
</ScrollPane>
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<VBox prefHeight="800.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.controller.customer.CompanyCustomerEvaluationFormFileWindowController">
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<VBox prefHeight="800.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.controller.customer.CompanyCustomerEvaluationFormFileWindowController">
|
||||
<children>
|
||||
<MenuBar>
|
||||
<menus>
|
||||
@@ -209,7 +210,7 @@ fx:controller="com.ecep.contract.controller.customer.CompanyCustomerEvaluationFo
|
||||
<Label text="★★★★≤200分,★★★≤150分,★★≤100分,★≤60分" />
|
||||
</children>
|
||||
</VBox>
|
||||
<Button mnemonicParsing="false" text="保存" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="10" />
|
||||
<Button fx:id="saveBtn" mnemonicParsing="false" text="保存" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="10" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets right="5.0" />
|
||||
@@ -217,5 +218,15 @@ fx:controller="com.ecep.contract.controller.customer.CompanyCustomerEvaluationFo
|
||||
</GridPane>
|
||||
</items>
|
||||
</SplitPane>
|
||||
<HBox alignment="CENTER_LEFT" prefWidth="500.0" spacing="1.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<Pane HBox.hgrow="ALWAYS">
|
||||
<children>
|
||||
<Label fx:id="leftStatusLabel" contentDisplay="TOP" layoutX="3.0" layoutY="8.0" wrapText="true" />
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
</children>
|
||||
</VBox>
|
||||
|
||||
@@ -11,39 +11,49 @@
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
|
||||
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" tabClosingPolicy="UNAVAILABLE" tabMinWidth="80.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.ds.other.controller.SysConfWindowController">
|
||||
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
|
||||
prefWidth="600.0" tabClosingPolicy="UNAVAILABLE" tabMinWidth="80.0" xmlns="http://javafx.com/javafx/22"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="com.ecep.contract.controller.SysConfWindowController">
|
||||
<tabs>
|
||||
<Tab text="通用">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<GridPane layoutX="100.0" layoutY="96.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<GridPane layoutX="100.0" layoutY="96.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0" prefWidth="110.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="200.0" prefWidth="432.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0" prefWidth="48.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0"
|
||||
prefWidth="110.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308" minWidth="200.0"
|
||||
prefWidth="432.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0"
|
||||
prefWidth="48.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="通用的配置选项" GridPane.columnIndex="1" />
|
||||
<Label text="合同文件夹" GridPane.rowIndex="1" />
|
||||
<Label text="Label" GridPane.rowIndex="2" />
|
||||
<Label text="Label" GridPane.rowIndex="3" />
|
||||
<Label text="Label" GridPane.rowIndex="4" />
|
||||
<TextField prefHeight="23.0" prefWidth="251.0" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2" />
|
||||
<TextField GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3" />
|
||||
<TextField GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="4" />
|
||||
<Label fx:id="companyContractPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Button mnemonicParsing="false" onAction="#changeCompanyContractPath" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<Label text="通用的配置选项" GridPane.columnIndex="1"/>
|
||||
<Label text="合同文件夹" GridPane.rowIndex="1"/>
|
||||
<Label text="Label" GridPane.rowIndex="2"/>
|
||||
<Label text="Label" GridPane.rowIndex="3"/>
|
||||
<Label text="Label" GridPane.rowIndex="4"/>
|
||||
<TextField prefHeight="23.0" prefWidth="251.0" GridPane.columnIndex="1"
|
||||
GridPane.columnSpan="2" GridPane.rowIndex="2"/>
|
||||
<TextField GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3"/>
|
||||
<TextField GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="4"/>
|
||||
<Label fx:id="companyContractPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeCompanyContractPath" text="更换"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</GridPane>
|
||||
</children>
|
||||
@@ -56,30 +66,35 @@
|
||||
<children>
|
||||
<GridPane AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0" prefWidth="110.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="150.0" prefWidth="460.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0"
|
||||
prefWidth="110.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="150.0" prefWidth="460.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="数据库名称" GridPane.rowIndex="2" />
|
||||
<Label text="数据库IP地址" GridPane.rowIndex="1" />
|
||||
<Label text="配置用友U8的数据库信息" GridPane.columnIndex="1" />
|
||||
<Label text="数据库账户" GridPane.rowIndex="3" />
|
||||
<Label text="数据库账户密码" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="u8DataBaseServerHostField" promptText="192.168.1.1" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="u8DataBaseCatalogField" promptText="UF_DATA_001_2017" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="u8DataBaseUserNameField" promptText="sa" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<TextField fx:id="u8DataBasePasswordField" promptText="密码" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||
<Label text="数据库名称" GridPane.rowIndex="2"/>
|
||||
<Label text="数据库IP地址" GridPane.rowIndex="1"/>
|
||||
<Label text="配置用友U8的数据库信息" GridPane.columnIndex="1"/>
|
||||
<Label text="数据库账户" GridPane.rowIndex="3"/>
|
||||
<Label text="数据库账户密码" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="u8DataBaseServerHostField" promptText="192.168.1.1"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="u8DataBaseCatalogField" promptText="UF_DATA_001_2017"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="u8DataBaseUserNameField" promptText="sa" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="u8DataBasePasswordField" promptText="密码" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="4"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</GridPane>
|
||||
</children>
|
||||
@@ -92,29 +107,36 @@
|
||||
<children>
|
||||
<GridPane AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="130.0" minWidth="130.0" prefWidth="130.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="428.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0" prefWidth="48.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="130.0" minWidth="130.0"
|
||||
prefWidth="130.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="428.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0"
|
||||
prefWidth="48.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="供应商的配置选项" GridPane.columnIndex="1" />
|
||||
<Label text="供应商文件夹" GridPane.rowIndex="1" />
|
||||
<Label text="供方调查评价表模板" GridPane.rowIndex="2" />
|
||||
<Label fx:id="vendorPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Label fx:id="vendorEvaluationFormTemplateLabel" text="\\\10.84.209.8\template.xls" textOverrun="CLIP" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<Button mnemonicParsing="false" onAction="#changeVendorPath" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<Button mnemonicParsing="false" onAction="#changeVendorEvaluationFormTemplate" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<Label text="供应商的配置选项" GridPane.columnIndex="1"/>
|
||||
<Label text="供应商文件夹" GridPane.rowIndex="1"/>
|
||||
<Label text="供方调查评价表模板" GridPane.rowIndex="2"/>
|
||||
<Label fx:id="vendorPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<Label fx:id="vendorEvaluationFormTemplateLabel" text="\\\10.84.209.8\template.xls"
|
||||
textOverrun="CLIP" wrapText="true" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="2"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeVendorPath" text="更换"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeVendorEvaluationFormTemplate"
|
||||
text="更换" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</GridPane>
|
||||
</children>
|
||||
@@ -125,33 +147,43 @@
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
|
||||
<children>
|
||||
<GridPane layoutX="100.0" layoutY="96.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<GridPane layoutX="100.0" layoutY="96.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="130.0" minWidth="130.0" prefWidth="130.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0" prefWidth="48.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="130.0" minWidth="130.0"
|
||||
prefWidth="130.0"/>
|
||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="48.0" minWidth="48.0"
|
||||
prefWidth="48.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="客户的配置选项" GridPane.columnIndex="1" />
|
||||
<Label text="客户的文件夹" GridPane.rowIndex="1" />
|
||||
<Label text="客户资信评估表模板" GridPane.rowIndex="2" />
|
||||
<Label text="销售台账目录" GridPane.rowIndex="3" />
|
||||
<Label fx:id="customerPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<Label fx:id="customerEvaluationFormTemplateLabel" text="\\\10.84.209.8\template.xls" textOverrun="CLIP" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerPath" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerEvaluationFormTemplate" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerSaleBookPath" text="更换" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<Label fx:id="customerSaleBookPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<Label text="客户的配置选项" GridPane.columnIndex="1"/>
|
||||
<Label text="客户的文件夹" GridPane.rowIndex="1"/>
|
||||
<Label text="客户资信评估表模板" GridPane.rowIndex="2"/>
|
||||
<Label text="销售台账目录" GridPane.rowIndex="3"/>
|
||||
<Label fx:id="customerPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
<Label fx:id="customerEvaluationFormTemplateLabel" text="\\\10.84.209.8\template.xls"
|
||||
textOverrun="CLIP" wrapText="true" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="2"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerPath" text="更换"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="1"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerEvaluationFormTemplate"
|
||||
text="更换" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
|
||||
<Button mnemonicParsing="false" onAction="#changeCustomerSaleBookPath" text="更换"
|
||||
GridPane.columnIndex="2" GridPane.rowIndex="3"/>
|
||||
<Label fx:id="customerSaleBookPathLabel" text="\\\10.84.209.8\" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="3"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</GridPane>
|
||||
</children>
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
package com.ecep.contract;
|
||||
|
||||
public enum ContractFileTypeGroup {
|
||||
/**
|
||||
* 普通文件
|
||||
*/
|
||||
GENERAL,
|
||||
/**
|
||||
* 申请文件
|
||||
*/
|
||||
REQUEST,
|
||||
/**
|
||||
* 审批文件
|
||||
*/
|
||||
APPROVAL,
|
||||
/**
|
||||
* 通知文件
|
||||
*/
|
||||
NOTICE,
|
||||
/**
|
||||
* 其他文件
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
package com.ecep.contract.constant;
|
||||
|
||||
public class ParamConstant {
|
||||
public static final String KEY_isNotNull = "isNotNull";
|
||||
public static final String KEY_lessThan = "lessThan";
|
||||
public static final String KEY_greaterThan = "greaterThan";
|
||||
public static final String KEY_between = "between";
|
||||
|
||||
public static final String KEY_equal = "equal";
|
||||
|
||||
public static final String KEY_OR = "or";
|
||||
public static final String KEY_AND = "and";
|
||||
public static final String KEY_SEARCH_TEXT = "searchText";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package com.ecep.contract.constant;
|
||||
|
||||
public class ServiceConstant {
|
||||
public static final String KEY_SEARCH_TEXT = "searchText";
|
||||
}
|
||||
|
||||
@@ -12,9 +12,17 @@ import lombok.EqualsAndHashCode;
|
||||
public class CloudYuVo extends CloudBasedVo implements CompanyBasedVo, Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer companyId;
|
||||
|
||||
/**
|
||||
* 公司对应供应商角色更新时间戳
|
||||
*/
|
||||
private LocalDate vendorUpdateDate;
|
||||
/**
|
||||
* 公司对应客户角色更新时间戳
|
||||
*/
|
||||
private LocalDate customerUpdateDate;
|
||||
/**
|
||||
* 云端最新更新时间
|
||||
*/
|
||||
private LocalDateTime cloudLatest;
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,30 +12,40 @@ public class CompanyBankAccountVo implements IdentityEntity, CompanyBasedVo, Ser
|
||||
private Integer id;
|
||||
/**
|
||||
* 公司id
|
||||
*
|
||||
*
|
||||
* @see CompanyVo
|
||||
*/
|
||||
private Integer companyId;
|
||||
/**
|
||||
* 银行id
|
||||
*
|
||||
*
|
||||
* @see BankVo
|
||||
*/
|
||||
private Integer bankId;
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
private String account;
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
private String openingBank;
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
private String account;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDate created;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private boolean active = false;
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private int version;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package com.ecep.contract.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.ecep.contract.model.IdentityEntity;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.ecep.contract.model.Voable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 合共供方名录的文件VO类
|
||||
*
|
||||
*
|
||||
* @see VendorApprovedVo
|
||||
* @see VendorApprovedItemVo
|
||||
*/
|
||||
@@ -34,4 +38,5 @@ public class VendorApprovedFileVo implements IdentityEntity, Serializable {
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import lombok.Data;
|
||||
|
||||
/**
|
||||
* 合格供方名录VO类
|
||||
* @see VendorApproved
|
||||
* @see VendorApprovedFileVo
|
||||
* @see VendorApprovedItemVo
|
||||
*/
|
||||
|
||||
@@ -2,14 +2,13 @@ package com.ecep.contract;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.MyRepository;
|
||||
import com.ecep.contract.model.Voable;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
@@ -54,8 +53,8 @@ public abstract class EntityService<T extends Voable<VO>, VO, ID> {
|
||||
|
||||
public Page<VO> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<T> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
spec = SpecificationUtils.and(spec, buildParameterSpecification(paramsNode));
|
||||
return findAll(spec, pageable).map(T::toVo);
|
||||
|
||||
@@ -9,13 +9,28 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.ds.contract.tasker.AbstContractRepairTasker;
|
||||
import com.ecep.contract.service.tasker.WebSocketServerTasker;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
/**
|
||||
* 用友U8系统-同步全量合同
|
||||
* 通过WebSocket与客户端进行通信,实现合同数据的全量同步
|
||||
*/
|
||||
public class ContractSyncAllTask extends AbstContractRepairTasker {
|
||||
public class ContractSyncAllTask extends AbstContractRepairTasker implements WebSocketServerTasker {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ContractSyncAllTask.class);
|
||||
|
||||
@Override
|
||||
public void init(JsonNode argsNode) {
|
||||
// 初始化任务参数
|
||||
// 在这个方法中可以解析argsNode获取客户端传递的参数
|
||||
updateTitle("初始化合同全量同步任务");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object execute(MessageHolder holder) throws Exception {
|
||||
repair(holder);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void repair(MessageHolder holder) {
|
||||
@@ -35,7 +50,7 @@ public class ContractSyncAllTask extends AbstContractRepairTasker {
|
||||
try {
|
||||
repairFromCMList(rs, subHolder);
|
||||
} catch (Exception e) {
|
||||
updateMessage(e.getMessage());
|
||||
subHolder.error(e.getMessage());
|
||||
logger.error("data = {}", rs, e);
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -27,7 +28,6 @@ import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.cloud.CloudInfo;
|
||||
import com.ecep.contract.cloud.CloudInfoRepository;
|
||||
import com.ecep.contract.cloud.u8.ctx.AbstractYongYouU8Ctx;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.company.service.CompanyService;
|
||||
import com.ecep.contract.ds.other.model.CloudYu;
|
||||
import com.ecep.contract.ds.company.model.Company;
|
||||
@@ -164,8 +164,8 @@ public class YongYouU8Service
|
||||
@Override
|
||||
public Page<CloudYuVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CloudYu> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
String searchText = paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText();
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
String searchText = paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText();
|
||||
spec = getSpecification(searchText);
|
||||
}
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "company");
|
||||
@@ -263,7 +263,7 @@ public class YongYouU8Service
|
||||
} else {
|
||||
cloudYu.setCompany(null);
|
||||
}
|
||||
cloudYu.setActive(vo.isActive());
|
||||
cloudYu.setVersion(vo.getVersion());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ecep.contract.ds.company.model;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.model.Bank;
|
||||
@@ -9,17 +10,11 @@ import com.ecep.contract.model.Voable;
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.CompanyBankAccountVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -56,6 +51,24 @@ public class CompanyBankAccount implements IdentityEntity, BasedEntity, CompanyB
|
||||
@Column(name = "DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "CREATED")
|
||||
private LocalDate created;
|
||||
|
||||
/**
|
||||
* 启用
|
||||
*/
|
||||
@Column(name = "ACTIVE")
|
||||
private boolean active = false;
|
||||
|
||||
@Version
|
||||
@ColumnDefault("0")
|
||||
@Column(name = "VERSION", nullable = false)
|
||||
@ToString.Exclude
|
||||
private int version;
|
||||
|
||||
@Override
|
||||
public String toPrettyString() {
|
||||
return account;
|
||||
@@ -85,7 +98,9 @@ public class CompanyBankAccount implements IdentityEntity, BasedEntity, CompanyB
|
||||
vo.setAccount(getAccount());
|
||||
vo.setOpeningBank(getOpeningBank());
|
||||
vo.setDescription(getDescription());
|
||||
vo.setActive(false); // 默认值
|
||||
vo.setCreated(getCreated());
|
||||
vo.setActive(isActive()); // 默认值
|
||||
vo.setVersion(getVersion());
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ecep.contract.ds.company.service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -56,6 +57,7 @@ public class CompanyBankAccountService implements IEntityService<CompanyBankAcco
|
||||
account = new CompanyBankAccount();
|
||||
account.setCompany(company);
|
||||
account.setAccount(bankAccount);
|
||||
account.setCreated(LocalDate.now());
|
||||
holder.info("新增银行账户" + bankAccount);
|
||||
modified = true;
|
||||
}
|
||||
@@ -87,7 +89,7 @@ public class CompanyBankAccountService implements IEntityService<CompanyBankAcco
|
||||
public CompanyBankAccountVo findById(Integer id) {
|
||||
return repository.findById(id).map(CompanyBankAccount::toVo).orElse(null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CompanyBankAccount getById(Integer id) {
|
||||
return repository.findById(id).orElse(null);
|
||||
@@ -148,26 +150,27 @@ public class CompanyBankAccountService implements IEntityService<CompanyBankAcco
|
||||
if (vo == null) {
|
||||
throw new ServiceException("CompanyBankAccountVo cannot be null");
|
||||
}
|
||||
|
||||
|
||||
// 基本属性映射
|
||||
model.setAccount(vo.getAccount());
|
||||
model.setOpeningBank(vo.getOpeningBank());
|
||||
model.setDescription(vo.getDescription());
|
||||
|
||||
|
||||
// 处理关联关系 - 公司
|
||||
if (vo.getCompanyId() != null) {
|
||||
model.setCompany(SpringApp.getBean(CompanyService.class).getById(vo.getCompanyId()));
|
||||
} else {
|
||||
model.setCompany(null);
|
||||
}
|
||||
|
||||
|
||||
// 处理关联关系 - 银行
|
||||
if (vo.getBankId() != null) {
|
||||
model.setBank(SpringApp.getBean(BankService.class).getById(vo.getBankId()));
|
||||
} else {
|
||||
model.setBank(null);
|
||||
}
|
||||
|
||||
// 注意:CompanyBankAccount实体类中没有active字段,所以不需要设置
|
||||
|
||||
model.setCreated(vo.getCreated());
|
||||
model.setActive(vo.isActive());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.ds.company.service;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.vo.CompanyVo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -21,7 +22,6 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.company.repository.CompanyExtendInfoRepository;
|
||||
import com.ecep.contract.ds.company.model.Company;
|
||||
import com.ecep.contract.ds.company.model.CompanyExtendInfo;
|
||||
@@ -71,8 +71,8 @@ public class CompanyExtendInfoService implements IEntityService<CompanyExtendInf
|
||||
@Override
|
||||
public Page<CompanyExtendInfoVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyExtendInfo> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "company");
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.function.Consumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -33,7 +34,6 @@ import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.CloudServiceConstant;
|
||||
import com.ecep.contract.constant.CompanyConstant;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.company.repository.CompanyFileRepository;
|
||||
import com.ecep.contract.ds.contract.service.ContractService;
|
||||
import com.ecep.contract.ds.company.model.Company;
|
||||
@@ -151,7 +151,6 @@ public class CompanyFileService
|
||||
*
|
||||
* @param company 检查的公司对象
|
||||
* @param verifyDate 检查日期
|
||||
* @param status 状态输出
|
||||
* @see CompanyFile
|
||||
* @see CompanyFileType
|
||||
*/
|
||||
@@ -437,8 +436,8 @@ public class CompanyFileService
|
||||
@Override
|
||||
public Page<CompanyFileVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyFile> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
spec = SpecificationUtils.and(spec, buildParameterSpecification(paramsNode));
|
||||
return findAll(spec, pageable).map(CompanyFile::toVo);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.ecep.contract.ds.company.service;
|
||||
|
||||
import com.ecep.contract.CompanyFileType;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.service.VoableService;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
@@ -53,8 +53,8 @@ public class CompanyFileTypeService
|
||||
@Override
|
||||
public Page<CompanyFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.Message;
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -217,8 +217,8 @@ public class CompanyOldNameService implements IEntityService<CompanyOldName>, Qu
|
||||
@Override
|
||||
public Page<CompanyOldNameVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyOldName> spec = null;
|
||||
if (paramsNode.has("searchText")) {
|
||||
spec = getSpecification(paramsNode.get("searchText").asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
if (paramsNode.has("company")) {
|
||||
JsonNode param = paramsNode.get("company");
|
||||
@@ -235,6 +235,7 @@ public class CompanyOldNameService implements IEntityService<CompanyOldName>, Qu
|
||||
});
|
||||
}
|
||||
}
|
||||
spec = SpecificationUtils.andFieldEqualParam(spec, paramsNode, "name", "ambiguity", "beginDate", "endDate");
|
||||
return findAll(spec, pageable).map(CompanyOldName::toVo);
|
||||
}
|
||||
|
||||
@@ -245,7 +246,7 @@ public class CompanyOldNameService implements IEntityService<CompanyOldName>, Qu
|
||||
companyOldName.setAmbiguity(ambiguity);
|
||||
return companyOldName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateByVo(CompanyOldName model, CompanyOldNameVo vo) {
|
||||
model.setCompanyId(vo.getCompanyId());
|
||||
@@ -255,9 +256,9 @@ public class CompanyOldNameService implements IEntityService<CompanyOldName>, Qu
|
||||
model.setAmbiguity(vo.isAmbiguity());
|
||||
model.setPath(vo.getPath());
|
||||
model.setMemo(vo.getMemo());
|
||||
|
||||
|
||||
if (model.getVersion() != vo.getVersion()) {
|
||||
logger.warn("CompanyOldName version not equal, id: {}, version: {}, vo version: {}",
|
||||
logger.warn("CompanyOldName version not equal, id: {}, version: {}, vo version: {}",
|
||||
model.getId(), model.getVersion(), vo.getVersion());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -19,7 +20,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.ContractFileType;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.contract.repository.ContractFileTypeLocalRepository;
|
||||
import com.ecep.contract.model.ContractFileTypeLocal;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -41,8 +41,8 @@ public class ContractFileTypeService
|
||||
@Override
|
||||
public Page<ContractFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ContractFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.contract.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -17,7 +18,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.contract.repository.ContractGroupRepository;
|
||||
import com.ecep.contract.model.ContractGroup;
|
||||
import com.ecep.contract.service.VoableService;
|
||||
@@ -57,8 +57,8 @@ public class ContractGroupService implements IEntityService<ContractGroup>, Quer
|
||||
@Override
|
||||
public Page<ContractGroupVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ContractGroup> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
return findAll(spec, pageable).map(ContractGroup::toVo);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.contract.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.vo.ContractVo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -21,7 +22,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.contract.repository.ContractItemRepository;
|
||||
import com.ecep.contract.ds.other.service.EmployeeService;
|
||||
import com.ecep.contract.ds.other.service.InventoryService;
|
||||
@@ -95,8 +95,8 @@ public class ContractItemService implements IEntityService<ContractItem>, QueryS
|
||||
@Override
|
||||
public Page<ContractItemVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ContractItem> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "contract", "inventory", "creator", "updater");
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ecep.contract.ds.customer.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.criteria.Path;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -19,7 +19,6 @@ import org.springframework.stereotype.Service;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.customer.repository.CompanyCustomerEvaluationFormFileRepository;
|
||||
import com.ecep.contract.ds.customer.model.CompanyCustomer;
|
||||
import com.ecep.contract.ds.customer.model.CompanyCustomerEvaluationFormFile;
|
||||
@@ -95,8 +94,8 @@ public class CompanyCustomerEvaluationFormFileService
|
||||
@Override
|
||||
public Page<CompanyCustomerEvaluationFormFile> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyCustomerEvaluationFormFile> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("customer")) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.ds.company.service.HolidayService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -27,8 +28,6 @@ import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.CompanyCustomerConstant;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.company.service.CompanyBasicService;
|
||||
import com.ecep.contract.ds.contract.service.ContractService;
|
||||
import com.ecep.contract.ds.customer.repository.CompanyCustomerEvaluationFormFileRepository;
|
||||
import com.ecep.contract.ds.customer.repository.CompanyCustomerFileRepository;
|
||||
@@ -108,8 +107,8 @@ public class CompanyCustomerFileService
|
||||
@Override
|
||||
public Page<CompanyCustomerFile> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyCustomerFile> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "customer");
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.ds.customer.service;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
@@ -17,7 +18,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.CustomerFileType;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.customer.repository.CompanyCustomerFileTypeLocalRepository;
|
||||
import com.ecep.contract.ds.customer.model.CompanyCustomerFileTypeLocal;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -49,8 +49,8 @@ public class CompanyCustomerFileTypeService implements IEntityService<CompanyCus
|
||||
@Override
|
||||
public Page<CompanyCustomerFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyCustomerFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ecep.contract.ds.customer.service;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.ds.customer.repository.CustomerCatalogRepository;
|
||||
import com.ecep.contract.model.CustomerCatalog;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -114,8 +114,8 @@ public class CustomerCatalogService implements IEntityService<CustomerCatalog>,
|
||||
@Override
|
||||
public Page<CustomerCatalogVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CustomerCatalog> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
// 字段等值查询
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.ecep.contract.ds.customer.service;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -19,7 +19,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.CustomerFileType;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.customer.repository.CustomerFileTypeLocalRepository;
|
||||
import com.ecep.contract.model.CustomerFileTypeLocal;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
@@ -41,8 +40,8 @@ public class CustomerFileTypeService implements IEntityService<CustomerFileTypeL
|
||||
@Override
|
||||
public Page<CustomerFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CustomerFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -67,6 +67,12 @@ public class CloudYu implements IdentityEntity, Voable<CloudYuVo> {
|
||||
@Column(name = "CLOUD_LATEST")
|
||||
private LocalDateTime cloudLatest;
|
||||
|
||||
/**
|
||||
* 是否激活
|
||||
*/
|
||||
@Column(name = "ACTIVE")
|
||||
private boolean active = false;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@@ -105,7 +111,7 @@ public class CloudYu implements IdentityEntity, Voable<CloudYuVo> {
|
||||
vo.setCustomerUpdateDate(customerUpdateDate);
|
||||
vo.setCloudLatest(cloudLatest);
|
||||
vo.setVersion(version);
|
||||
// active字段默认为false,在CloudYuVo类中已经设置
|
||||
vo.setActive(active);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.project.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
@@ -15,7 +16,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.other.service.EmployeeService;
|
||||
import com.ecep.contract.ds.project.repository.CustomerSatisfactionSurveyRepository;
|
||||
import com.ecep.contract.ds.customer.model.CustomerSatisfactionSurvey;
|
||||
@@ -116,8 +116,8 @@ public class CustomerSatisfactionSurveyService
|
||||
@Override
|
||||
public Page<CustomerSatisfactionSurveyVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CustomerSatisfactionSurvey> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("project.customer")) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.project.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -17,7 +18,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.customer.service.CompanyCustomerEvaluationFormFileService;
|
||||
import com.ecep.contract.ds.other.service.EmployeeService;
|
||||
import com.ecep.contract.ds.project.repository.ProjectBidRepository;
|
||||
@@ -60,8 +60,8 @@ public class ProjectBidService implements IEntityService<ProjectBid>, QueryServi
|
||||
@Override
|
||||
public Page<ProjectBidVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectBid> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
// field
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.project.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -17,7 +18,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.other.service.InventoryService;
|
||||
import com.ecep.contract.ds.project.repository.ProjectCostItemRepository;
|
||||
import com.ecep.contract.ds.project.model.ProjectCost;
|
||||
@@ -59,8 +59,8 @@ public class ProjectCostItemService implements IEntityService<ProjectCostItem>,
|
||||
@Override
|
||||
public Page<ProjectCostItemVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectCostItem> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
// field
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.project.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.ds.contract.service.ContractService;
|
||||
import com.ecep.contract.ds.other.service.EmployeeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -19,7 +20,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.project.repository.ProjectCostRepository;
|
||||
import com.ecep.contract.ds.project.model.Project;
|
||||
import com.ecep.contract.ds.project.model.ProjectCost;
|
||||
@@ -61,8 +61,8 @@ public class ProjectCostService implements IEntityService<ProjectCost>, QuerySer
|
||||
@Override
|
||||
public Page<ProjectCostVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectCost> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
// field
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.ds.project.service;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -18,7 +19,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.ProjectFileType;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.project.repository.ProjectFileTypeLocalRepository;
|
||||
import com.ecep.contract.model.ProjectFileTypeLocal;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -41,8 +41,8 @@ public class ProjectFileTypeService
|
||||
@Override
|
||||
public Page<ProjectFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.ecep.contract.ds.project.service;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -79,8 +79,8 @@ public class ProjectIndustryService implements IEntityService<ProjectIndustry>,
|
||||
@Override
|
||||
public Page<ProjectIndustryVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectIndustry> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andFieldEqualParam(spec, paramsNode, "code", "name");
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.ds.project.service;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,7 +19,6 @@ import org.springframework.stereotype.Service;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.customer.service.CompanyCustomerEvaluationFormFileService;
|
||||
import com.ecep.contract.ds.other.service.EmployeeService;
|
||||
import com.ecep.contract.ds.project.repository.ProjectQuotationRepository;
|
||||
@@ -60,8 +60,8 @@ public class ProjectQuotationService implements IEntityService<ProjectQuotation>
|
||||
@Override
|
||||
public Page<ProjectQuotationVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectQuotation> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "project", "applicant", "authorizer");
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.ds.project.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -16,7 +17,6 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.project.repository.ProjectTypeRepository;
|
||||
import com.ecep.contract.model.ProjectType;
|
||||
import com.ecep.contract.service.VoableService;
|
||||
@@ -78,8 +78,8 @@ public class ProjectTypeService
|
||||
@Override
|
||||
public Page<ProjectTypeVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<ProjectType> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// field
|
||||
spec = SpecificationUtils.andFieldEqualParam(spec, paramsNode, "name", "code");
|
||||
|
||||
@@ -1,41 +1,64 @@
|
||||
package com.ecep.contract.ds.vendor.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.ds.vendor.repository.VendorApprovedFileRepository;
|
||||
import com.ecep.contract.model.VendorApproved;
|
||||
import com.ecep.contract.model.VendorApprovedFile;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
import com.ecep.contract.service.VoableService;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
import com.ecep.contract.vo.VendorApprovedFileVo;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.ds.vendor.repository.VendorApprovedFileRepository;
|
||||
import com.ecep.contract.model.VendorApproved;
|
||||
import com.ecep.contract.model.VendorApprovedFile;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
import com.ecep.contract.service.VoableService;
|
||||
import com.ecep.contract.vo.VendorApprovedFileVo;
|
||||
import java.util.List;
|
||||
|
||||
@Lazy
|
||||
@Service
|
||||
@CacheConfig(cacheNames = "vendor-approved-file")
|
||||
public class VendorApprovedFileService
|
||||
implements IEntityService<VendorApprovedFile>, VoableService<VendorApprovedFile, VendorApprovedFileVo> {
|
||||
implements IEntityService<VendorApprovedFile>, QueryService<VendorApprovedFileVo>, VoableService<VendorApprovedFile, VendorApprovedFileVo> {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private VendorApprovedFileRepository repository;
|
||||
|
||||
/**
|
||||
* 根据ID查找供应商已批准文件
|
||||
*
|
||||
*
|
||||
* @param id 文件ID
|
||||
* @return 找到的文件实体,如果不存在则返回null
|
||||
*/
|
||||
public VendorApprovedFile findById(Integer id) {
|
||||
return repository.findById(id).orElse(null);
|
||||
@Cacheable(key = "#p0")
|
||||
public VendorApprovedFileVo findById(Integer id) {
|
||||
return repository.findById(id).map(VendorApprovedFile::toVo).orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<VendorApprovedFileVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorApprovedFile> spec = null;
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "list");
|
||||
return findAll(spec, pageable).map(VendorApprovedFile::toVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(JsonNode paramsNode) {
|
||||
return repository.count();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VendorApprovedFile getById(Integer id) {
|
||||
return repository.findById(id).orElse(null);
|
||||
@@ -44,7 +67,7 @@ public class VendorApprovedFileService
|
||||
/**
|
||||
* 获取供应商已批准文件的查询规格
|
||||
* 根据搜索文本构建文件名和描述的模糊查询条件
|
||||
*
|
||||
*
|
||||
* @param searchText 搜索文本
|
||||
* @return 构建的查询规格
|
||||
*/
|
||||
@@ -59,7 +82,7 @@ public class VendorApprovedFileService
|
||||
|
||||
/**
|
||||
* 根据查询规格和分页参数获取供应商已批准文件列表
|
||||
*
|
||||
*
|
||||
* @param spec 查询规格
|
||||
* @param pageable 分页参数
|
||||
* @return 分页的文件列表
|
||||
@@ -71,7 +94,7 @@ public class VendorApprovedFileService
|
||||
|
||||
/**
|
||||
* 删除供应商已批准文件
|
||||
*
|
||||
*
|
||||
* @param entity 要删除的文件实体
|
||||
*/
|
||||
@Override
|
||||
@@ -81,7 +104,7 @@ public class VendorApprovedFileService
|
||||
|
||||
/**
|
||||
* 保存或更新供应商已批准文件
|
||||
*
|
||||
*
|
||||
* @param entity 要保存的文件实体
|
||||
* @return 保存后的文件实体
|
||||
*/
|
||||
@@ -92,7 +115,7 @@ public class VendorApprovedFileService
|
||||
|
||||
/**
|
||||
* 根据已批准列表和文件名查找特定文件
|
||||
*
|
||||
*
|
||||
* @param approvedList 已批准列表
|
||||
* @param name 文件名
|
||||
* @return 找到的文件实体
|
||||
@@ -103,7 +126,7 @@ public class VendorApprovedFileService
|
||||
|
||||
/**
|
||||
* 获取指定已批准列表下的所有文件
|
||||
*
|
||||
*
|
||||
* @param list 已批准列表实体
|
||||
* @return 该列表下的所有文件列表
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.ecep.contract.ds.vendor.service;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.data.domain.Page;
|
||||
@@ -101,10 +103,17 @@ public class VendorApprovedItemService
|
||||
@Override
|
||||
public Page<VendorApprovedItemVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorApprovedItem> spec = null;
|
||||
if (paramsNode.has("searchText")) {
|
||||
spec = getSpecification(paramsNode.get("searchText").asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// 添加额外的参数过滤
|
||||
if (paramsNode.has("type")) {
|
||||
String typeText = paramsNode.get("type").asText();
|
||||
VendorType type = VendorType.valueOf(typeText);
|
||||
spec = SpecificationUtils.and(spec, (root, query, builder) -> {
|
||||
return builder.equal(root.get("type"), type);
|
||||
});
|
||||
}
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "vendor", "list");
|
||||
return findAll(spec, pageable).map(VendorApprovedItem::toVo);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.ecep.contract.ds.vendor.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.service.SmbFileService;
|
||||
import com.hierynomus.smbj.common.SmbPath;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -74,8 +79,8 @@ public class VendorApprovedService implements IEntityService<VendorApproved>, Qu
|
||||
@Override
|
||||
public Page<VendorApprovedVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorApproved> spec = null;
|
||||
if (paramsNode.has("searchText")) {
|
||||
spec = getSpecification(paramsNode.get("searchText").asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// 添加额外的参数过滤
|
||||
spec = SpecificationUtils.andFieldEqualParam(spec, paramsNode, "title");
|
||||
@@ -220,6 +225,24 @@ public class VendorApprovedService implements IEntityService<VendorApproved>, Qu
|
||||
return vendorFile;
|
||||
}
|
||||
|
||||
public boolean existPath(Integer vendorApprovedId) {
|
||||
VendorApproved approved = getById(vendorApprovedId);
|
||||
if (approved == null) {
|
||||
return false;
|
||||
}
|
||||
String path = approved.getPath();
|
||||
if (!StringUtils.hasText(path)) {
|
||||
return false;
|
||||
}
|
||||
SmbFileService smbFileService = SpringApp.getBean(SmbFileService.class);
|
||||
SmbPath smbPath = SmbPath.parse(path);
|
||||
try {
|
||||
return smbFileService.exists(smbPath);
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateByVo(VendorApproved model, VendorApprovedVo vo) {
|
||||
if (model == null) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ecep.contract.ds.vendor.service;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -14,7 +15,6 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.vendor.repository.VendorClassRepository;
|
||||
import com.ecep.contract.model.VendorCatalog;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -39,8 +39,8 @@ public class VendorCatalogService implements IEntityService<VendorCatalog>, Quer
|
||||
@Override
|
||||
public Page<VendorCatalogVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorCatalog> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
// field
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -82,8 +83,8 @@ public class VendorFileService
|
||||
@Override
|
||||
public Page<VendorFile> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorFile> spec = null;
|
||||
if (paramsNode.has("searchText")) {
|
||||
spec = getSpecification(paramsNode.get("searchText").asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// 添加额外的参数过滤
|
||||
if (paramsNode.has("type")) {
|
||||
@@ -91,6 +92,7 @@ public class VendorFileService
|
||||
spec = SpecificationUtils.and(spec, (root, query, builder) -> builder.equal(root.get("type"), type));
|
||||
}
|
||||
spec = SpecificationUtils.andFieldEqualParam(spec, paramsNode, "valid");
|
||||
spec = SpecificationUtils.andFieldBetweenParam(spec, paramsNode, "signDate", LocalDate.class);
|
||||
spec = SpecificationUtils.andParam(spec, paramsNode, "vendor");
|
||||
return findAll(spec, pageable);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.ecep.contract.ds.vendor.service;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -20,7 +20,6 @@ import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.VendorFileType;
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.vendor.repository.VendorFileTypeLocalRepository;
|
||||
import com.ecep.contract.model.VendorFileTypeLocal;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -45,8 +44,8 @@ public class VendorFileTypeService implements IEntityService<VendorFileTypeLocal
|
||||
@Override
|
||||
public Page<VendorFileTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorFileTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import com.ecep.contract.vo.CompanyVo;
|
||||
import com.ecep.contract.vo.VendorCatalogVo;
|
||||
import org.hibernate.Hibernate;
|
||||
@@ -35,7 +36,6 @@ import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.VendorFileType;
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.constant.CompanyVendorConstant;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.company.service.CompanyBasicService;
|
||||
import com.ecep.contract.ds.company.service.CompanyContactService;
|
||||
import com.ecep.contract.ds.other.service.SysConfService;
|
||||
@@ -115,8 +115,8 @@ public class VendorService extends CompanyBasicService
|
||||
@Override
|
||||
public Page<VendorVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<Vendor> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
// 添加额外的参数过滤
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ecep.contract.ds.vendor.service;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ecep.contract.constant.ParamConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -18,7 +19,6 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.QueryService;
|
||||
import com.ecep.contract.VendorType;
|
||||
import com.ecep.contract.constant.ServiceConstant;
|
||||
import com.ecep.contract.ds.vendor.repository.VendorTypeLocalRepository;
|
||||
import com.ecep.contract.model.VendorTypeLocal;
|
||||
import com.ecep.contract.service.ServiceException;
|
||||
@@ -39,8 +39,8 @@ public class VendorTypeService implements IEntityService<VendorTypeLocal>, Query
|
||||
@Override
|
||||
public Page<VendorTypeLocalVo> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<VendorTypeLocal> spec = null;
|
||||
if (paramsNode.has(ServiceConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ServiceConstant.KEY_SEARCH_TEXT).asText());
|
||||
if (paramsNode.has(ParamConstant.KEY_SEARCH_TEXT)) {
|
||||
spec = getSpecification(paramsNode.get(ParamConstant.KEY_SEARCH_TEXT).asText());
|
||||
}
|
||||
|
||||
if (paramsNode.has("type")) {
|
||||
|
||||
131
server/src/main/java/com/ecep/contract/ds/vendor/task/VendorApprovedListMakePathTask.java
vendored
Normal file
131
server/src/main/java/com/ecep/contract/ds/vendor/task/VendorApprovedListMakePathTask.java
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
package com.ecep.contract.ds.vendor.task;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.model.VendorApproved;
|
||||
import com.ecep.contract.service.SmbFileService;
|
||||
import com.hierynomus.smbj.common.SmbPath;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.ds.vendor.service.VendorApprovedService;
|
||||
import com.ecep.contract.service.tasker.WebSocketServerTasker;
|
||||
import com.ecep.contract.ui.Tasker;
|
||||
import com.ecep.contract.util.FileUtils;
|
||||
import com.ecep.contract.vo.VendorApprovedVo;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
/**
|
||||
* 合格供方名录生成路径任务
|
||||
* 用于为合格供方名录生成文件保存路径
|
||||
*/
|
||||
public class VendorApprovedListMakePathTask extends Tasker<Object> implements WebSocketServerTasker {
|
||||
private final Logger logger = LoggerFactory.getLogger(VendorApprovedListMakePathTask.class);
|
||||
|
||||
private VendorApprovedService vendorApprovedService;
|
||||
private SmbFileService smbFileService;
|
||||
|
||||
private VendorApproved vendorApproved;
|
||||
private int vendorApprovedId;
|
||||
|
||||
protected boolean modified = false;
|
||||
|
||||
@Override
|
||||
public void init(JsonNode argsNode) {
|
||||
vendorApprovedId = argsNode.get(0).asInt();
|
||||
vendorApprovedService = getCachedBean(VendorApprovedService.class);
|
||||
smbFileService = getCachedBean(SmbFileService.class);
|
||||
vendorApproved = vendorApprovedService.getById(vendorApprovedId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object execute(MessageHolder holder) throws Exception {
|
||||
holder.info("开始为合格供方名录生成文件路径...");
|
||||
updateProgress(0, 100);
|
||||
|
||||
if (vendorApproved == null) {
|
||||
holder.error("找不到ID为 " + vendorApprovedId + " 的合格供方名录");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 检查是否已有路径
|
||||
if (StringUtils.hasText(vendorApproved.getPath())) {
|
||||
SmbPath smbPath = SmbPath.parse(vendorApproved.getPath());
|
||||
if (smbFileService.exists(smbPath)) {
|
||||
holder.info("合格供方名录文件路径已存在: " + vendorApproved.getPath());
|
||||
updateProgress(100, 100);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
updateProgress(30, 100);
|
||||
|
||||
// 生成文件路径
|
||||
String newPath = generateFilePath(vendorApproved);
|
||||
holder.info("新的文件路径: " + newPath);
|
||||
SmbPath smbPath = SmbPath.parse(newPath);
|
||||
boolean folderExists = false;
|
||||
try {
|
||||
folderExists = smbFileService.exists(smbPath);
|
||||
} catch (IOException e) {
|
||||
holder.error("检查文件路径时出错: " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
updateProgress(60, 100);
|
||||
if (folderExists) {
|
||||
holder.info("文件路径已存在: " + newPath);
|
||||
String uncPath = smbPath.toUncPath();
|
||||
if (Objects.equals(vendorApproved.getPath(), uncPath)) {
|
||||
holder.debug("文件路径未更新");
|
||||
} else {
|
||||
// 更新数据库记录
|
||||
vendorApproved.setPath(uncPath);
|
||||
vendorApprovedService.save(vendorApproved);
|
||||
holder.info("文件路径已更新");
|
||||
modified = true;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
smbFileService.mkdir(smbPath);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
String uncPath = smbPath.toUncPath();
|
||||
holder.info("已创建文件路径: " + uncPath);
|
||||
// 更新数据库记录
|
||||
vendorApproved.setPath(newPath);
|
||||
vendorApprovedService.save(vendorApproved);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
updateProgress(100, 100);
|
||||
holder.info("合格供方名录文件路径生成完成");
|
||||
updateProperty("modified", modified);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 为合格供方名录生成文件路径
|
||||
*
|
||||
* @param vendorApproved 合格供方名录对象
|
||||
* @return 生成的文件路径
|
||||
*/
|
||||
protected String generateFilePath(VendorApproved vendorApproved) {
|
||||
// 基础路径可以配置或从系统中获取
|
||||
File basePath = vendorApprovedService.getBasePath(); // 这里使用工具类获取基础路径
|
||||
|
||||
String title = vendorApproved.getTitle();
|
||||
String fileName = FileUtils.escapeFileName(title);
|
||||
|
||||
return new File(basePath, fileName).getAbsolutePath();
|
||||
}
|
||||
}
|
||||
@@ -590,14 +590,18 @@ public class SmbFileService implements DisposableBean {
|
||||
public void mkdir(java.io.File path) throws IOException {
|
||||
Objects.requireNonNull(path, "Path cannot be null");
|
||||
var smbPath = SmbPath.parse(path.getAbsolutePath());
|
||||
mkdir(smbPath);
|
||||
}
|
||||
|
||||
executeSmbOperation(smbPath, (share, smbFilePath) -> {
|
||||
if (!share.folderExists(smbFilePath)) {
|
||||
share.mkdir(smbFilePath);
|
||||
log.debug("Created directory: {}", smbFilePath);
|
||||
public void mkdir(SmbPath smbPath) throws IOException {
|
||||
executeSmbOperation(smbPath, (share, path) -> {
|
||||
if (!share.folderExists(path)) {
|
||||
share.mkdir(path);
|
||||
log.debug("Created directory: {}", path);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,7 +113,7 @@ public class SpecificationUtils {
|
||||
}
|
||||
|
||||
|
||||
public static <T, Y extends Comparable<? super Y>> Specification<T> andFieldBetweenParam(Specification<T> spec, JsonNode paramsNode, String field, Class<Y> valyeType) {
|
||||
public static <T, Y extends Comparable<? super Y>> Specification<T> andFieldBetweenParam(Specification<T> spec, JsonNode paramsNode, String field, Class<Y> valueType) {
|
||||
if (paramsNode.has(field)) {
|
||||
JsonNode param = paramsNode.get(field);
|
||||
if (param.isObject()) {
|
||||
@@ -121,8 +121,8 @@ public class SpecificationUtils {
|
||||
JsonNode endNode = param.get("end");
|
||||
|
||||
ObjectMapper objectMapper = SpringApp.getBean(ObjectMapper.class);
|
||||
Y begin = objectMapper.convertValue(beginNode, valyeType);
|
||||
Y end = objectMapper.convertValue(endNode, valyeType);
|
||||
Y begin = objectMapper.convertValue(beginNode, valueType);
|
||||
Y end = objectMapper.convertValue(endNode, valueType);
|
||||
|
||||
spec = SpecificationUtils.and(spec, (root, query, builder) -> {
|
||||
return builder.between(root.get(field), begin, end);
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
"VendorClassSyncTask": "com.ecep.contract.cloud.u8.VendorClassSyncTask",
|
||||
"ContractKindSyncTask": "com.ecep.contract.cloud.u8.ContractKindSyncTask",
|
||||
"ContractTypeSyncTask": "com.ecep.contract.cloud.u8.ContractTypeSyncTask",
|
||||
"ContractGroupSyncTask": "com.ecep.contract.cloud.u8.ContractGroupSyncTask"
|
||||
"ContractGroupSyncTask": "com.ecep.contract.cloud.u8.ContractGroupSyncTask",
|
||||
"ContractSyncAllTask": "com.ecep.contract.cloud.u8.ContractSyncAllTask",
|
||||
"VendorApprovedListMakePathTask": "com.ecep.contract.ds.vendor.task.VendorApprovedListMakePathTask"
|
||||
},
|
||||
"descriptions": "任务注册信息, 客户端的任务可以通过 WebSocket 调用"
|
||||
}
|
||||
Reference in New Issue
Block a user