refactor: 移除Hibernate依赖并重构代理对象初始化检查逻辑
feat(controller): 新增多个任务类用于合同和客户相关操作 feat(service): 新增ProxyUtils工具类替代Hibernate.isInitialized检查 refactor(controller): 重构多个控制器和皮肤类,使用ProxyUtils替代Hibernate refactor(service): 重构服务类,移除Hibernate依赖并优化方法实现 fix(controller): 修复表格单元格初始化逻辑,确保代理对象正确加载 chore: 更新项目版本号至0.0.58-SNAPSHOT docs: 添加MyProperties类用于管理下载路径配置
This commit is contained in:
@@ -11,11 +11,22 @@ import com.ecep.contract.model.CloudRk;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.task.CloudRkSyncTask;
|
||||
import com.ecep.contract.vm.CloudRkViewModel;
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import javafx.concurrent.Task;
|
||||
import lombok.Data;
|
||||
|
||||
public class CloudRkService implements ViewModelService<CloudRk, CloudRkViewModel> {
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class EntInfo {
|
||||
@JsonAlias("entid")
|
||||
private String id;
|
||||
@JsonAlias("entname")
|
||||
private String name;
|
||||
private boolean nowName;
|
||||
}
|
||||
/**
|
||||
* 生成定时同步任务
|
||||
*
|
||||
@@ -32,7 +43,7 @@ public class CloudRkService implements ViewModelService<CloudRk, CloudRkViewMode
|
||||
}, 1, TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
public CloudRk updateCloudRk( Company company, MessageHolder holder) {
|
||||
public CloudRk updateCloudRk(Company company, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'updateCloudRk'");
|
||||
}
|
||||
|
||||
@@ -4,20 +4,31 @@ import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ecep.contract.model.Company;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.DesktopUtils;
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.constant.CloudServiceConstant;
|
||||
import com.ecep.contract.model.CloudTyc;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.util.UITools;
|
||||
import com.ecep.contract.vm.CloudTycInfoViewModel;
|
||||
|
||||
import javafx.application.Platform;
|
||||
|
||||
public class CloudTycService implements ViewModelService<CloudTyc, CloudTycInfoViewModel> {
|
||||
/**
|
||||
* 天眼查报告,文件名中必须包含 天眼查 字样
|
||||
*
|
||||
* @param fileName 文件名
|
||||
* @return 是否是天眼查报告
|
||||
*/
|
||||
public static boolean isTycReport(String fileName) {
|
||||
// 文件名中包含 天眼查 字样
|
||||
return fileName.contains(CloudServiceConstant.TYC_NAME);
|
||||
}
|
||||
|
||||
public void save(CloudTycInfoViewModel viewModel) {
|
||||
int infoId = viewModel.getId().get();
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
package com.ecep.contract.service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.ecep.contract.CompanyFileType;
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyFile;
|
||||
import com.ecep.contract.model.CompanyFileTypeLocal;
|
||||
import com.ecep.contract.vm.CompanyFileViewModel;
|
||||
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
public class CompanyFileService implements ViewModelService<CompanyFile, CompanyFileViewModel> {
|
||||
|
||||
public void reBuildingFiles(Company company, MessageHolder holder) {
|
||||
public boolean reBuildingFiles(Company company, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'reBuildingFiles'");
|
||||
}
|
||||
@@ -30,4 +36,19 @@ public class CompanyFileService implements ViewModelService<CompanyFile, Company
|
||||
throw new UnsupportedOperationException("Unimplemented method 'copyAsMatched'");
|
||||
}
|
||||
|
||||
public Map<? extends CompanyFileType, ? extends CompanyFileTypeLocal> findAllFileTypes(String languageTag) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllFileTypes'");
|
||||
}
|
||||
|
||||
public List<CompanyFile> findByCompany(Company company) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findByCompany'");
|
||||
}
|
||||
|
||||
public void copyAsMatchedByContract(Company parent, ObservableList<String> list) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'copyAsMatchedByContract'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ecep.contract.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,5 +55,10 @@ public class CompanyService implements ViewModelService<Company, CompanyViewMode
|
||||
throw new UnsupportedOperationException("Unimplemented method 'makePathAbsent'");
|
||||
}
|
||||
|
||||
public boolean retrieveFromDownloadFiles(Company company, File[] files, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'retrieveFromDownloadFiles'");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ecep.contract.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.ContractBidVendor;
|
||||
import com.ecep.contract.vm.ContractBidVendorViewModel;
|
||||
@@ -13,4 +14,9 @@ public class ContractBidVendorService implements ViewModelService<ContractBidVen
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findByContract'");
|
||||
}
|
||||
|
||||
public List<ContractBidVendor> findByContractAndCompany(Contract contract, Company company) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findByContractAndCompany'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,45 @@
|
||||
package com.ecep.contract.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ecep.contract.model.ContractItem;
|
||||
import com.ecep.contract.model.Inventory;
|
||||
import com.ecep.contract.vm.ContractItemViewModel;
|
||||
|
||||
@Service
|
||||
public class ContractItemService implements ViewModelService<ContractItem, ContractItemViewModel> {
|
||||
|
||||
@Override
|
||||
public ContractItem findById(Integer id) {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findById'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractItem save(ContractItem entity) {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'save'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(ContractItem entity) {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'delete'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContractItem> findAll() {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ContractItem> findAll(Map<String, Object> params, Pageable pageable) {
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
|
||||
}
|
||||
|
||||
public List<ContractItem> findAllByInventory(Inventory parent) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllByInventory'");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@ import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.ContractFile;
|
||||
import com.ecep.contract.model.ContractGroup;
|
||||
import com.ecep.contract.model.Project;
|
||||
import com.ecep.contract.vm.ContractViewModel;
|
||||
@@ -39,17 +41,16 @@ public class ContractService implements ViewModelService<Contract, ContractViewM
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllBySaleContract'");
|
||||
}
|
||||
|
||||
public boolean checkContractPathInBasePath(Contract v) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'checkContractPathInBasePath'");
|
||||
}
|
||||
public boolean checkContractPathInBasePath(Contract v) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'checkContractPathInBasePath'");
|
||||
}
|
||||
|
||||
public boolean existsContractPath(Contract v) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'existsContractPath'");
|
||||
}
|
||||
|
||||
|
||||
public boolean makePathAbsent(Contract contract) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'makePathAbsent'");
|
||||
@@ -70,13 +71,18 @@ public class ContractService implements ViewModelService<Contract, ContractViewM
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findSalesByProject'");
|
||||
}
|
||||
|
||||
public File getBasePath() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getBasePath'");
|
||||
}
|
||||
public File getBasePath() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getBasePath'");
|
||||
}
|
||||
|
||||
public List<Contract> findAllByProject(Project project) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'findAllByProject'");
|
||||
}
|
||||
|
||||
public void syncContractFile(ContractFile contractFile, File outputFile, MessageHolder holder) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'syncContractFile'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.controlsfx.control.TaskProgressView;
|
||||
|
||||
import com.ecep.contract.Desktop;
|
||||
import com.ecep.contract.model.CloudYu;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.task.ContractSyncTask;
|
||||
import com.ecep.contract.task.CustomerSyncTask;
|
||||
import com.ecep.contract.task.MonitoredTask;
|
||||
@@ -45,4 +46,9 @@ public class YongYouU8Service implements ViewModelService<CloudYu, CloudYuInfoVi
|
||||
}, 3, TimeUnit.HOURS.toSeconds(1), TimeUnit.SECONDS);
|
||||
|
||||
}
|
||||
|
||||
public CloudYu getOrCreateCloudYu(Company company) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getOrCreateCloudYu'");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user