CompanyVendor 改为 Vendor
This commit is contained in:
@@ -2,7 +2,6 @@ package com.ecep.contract.cloud.old;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.File;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
@@ -51,7 +50,7 @@ import com.ecep.contract.model.CompanyCustomer;
|
||||
import com.ecep.contract.model.CompanyCustomerFile;
|
||||
import com.ecep.contract.model.CompanyFile;
|
||||
import com.ecep.contract.model.CompanyOldName;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorFile;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.ContractFile;
|
||||
@@ -511,40 +510,41 @@ public class OldVersionService {
|
||||
if (type == Types.VENDOR) {
|
||||
String vendorType = (String) map.get("TYPE");
|
||||
boolean changed = false;
|
||||
CompanyVendor companyVendor = companyVendorRepository.findByCompany(updater).orElseGet(() -> {
|
||||
CompanyVendor vendor = new CompanyVendor();
|
||||
Vendor vendor = companyVendorRepository.findByCompany(updater).orElse(null);
|
||||
if (vendor == null) {
|
||||
vendor = new Vendor();
|
||||
vendor.setId(id);
|
||||
vendor.setCompany(updater);
|
||||
vendor.setCreated(LocalDateTime.now());
|
||||
return vendor;
|
||||
});
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(vendorType)) {
|
||||
VendorType t = VendorType.valueOf(vendorType);
|
||||
if (!Objects.equals(t, companyVendor.getType())) {
|
||||
companyVendor.setType(t);
|
||||
if (!Objects.equals(t, vendor.getType())) {
|
||||
vendor.setType(t);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (companyVendor.getCompany() == null) {
|
||||
companyVendor.setCompany(updater);
|
||||
if (vendor.getCompany() == null) {
|
||||
vendor.setCompany(updater);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (!Objects.equals(absolutePath, companyVendor.getPath())) {
|
||||
companyVendor.setPath(absolutePath);
|
||||
if (!Objects.equals(absolutePath, vendor.getPath())) {
|
||||
vendor.setPath(absolutePath);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
companyVendorRepository.save(companyVendor);
|
||||
companyVendorRepository.save(vendor);
|
||||
}
|
||||
|
||||
CompanyVendorFileService fileService = SpringApp.getBean(CompanyVendorFileService.class);
|
||||
|
||||
// 1. 先做数据库排重
|
||||
List<CompanyVendorFile> files = fileService.findAllByVendor(companyVendor);
|
||||
List<CompanyVendorFile> files = fileService.findAllByVendor(vendor);
|
||||
HashMap<String, CompanyVendorFile> fileMap = new HashMap<>();
|
||||
for (CompanyVendorFile vendorFile : files) {
|
||||
String key = vendorFile.getFilePath();
|
||||
@@ -587,7 +587,7 @@ public class OldVersionService {
|
||||
try {
|
||||
CompanyVendorFile vendorFile = new CompanyVendorFile();
|
||||
CompanyVendorFileUtils.applyVendorFileByMap(vendorFile, m);
|
||||
vendorFile.setVendor(companyVendor);
|
||||
vendorFile.setVendor(vendor);
|
||||
fileService.save(vendorFile);
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Create New CompanyVendorFile {}", vendorFile);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.cloud.u8;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
@@ -23,7 +22,7 @@ import com.ecep.contract.ds.vendor.service.CompanyVendorEntityService;
|
||||
import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.CloudYu;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
|
||||
import lombok.Setter;
|
||||
@@ -109,7 +108,7 @@ public class VendorSyncTask extends AbstContractRepairTasker {
|
||||
}
|
||||
|
||||
private void updateCloudYu(CompanyVendorEntity entity) {
|
||||
CompanyVendor vendor = entity.getVendor();
|
||||
Vendor vendor = entity.getVendor();
|
||||
if (vendor == null) {
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +131,7 @@ public class VendorSyncTask extends AbstContractRepairTasker {
|
||||
|
||||
private void updateCompanyNameAndAbbName(CompanyVendorEntity entity, MessageHolder holder) {
|
||||
CompanyService companyService = vendorCtx.getCompanyService();
|
||||
CompanyVendor vendor = entity.getVendor();
|
||||
Vendor vendor = entity.getVendor();
|
||||
if (vendor == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyCustomer;
|
||||
import com.ecep.contract.model.CompanyCustomerEntity;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
import com.ecep.contract.model.Employee;
|
||||
|
||||
@@ -145,7 +145,7 @@ public class AbstractYongYouU8Ctx extends AbstractCtx {
|
||||
if (entity == null) {
|
||||
holder.warn("无效" + topic + ":" + vendorCode);
|
||||
} else {
|
||||
CompanyVendor customer = entity.getVendor();
|
||||
Vendor customer = entity.getVendor();
|
||||
if (customer == null) {
|
||||
holder.warn("无效" + topic + ":" + vendorCode);
|
||||
} else {
|
||||
|
||||
@@ -37,7 +37,7 @@ import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyCustomer;
|
||||
import com.ecep.contract.model.CompanyCustomerEntity;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.ContractCatalog;
|
||||
@@ -343,7 +343,7 @@ public class ContractCtx extends AbstractYongYouU8Ctx {
|
||||
}
|
||||
entity = updateVendorEntityDetailByCode(entity, unit, holder);
|
||||
|
||||
CompanyVendor vendor = entity.getVendor();
|
||||
Vendor vendor = entity.getVendor();
|
||||
if (vendor == null) {
|
||||
if (company != null) {
|
||||
vendor = vendorService.findByCompany(company);
|
||||
@@ -365,7 +365,7 @@ public class ContractCtx extends AbstractYongYouU8Ctx {
|
||||
}
|
||||
}
|
||||
if (vendor == null) {
|
||||
vendor = new CompanyVendor();
|
||||
vendor = new Vendor();
|
||||
vendor.setCompany(company);
|
||||
vendorModified = true;
|
||||
}
|
||||
@@ -574,7 +574,7 @@ public class ContractCtx extends AbstractYongYouU8Ctx {
|
||||
return getContractService().findByCode(contractCode);
|
||||
}
|
||||
|
||||
public boolean syncByVendorEntity(CompanyVendor companyVendor, CompanyVendorEntity entity, MessageHolder holder) {
|
||||
public boolean syncByVendorEntity(Vendor vendor, CompanyVendorEntity entity, MessageHolder holder) {
|
||||
String code = entity.getCode();
|
||||
holder.debug("同步供应商相关项 " + code + "," + entity.getName() + " 的合同");
|
||||
if (!StringUtils.hasText(code)) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.ecep.contract.ds.contract.service.PurchaseBillVoucherService;
|
||||
import com.ecep.contract.ds.contract.service.PurchaseOrderItemService;
|
||||
import com.ecep.contract.ds.contract.service.PurchaseOrdersService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.Inventory;
|
||||
@@ -109,7 +109,7 @@ public class PurchaseBillVoucherCtx extends AbstractYongYouU8Ctx {
|
||||
Map<Integer, PurchaseBillVoucher> voucherMap = vouchers.stream()
|
||||
.collect(Collectors.toMap(PurchaseBillVoucher::getRefId, item -> item));
|
||||
|
||||
CompanyVendor vendor = getCompanyVendorService().findByCompany(company);
|
||||
Vendor vendor = getCompanyVendorService().findByCompany(company);
|
||||
if (vendor != null) {
|
||||
List<CompanyVendorEntity> entities = getCompanyVendorEntityService().findAllByVendor(vendor);
|
||||
holder.debug(company.getName() + " 有 "
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ecep.contract.cloud.u8.ctx;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@@ -19,7 +18,7 @@ import com.ecep.contract.ds.company.service.CompanyService;
|
||||
import com.ecep.contract.ds.vendor.service.CompanyVendorEntityService;
|
||||
import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
import com.ecep.contract.model.VendorCatalog;
|
||||
|
||||
@@ -132,7 +131,7 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
}
|
||||
|
||||
|
||||
CompanyVendor vendor = item.getVendor();
|
||||
Vendor vendor = item.getVendor();
|
||||
if (vendor == null) {
|
||||
// 如果没有关联供应商,则根据供应商名称或别名查找公司
|
||||
Company company = findOrCreateCompanyByVendorEntity(item, holder);
|
||||
@@ -193,14 +192,14 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
* @return 是否更新了供应商信息
|
||||
*/
|
||||
public boolean syncVendor(Company company, MessageHolder holder) {
|
||||
CompanyVendor companyVendor = getCompanyVendorService().findByCompany(company);
|
||||
if (companyVendor == null) {
|
||||
Vendor vendor = getCompanyVendorService().findByCompany(company);
|
||||
if (vendor == null) {
|
||||
holder.warn("供应商未创建, 如需要请手动创建.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检索相关项
|
||||
List<CompanyVendorEntity> entities = getCompanyVendorEntityService().findAllByVendor(companyVendor);
|
||||
List<CompanyVendorEntity> entities = getCompanyVendorEntityService().findAllByVendor(vendor);
|
||||
if (entities.isEmpty()) {
|
||||
holder.error("供应商关联任何相关项");
|
||||
return false;
|
||||
@@ -229,14 +228,14 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
}
|
||||
|
||||
// 更新供应商的开发日期
|
||||
if (updateVendorDevelopDate(companyVendor, entities, holder)) {
|
||||
companyVendor = getCompanyVendorService().save(companyVendor);
|
||||
if (updateVendorDevelopDate(vendor, entities, holder)) {
|
||||
vendor = getCompanyVendorService().save(vendor);
|
||||
updated = true;
|
||||
}
|
||||
|
||||
// 同步供应商关联的合同
|
||||
for (CompanyVendorEntity entity : entities) {
|
||||
if (getContractCtx().syncByVendorEntity(companyVendor, entity, holder)) {
|
||||
if (getContractCtx().syncByVendorEntity(vendor, entity, holder)) {
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +261,7 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
return modified;
|
||||
}
|
||||
|
||||
private boolean updateVendorDevelopDate(CompanyVendor companyVendor, List<CompanyVendorEntity> entities, MessageHolder holder) {
|
||||
private boolean updateVendorDevelopDate(Vendor vendor, List<CompanyVendorEntity> entities, MessageHolder holder) {
|
||||
LocalDate developDate = null;
|
||||
for (CompanyVendorEntity entity : entities) {
|
||||
// 取最早的开发日期
|
||||
@@ -270,7 +269,7 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
developDate = entity.getDevelopDate();
|
||||
}
|
||||
}
|
||||
return updateLocalDate(companyVendor::getDevelopDate, companyVendor::setDevelopDate, developDate, holder, "开发日期");
|
||||
return updateLocalDate(vendor::getDevelopDate, vendor::setDevelopDate, developDate, holder, "开发日期");
|
||||
}
|
||||
|
||||
public CompanyVendorEntity findOrCreateByCode(String venCode, MessageHolder subHolder) {
|
||||
@@ -285,7 +284,7 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
return entity;
|
||||
}
|
||||
|
||||
private CompanyVendor createVendorByVendorEntity(CompanyVendorEntity entity, MessageHolder holder) {
|
||||
private Vendor createVendorByVendorEntity(CompanyVendorEntity entity, MessageHolder holder) {
|
||||
LocalDate developDate = entity.getDevelopDate();
|
||||
if (developDate == null) {
|
||||
holder.warn(entity.getName() + " 没有设置开发日期,跳过");
|
||||
@@ -303,14 +302,14 @@ public class VendorCtx extends AbstractYongYouU8Ctx {
|
||||
return null;
|
||||
}
|
||||
|
||||
CompanyVendor companyVendor = new CompanyVendor();
|
||||
Vendor vendor = new Vendor();
|
||||
int nextId = SpringApp.getBean(OldVersionService.class).newCompanyVendor(entity.getName());
|
||||
companyVendor.setId(nextId);
|
||||
companyVendor.setCatalog(entity.getCatalog());
|
||||
companyVendor.setDevelopDate(developDate);
|
||||
vendor.setId(nextId);
|
||||
vendor.setCatalog(entity.getCatalog());
|
||||
vendor.setDevelopDate(developDate);
|
||||
holder.info("新供应商:" + entity.getName() + "分配编号:" + nextId);
|
||||
companyVendor.setCreated(LocalDateTime.now());
|
||||
return companyVendor;
|
||||
vendor.setCreated(LocalDateTime.now());
|
||||
return vendor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyCustomer;
|
||||
import com.ecep.contract.model.CompanyOldName;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.util.FileUtils;
|
||||
import com.ecep.contract.util.MyStringUtils;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
@@ -465,11 +465,11 @@ public class CompanyService extends EntityService<Company, Integer> implements I
|
||||
});
|
||||
}
|
||||
|
||||
List<CompanyVendor> searchedVendors = companyVendorService.search(searchText);
|
||||
List<Vendor> searchedVendors = companyVendorService.search(searchText);
|
||||
if (!searchedVendors.isEmpty()) {
|
||||
spec = SpecificationUtils.or(spec, (root, query, builder) -> {
|
||||
return builder.in(root.get("id")).value(searchedVendors.stream()
|
||||
.map(CompanyVendor::getCompany)
|
||||
.map(Vendor::getCompany)
|
||||
.filter(Objects::nonNull)
|
||||
.map(Company::getId)
|
||||
.collect(Collectors.toSet()));
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.Caching;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
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.stereotype.Service;
|
||||
@@ -33,12 +31,9 @@ import com.ecep.contract.ds.contract.repository.ContractRepository;
|
||||
import com.ecep.contract.ds.other.service.SysConfService;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyCustomer;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.Contract;
|
||||
import com.ecep.contract.model.ContractCatalog;
|
||||
import com.ecep.contract.model.ContractGroup;
|
||||
import com.ecep.contract.model.ContractKind;
|
||||
import com.ecep.contract.model.ContractType;
|
||||
import com.ecep.contract.model.Project;
|
||||
import com.ecep.contract.util.MyStringUtils;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
@@ -238,7 +233,7 @@ public class ContractService extends EntityService<Contract, Integer> implements
|
||||
};
|
||||
}
|
||||
|
||||
public List<Contract> findAllByCompanyVendor(CompanyVendor vendor, LocalDate beginDate, LocalDate endDate) {
|
||||
public List<Contract> findAllByCompanyVendor(Vendor vendor, LocalDate beginDate, LocalDate endDate) {
|
||||
Company company = vendor.getCompany();
|
||||
return contractRepository.findAll((root, query, cb) -> {
|
||||
Predicate p = cb.and(
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorApprovedItem;
|
||||
import com.ecep.contract.model.CompanyVendorApprovedList;
|
||||
|
||||
@@ -19,7 +19,7 @@ public interface CompanyVendorApprovedItemRepository extends
|
||||
|
||||
List<CompanyVendorApprovedItem> findAllByList(CompanyVendorApprovedList list);
|
||||
|
||||
List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList list, CompanyVendor vendor);
|
||||
List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList list, Vendor vendor);
|
||||
|
||||
CompanyVendorApprovedItem findByListAndVendor(CompanyVendorApprovedList list, CompanyVendor vendor);
|
||||
CompanyVendorApprovedItem findByListAndVendor(CompanyVendorApprovedList list, Vendor vendor);
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ import java.util.Optional;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ecep.contract.ds.MyRepository;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
|
||||
@Repository
|
||||
public interface CompanyVendorEntityRepository extends MyRepository<CompanyVendorEntity, Integer> {
|
||||
Optional<CompanyVendorEntity> findByCode(String code);
|
||||
|
||||
List<CompanyVendorEntity> findByVendor(CompanyVendor vendor);
|
||||
List<CompanyVendorEntity> findByVendor(Vendor vendor);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ecep.contract.VendorFileType;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorFile;
|
||||
|
||||
@Repository
|
||||
@@ -16,7 +16,7 @@ public interface CompanyVendorFileRepository
|
||||
|
||||
List<CompanyVendorFile> findAllByVendorId(int vendorId);
|
||||
|
||||
List<CompanyVendorFile> findAllByVendorAndType(CompanyVendor vendor, VendorFileType type);
|
||||
List<CompanyVendorFile> findAllByVendorAndType(Vendor vendor, VendorFileType type);
|
||||
|
||||
List<CompanyVendorFile> findByVendorId(int vendorId);
|
||||
}
|
||||
@@ -9,20 +9,20 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.ecep.contract.ds.MyRepository;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.VendorCatalog;
|
||||
|
||||
/**
|
||||
* 供应商 Repository
|
||||
*/
|
||||
@Repository
|
||||
public interface CompanyVendorRepository extends MyRepository<CompanyVendor, Integer> {
|
||||
public interface CompanyVendorRepository extends MyRepository<Vendor, Integer> {
|
||||
|
||||
List<CompanyVendor> findAllByCatalog(VendorCatalog catalog);
|
||||
List<Vendor> findAllByCatalog(VendorCatalog catalog);
|
||||
|
||||
List<CompanyVendor> findAllByCatalogId(Integer catalogId);
|
||||
List<Vendor> findAllByCatalogId(Integer catalogId);
|
||||
|
||||
Optional<CompanyVendor> findByCompany(Company company);
|
||||
Optional<Vendor> findByCompany(Company company);
|
||||
|
||||
@Modifying
|
||||
@Transactional
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.ecep.contract.ds.company.service.CompanyOldNameService;
|
||||
import com.ecep.contract.ds.vendor.repository.CompanyVendorApprovedItemRepository;
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.model.CompanyOldName;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorApprovedItem;
|
||||
import com.ecep.contract.model.CompanyVendorApprovedList;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CompanyVendorApprovedItemService implements IEntityService<CompanyV
|
||||
@Override
|
||||
public Specification<CompanyVendorApprovedItem> getSpecification(String searchText) {
|
||||
return (root, query, builder) -> {
|
||||
Path<CompanyVendor> vendor = root.get("vendor");
|
||||
Path<Vendor> vendor = root.get("vendor");
|
||||
Path<Company> company = vendor.get("company");
|
||||
|
||||
List<CompanyOldName> oldNames = companyOldNameService.search(searchText);
|
||||
@@ -95,7 +95,7 @@ public class CompanyVendorApprovedItemService implements IEntityService<CompanyV
|
||||
return findAll(spec, pageable);
|
||||
}
|
||||
|
||||
public List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList approvedList, CompanyVendor vendor) {
|
||||
public List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList approvedList, Vendor vendor) {
|
||||
return repository.findAllByListAndVendor(approvedList, vendor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.ecep.contract.IEntityService;
|
||||
import com.ecep.contract.ds.vendor.repository.CompanyVendorEntityRepository;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorEntity;
|
||||
import com.ecep.contract.util.SpecificationUtils;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
@@ -109,7 +109,7 @@ public class CompanyVendorEntityService implements IEntityService<CompanyVendorE
|
||||
return repository.save(entity);
|
||||
}
|
||||
|
||||
public List<CompanyVendorEntity> findAllByVendor(CompanyVendor vendor) {
|
||||
public List<CompanyVendorEntity> findAllByVendor(Vendor vendor) {
|
||||
return repository.findByVendor(vendor);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import com.ecep.contract.ds.company.service.CompanyBasicService;
|
||||
import com.ecep.contract.ds.contract.service.ContractFileService;
|
||||
import com.ecep.contract.ds.contract.service.ContractService;
|
||||
import com.ecep.contract.ds.vendor.repository.CompanyVendorFileRepository;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.model.CompanyVendorFile;
|
||||
import com.ecep.contract.model.Contract;
|
||||
|
||||
@@ -72,8 +72,8 @@ public class CompanyVendorFileService implements IEntityService<CompanyVendorFil
|
||||
return findAll(spec, pageable);
|
||||
}
|
||||
|
||||
public List<CompanyVendorFile> findAllByVendor(CompanyVendor companyVendor) {
|
||||
return repository.findAllByVendorId(companyVendor.getId());
|
||||
public List<CompanyVendorFile> findAllByVendor(Vendor vendor) {
|
||||
return repository.findAllByVendorId(vendor.getId());
|
||||
}
|
||||
|
||||
public void delete(CompanyVendorFile file) {
|
||||
@@ -96,18 +96,18 @@ public class CompanyVendorFileService implements IEntityService<CompanyVendorFil
|
||||
return repository.findAll(spec, sort);
|
||||
}
|
||||
|
||||
public List<CompanyVendorFile> findAllByVendorAndType(CompanyVendor vendor, VendorFileType type) {
|
||||
public List<CompanyVendorFile> findAllByVendorAndType(Vendor vendor, VendorFileType type) {
|
||||
return repository.findAllByVendorAndType(vendor, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证供应商文件
|
||||
*
|
||||
* @param companyVendor 供应商
|
||||
* @param vendor 供应商
|
||||
* @param verifyDate 验证日期
|
||||
* @param holder 状态输出
|
||||
*/
|
||||
public void verify(CompanyVendor companyVendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
public void verify(Vendor vendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
// 验证最早日期,之前属于历史问题,不做处理
|
||||
LocalDate minDate = LocalDate.of(2022, 1, 1);
|
||||
if (verifyDate.isBefore(minDate)) {
|
||||
@@ -115,7 +115,7 @@ public class CompanyVendorFileService implements IEntityService<CompanyVendorFil
|
||||
}
|
||||
|
||||
// 查询所有评价表
|
||||
List<CompanyVendorFile> files = findAllByVendorAndType(companyVendor, VendorFileType.EvaluationForm);
|
||||
List<CompanyVendorFile> files = findAllByVendorAndType(vendor, VendorFileType.EvaluationForm);
|
||||
if (files == null || files.isEmpty()) {
|
||||
holder.error("未见供应商评价");
|
||||
return;
|
||||
@@ -146,21 +146,21 @@ public class CompanyVendorFileService implements IEntityService<CompanyVendorFil
|
||||
/**
|
||||
* 根据合同 和 评价表情况计算下一个评价日期
|
||||
*
|
||||
* @param companyVendor 供应商
|
||||
* @param vendor 供应商
|
||||
* @return 下一个评价日期
|
||||
*/
|
||||
public LocalDate getNextSignDate(CompanyVendor companyVendor, Consumer<String> state) {
|
||||
public LocalDate getNextSignDate(Vendor vendor, Consumer<String> state) {
|
||||
LocalDate miniContractDate = LocalDate.of(2022, 1, 1);
|
||||
|
||||
// 检索全部合同
|
||||
ContractService contractService = SpringApp.getBean(ContractService.class);
|
||||
List<Contract> contractList = contractService.findAllByCompanyVendor(companyVendor, null, null);
|
||||
List<Contract> contractList = contractService.findAllByCompanyVendor(vendor, null, null);
|
||||
if (contractList.isEmpty()) {
|
||||
state.accept("未发现已登记的合同");
|
||||
return null;
|
||||
}
|
||||
// 检索评价表
|
||||
List<CompanyVendorFile> files = findAllByVendorAndType(companyVendor, VendorFileType.EvaluationForm);
|
||||
List<CompanyVendorFile> files = findAllByVendorAndType(vendor, VendorFileType.EvaluationForm);
|
||||
CompanyVendorFile latestFile = files.stream()
|
||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||
.max(Comparator.comparing(CompanyVendorFile::getSignDate))
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@CacheConfig(cacheNames = CompanyVendorConstant.CACHE_NAME)
|
||||
public class CompanyVendorService extends CompanyBasicService
|
||||
implements IEntityService<CompanyVendor>, QueryService<CompanyVendor> {
|
||||
implements IEntityService<Vendor>, QueryService<Vendor> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CompanyVendorService.class);
|
||||
|
||||
@@ -63,17 +63,17 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
private VendorClassRepository vendorClassRepository;
|
||||
|
||||
@Cacheable(key = "#p0")
|
||||
public CompanyVendor findById(Integer id) {
|
||||
public Vendor findById(Integer id) {
|
||||
return companyVendorRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
public Page<CompanyVendor> findAll(Specification<CompanyVendor> spec, Pageable pageable) {
|
||||
public Page<Vendor> findAll(Specification<Vendor> spec, Pageable pageable) {
|
||||
return companyVendorRepository.findAll(spec, pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<CompanyVendor> findAll(JsonNode paramsNode, Pageable pageable) {
|
||||
Specification<CompanyVendor> spec = null;
|
||||
public Page<Vendor> 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());
|
||||
}
|
||||
@@ -86,31 +86,31 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return findAll(spec, pageable);
|
||||
}
|
||||
|
||||
public CompanyVendor findByCompany(Company company) {
|
||||
public Vendor findByCompany(Company company) {
|
||||
return companyVendorRepository.findByCompany(company).orElse(null);
|
||||
}
|
||||
|
||||
@Caching(evict = {
|
||||
@CacheEvict(key = "#p0.id")
|
||||
})
|
||||
public CompanyVendor save(CompanyVendor companyVendor) {
|
||||
return companyVendorRepository.save(companyVendor);
|
||||
public Vendor save(Vendor vendor) {
|
||||
return companyVendorRepository.save(vendor);
|
||||
}
|
||||
|
||||
@Caching(evict = {
|
||||
@CacheEvict(key = "#p0.id")
|
||||
})
|
||||
@Override
|
||||
public void delete(CompanyVendor entity) {
|
||||
public void delete(Vendor entity) {
|
||||
companyVendorRepository.delete(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Specification<CompanyVendor> getSpecification(String searchText) {
|
||||
public Specification<Vendor> getSpecification(String searchText) {
|
||||
if (!StringUtils.hasText(searchText)) {
|
||||
return null;
|
||||
}
|
||||
Specification<CompanyVendor> nameSpec = (root, query, builder) -> {
|
||||
Specification<Vendor> nameSpec = (root, query, builder) -> {
|
||||
Path<Company> company = root.get("company");
|
||||
return companyService.buildSearchPredicate(searchText, company, query, builder);
|
||||
};
|
||||
@@ -131,7 +131,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return builder.in(root.get("id")).value(searched.stream()
|
||||
.map(CompanyVendorEntity::getVendor)
|
||||
.filter(Objects::nonNull)
|
||||
.map(CompanyVendor::getId)
|
||||
.map(Vendor::getId)
|
||||
.collect(Collectors.toSet()));
|
||||
});
|
||||
}
|
||||
@@ -139,8 +139,8 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompanyVendor> search(String searchText) {
|
||||
Specification<CompanyVendor> spec = getSpecification(searchText);
|
||||
public List<Vendor> search(String searchText) {
|
||||
Specification<Vendor> spec = getSpecification(searchText);
|
||||
return companyVendorRepository.findAll(spec, Pageable.ofSize(10)).getContent();
|
||||
}
|
||||
|
||||
@@ -156,11 +156,11 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
/**
|
||||
* 重置 供应商文件
|
||||
*
|
||||
* @param companyVendor 供应商对象
|
||||
* @param status 输出
|
||||
* @param vendor 供应商对象
|
||||
* @param status 输出
|
||||
*/
|
||||
public boolean reBuildingFiles(CompanyVendor companyVendor, Consumer<String> status) {
|
||||
List<CompanyVendorFile> dbFiles = companyVendorFileService.findAllByVendor(companyVendor);
|
||||
public boolean reBuildingFiles(Vendor vendor, Consumer<String> status) {
|
||||
List<CompanyVendorFile> dbFiles = companyVendorFileService.findAllByVendor(vendor);
|
||||
Map<String, CompanyVendorFile> map = new HashMap<>();
|
||||
|
||||
boolean modified = fetchDbFiles(dbFiles, map, status);
|
||||
@@ -171,15 +171,15 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
List<CompanyVendorFile> retrieveFiles = new ArrayList<>();
|
||||
|
||||
// TODO 供应商有曾用名,可能存在多个目录
|
||||
fetchFiles(companyVendor.getPath(), needMoveToCompanyPath, retrieveFiles, map, status);
|
||||
fetchFiles(vendor.getPath(), needMoveToCompanyPath, retrieveFiles, map, status);
|
||||
|
||||
// 移动文件到公司目录下 to company path
|
||||
moveFileToCompany(companyVendor.getCompany(), needMoveToCompanyPath);
|
||||
moveFileToCompany(vendor.getCompany(), needMoveToCompanyPath);
|
||||
|
||||
status.accept("导入 " + retrieveFiles.size() + " 个文件");
|
||||
if (!retrieveFiles.isEmpty()) {
|
||||
// update db
|
||||
retrieveFiles.forEach(v -> v.setVendor(companyVendor));
|
||||
retrieveFiles.forEach(v -> v.setVendor(vendor));
|
||||
companyVendorFileService.saveAll(retrieveFiles);
|
||||
modified = true;
|
||||
}
|
||||
@@ -187,6 +187,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return modified;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected <T, F extends CompanyBasicFile<T>> boolean fillFileAsDefaultType(F dbFile, File file,
|
||||
Consumer<String> status) {
|
||||
@@ -196,6 +197,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected <T, F extends CompanyBasicFile<T>> F fillFileType(File file, List<File> fileList,
|
||||
Consumer<String> status) {
|
||||
@@ -206,6 +208,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return (F) vendorFile;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected <T, F extends CompanyBasicFile<T>> boolean setFileTypeAsEvaluationForm(F file) {
|
||||
T type = file.getType();
|
||||
@@ -235,22 +238,22 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
|| fileName.contains(CompanyVendorConstant.EVALUATION_FORM_NAME3);
|
||||
}
|
||||
|
||||
public void verify(CompanyVendor companyVendor, MessageHolder holder) {
|
||||
if (companyVendor.getType() == null) {
|
||||
public void verify(Vendor vendor, MessageHolder holder) {
|
||||
if (vendor.getType() == null) {
|
||||
holder.warn("数据异常,未设置供应商类型");
|
||||
return;
|
||||
}
|
||||
verify(companyVendor, LocalDate.now(), holder);
|
||||
verify(vendor, LocalDate.now(), holder);
|
||||
}
|
||||
|
||||
private boolean verifyAsTypicallyVendor(CompanyVendor companyVendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
VendorType vendorType = companyVendor.getType();
|
||||
private boolean verifyAsTypicallyVendor(Vendor vendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
VendorType vendorType = vendor.getType();
|
||||
if (vendorType != VendorType.TYPICALLY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean modified = false;
|
||||
Company company = companyVendor.getCompany();
|
||||
Company company = vendor.getCompany();
|
||||
if (!Hibernate.isInitialized(company)) {
|
||||
company = companyService.findById(company.getId());
|
||||
}
|
||||
@@ -259,8 +262,8 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
if (StringUtils.hasText(entStatus)) {
|
||||
if (entStatus.contains("注销")) {
|
||||
holder.error("营业状态异常:" + entStatus + ", 自动设置为不合格");
|
||||
companyVendor.setType(VendorType.UNQUALIFIED);
|
||||
companyVendor.setDescription(MyStringUtils.appendIfAbsent(companyVendor.getDescription(),
|
||||
vendor.setType(VendorType.UNQUALIFIED);
|
||||
vendor.setDescription(MyStringUtils.appendIfAbsent(vendor.getDescription(),
|
||||
"自动检测到营业状态为" + entStatus + ",设置为不合格供应商."));
|
||||
modified = true;
|
||||
}
|
||||
@@ -271,8 +274,8 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return modified;
|
||||
}
|
||||
|
||||
private boolean verifyAsQualifiedVendor(CompanyVendor companyVendor, LocalDate verifyDate, MessageHolder status) {
|
||||
VendorType vendorType = companyVendor.getType();
|
||||
private boolean verifyAsQualifiedVendor(Vendor vendor, LocalDate verifyDate, MessageHolder status) {
|
||||
VendorType vendorType = vendor.getType();
|
||||
if (vendorType != VendorType.QUALIFIED) {
|
||||
return false;
|
||||
}
|
||||
@@ -292,51 +295,51 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
holder.error("合同未关联公司");
|
||||
return;
|
||||
}
|
||||
CompanyVendor companyVendor = findByCompany(company);
|
||||
if (companyVendor == null) {
|
||||
Vendor vendor = findByCompany(company);
|
||||
if (vendor == null) {
|
||||
holder.error("合同未关联供应商");
|
||||
return;
|
||||
}
|
||||
if (companyVendor.getType() == null) {
|
||||
if (vendor.getType() == null) {
|
||||
holder.error("供应商未设置类型");
|
||||
return;
|
||||
}
|
||||
if (companyVendor.getType() == VendorType.UNQUALIFIED) {
|
||||
if (vendor.getType() == VendorType.UNQUALIFIED) {
|
||||
holder.error("不合格供应商");
|
||||
return;
|
||||
}
|
||||
verify(companyVendor, contract.getSetupDate(), holder);
|
||||
verify(vendor, contract.getSetupDate(), holder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商合规检测
|
||||
*
|
||||
* @param companyVendor 供应商对象
|
||||
* @param verifyDate 检测日期
|
||||
* @param holder 状态输出对象
|
||||
* @param vendor 供应商对象
|
||||
* @param verifyDate 检测日期
|
||||
* @param holder 状态输出对象
|
||||
*/
|
||||
public boolean verify(CompanyVendor companyVendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
public boolean verify(Vendor vendor, LocalDate verifyDate, MessageHolder holder) {
|
||||
boolean modified = false;
|
||||
|
||||
if (verifyAsQualifiedVendor(companyVendor, verifyDate, holder)) {
|
||||
if (verifyAsQualifiedVendor(vendor, verifyDate, holder)) {
|
||||
modified = true;
|
||||
}
|
||||
if (verifyAsTypicallyVendor(companyVendor, verifyDate, holder)) {
|
||||
if (verifyAsTypicallyVendor(vendor, verifyDate, holder)) {
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!StringUtils.hasText(companyVendor.getPurchase())) {
|
||||
if (!StringUtils.hasText(vendor.getPurchase())) {
|
||||
holder.error("未设置采购的产品");
|
||||
}
|
||||
|
||||
if (!StringUtils.hasText(companyVendor.getPath())) {
|
||||
if (!StringUtils.hasText(vendor.getPath())) {
|
||||
holder.error("未设置文件夹");
|
||||
}
|
||||
|
||||
companyVendorFileService.verify(companyVendor, verifyDate, holder);
|
||||
companyVendorFileService.verify(vendor, verifyDate, holder);
|
||||
|
||||
if (modified) {
|
||||
companyVendorRepository.save(companyVendor);
|
||||
companyVendorRepository.save(vendor);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
@@ -357,8 +360,8 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return new File(path);
|
||||
}
|
||||
|
||||
public boolean makePathAbsent(CompanyVendor companyVendor) {
|
||||
String path = companyVendor.getPath();
|
||||
public boolean makePathAbsent(Vendor vendor) {
|
||||
String path = vendor.getPath();
|
||||
if (StringUtils.hasText(path)) {
|
||||
File file = new File(path);
|
||||
if (file.exists()) {
|
||||
@@ -366,26 +369,26 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
}
|
||||
}
|
||||
|
||||
File dir = makePath(companyVendor);
|
||||
File dir = makePath(vendor);
|
||||
if (dir == null) {
|
||||
return false;
|
||||
}
|
||||
if (!dir.exists()) {
|
||||
return false;
|
||||
}
|
||||
companyVendor.setPath(dir.getAbsolutePath());
|
||||
vendor.setPath(dir.getAbsolutePath());
|
||||
return true;
|
||||
}
|
||||
|
||||
public File makePath(CompanyVendor companyVendor) {
|
||||
public File makePath(Vendor vendor) {
|
||||
File basePath = getBasePath();
|
||||
Company company = companyVendor.getCompany();
|
||||
Company company = vendor.getCompany();
|
||||
if (!Hibernate.isInitialized(company)) {
|
||||
company = companyService.findById(company.getId());
|
||||
}
|
||||
|
||||
String companyName = company.getName();
|
||||
String fileName = CompanyUtils.formatCompanyVendorId(companyVendor.getId()) + "-"
|
||||
String fileName = CompanyUtils.formatCompanyVendorId(vendor.getId()) + "-"
|
||||
+ FileUtils.escapeFileName(companyName);
|
||||
|
||||
File dir = new File(basePath, fileName);
|
||||
@@ -398,7 +401,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
}
|
||||
|
||||
public void resetTo(Company from, Company to) {
|
||||
Optional<CompanyVendor> optional = companyVendorRepository.findByCompany(from);
|
||||
Optional<Vendor> optional = companyVendorRepository.findByCompany(from);
|
||||
optional.ifPresent(companyVendor -> {
|
||||
companyVendor
|
||||
.setDescription(MyStringUtils.appendIfAbsent(companyVendor.getDescription(), "转自 " + from.getId()));
|
||||
@@ -445,7 +448,7 @@ public class CompanyVendorService extends CompanyBasicService
|
||||
return vendorTypeLocalRepository.save(type);
|
||||
}
|
||||
|
||||
public long count(Specification<CompanyVendor> spec) {
|
||||
public long count(Specification<Vendor> spec) {
|
||||
return companyVendorRepository.count(spec);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.util.StringUtils;
|
||||
import com.ecep.contract.MessageHolder;
|
||||
import com.ecep.contract.ds.contract.tasker.ContractRepairComm;
|
||||
import com.ecep.contract.ds.vendor.service.CompanyVendorService;
|
||||
import com.ecep.contract.model.CompanyVendor;
|
||||
import com.ecep.contract.model.Vendor;
|
||||
import com.ecep.contract.ui.Tasker;
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ public class VendorVerifyAllTasker extends Tasker<Object> {
|
||||
updateTitle("遍历核验所有供应商");
|
||||
Pageable pageRequest = PageRequest.ofSize(200);
|
||||
AtomicInteger counter = new AtomicInteger(0);
|
||||
Specification<CompanyVendor> spec = null;
|
||||
Specification<Vendor> spec = null;
|
||||
|
||||
CompanyVendorService vendorService = getBean(CompanyVendorService.class);
|
||||
long total = vendorService.count(spec);
|
||||
@@ -40,12 +40,12 @@ public class VendorVerifyAllTasker extends Tasker<Object> {
|
||||
break;
|
||||
}
|
||||
|
||||
Page<CompanyVendor> page = vendorService.findAll(spec, pageRequest);
|
||||
Page<Vendor> page = vendorService.findAll(spec, pageRequest);
|
||||
if (page.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
|
||||
for (CompanyVendor vendor : page) {
|
||||
for (Vendor vendor : page) {
|
||||
if (isCancelled()) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user