拆分模块
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
package com.ecep.contract.ds.contract;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import com.ecep.contract.ds.contract.service.ContractService;
|
||||||
|
import com.ecep.contract.model.Contract;
|
||||||
|
import com.ecep.contract.util.EntityStringConverter;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Component
|
||||||
|
public class ContractStringConverter extends EntityStringConverter<Contract> {
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
ContractService service;
|
||||||
|
|
||||||
|
public ContractStringConverter() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
private void init() {
|
||||||
|
setInitialized(project -> service.findById(project.getId()));
|
||||||
|
setSuggestion(service::search);
|
||||||
|
// TODO 按名称找出,容易出问题
|
||||||
|
setFromString(service::findByName);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.ecep.contract.ds.project.service;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import com.ecep.contract.model.Project;
|
||||||
|
import com.ecep.contract.util.EntityStringConverter;
|
||||||
|
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Component
|
||||||
|
public class ProjectStringConverter extends EntityStringConverter<Project> {
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private ProjectService service;
|
||||||
|
|
||||||
|
|
||||||
|
public ProjectStringConverter() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
private void init() {
|
||||||
|
setInitialized(project -> service.findById(project.getId()));
|
||||||
|
setSuggestion(service::search);
|
||||||
|
setFromString(service::findByName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
|
public class CompanyCustomerEntityService {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
|
public class CompanyCustomerFileService {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.ecep.contract.constant;
|
||||||
|
|
||||||
|
public class CompanyCustomerCpnstant {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.ecep.contract.util;
|
||||||
|
|
||||||
|
public class CompanyUtils {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.ecep.contract.util;
|
||||||
|
|
||||||
|
public class FileUtils {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user