Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -6,6 +6,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditCompetitor;
|
||||
import com.gxwebsoft.credit.param.CreditCompetitorImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditCompetitorParam;
|
||||
@@ -170,6 +171,7 @@ public class CreditCompetitorController extends BaseController {
|
||||
CreditCompetitor::getName,
|
||||
CreditCompetitor::getCompanyId,
|
||||
CreditCompetitor::setCompanyId,
|
||||
CreditCompetitor::setCompanyName,
|
||||
CreditCompetitor::getHasData,
|
||||
CreditCompetitor::setHasData,
|
||||
CreditCompetitor::getTenantId,
|
||||
@@ -212,6 +214,11 @@ public class CreditCompetitorController extends BaseController {
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
Map<String, String> urlByName = ExcelImportSupport.readUrlByKey(
|
||||
file, usedSheetIndex, usedTitleRows, usedHeadRows, "企业名称");
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -222,7 +229,7 @@ public class CreditCompetitorController extends BaseController {
|
||||
CreditCompetitorImportParam param = list.get(i);
|
||||
try {
|
||||
CreditCompetitor item = convertImportParamToEntity(param);
|
||||
// name 才是持久化字段;companyName 为关联查询的临时字段(exist=false),导入时不应使用。
|
||||
// name 为竞争对手企业名称;companyName 为主体企业名称。
|
||||
if (!ImportHelper.isBlank(item.getName())) {
|
||||
String link = urlByName.get(item.getName().trim());
|
||||
if (!ImportHelper.isBlank(link)) {
|
||||
@@ -232,6 +239,9 @@ public class CreditCompetitorController extends BaseController {
|
||||
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getUserId() == null && currentUserId != null) {
|
||||
item.setUserId(currentUserId);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditCustomer;
|
||||
import com.gxwebsoft.credit.param.CreditCustomerImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditCustomerParam;
|
||||
@@ -167,6 +168,7 @@ public class CreditCustomerController extends BaseController {
|
||||
CreditCustomer::getName,
|
||||
CreditCustomer::getCompanyId,
|
||||
CreditCustomer::setCompanyId,
|
||||
CreditCustomer::setCompanyName,
|
||||
CreditCustomer::getHasData,
|
||||
CreditCustomer::setHasData,
|
||||
CreditCustomer::getTenantId,
|
||||
@@ -208,6 +210,11 @@ public class CreditCustomerController extends BaseController {
|
||||
Integer currentUserId = loginUser != null ? loginUser.getUserId() : null;
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
Map<String, String> urlByName = ExcelImportSupport.readUrlByKey(file, usedSheetIndex, usedTitleRows, usedHeadRows, "客户");
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -229,6 +236,9 @@ public class CreditCustomerController extends BaseController {
|
||||
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getUserId() == null && currentUserId != null) {
|
||||
item.setUserId(currentUserId);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditExternal;
|
||||
import com.gxwebsoft.credit.param.CreditExternalImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditExternalParam;
|
||||
@@ -170,6 +171,7 @@ public class CreditExternalController extends BaseController {
|
||||
CreditExternal::getName,
|
||||
CreditExternal::getCompanyId,
|
||||
CreditExternal::setCompanyId,
|
||||
CreditExternal::setCompanyName,
|
||||
CreditExternal::getHasData,
|
||||
CreditExternal::setHasData,
|
||||
CreditExternal::getTenantId,
|
||||
@@ -211,6 +213,11 @@ public class CreditExternalController extends BaseController {
|
||||
Integer currentUserId = loginUser != null ? loginUser.getUserId() : null;
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
Map<String, String> urlByName = ExcelImportSupport.readUrlByKey(file, usedSheetIndex, usedTitleRows, usedHeadRows, "被投资企业名称");
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -230,6 +237,9 @@ public class CreditExternalController extends BaseController {
|
||||
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getUserId() == null && currentUserId != null) {
|
||||
item.setUserId(currentUserId);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditRiskRelation;
|
||||
import com.gxwebsoft.credit.param.CreditRiskRelationImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditRiskRelationParam;
|
||||
@@ -170,6 +171,7 @@ public class CreditRiskRelationController extends BaseController {
|
||||
CreditRiskRelation::getMainBodyName,
|
||||
CreditRiskRelation::getCompanyId,
|
||||
CreditRiskRelation::setCompanyId,
|
||||
CreditRiskRelation::setCompanyName,
|
||||
CreditRiskRelation::getHasData,
|
||||
CreditRiskRelation::setHasData,
|
||||
CreditRiskRelation::getTenantId,
|
||||
@@ -209,6 +211,11 @@ public class CreditRiskRelationController extends BaseController {
|
||||
User loginUser = getLoginUser();
|
||||
Integer currentUserId = loginUser != null ? loginUser.getUserId() : null;
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -222,6 +229,9 @@ public class CreditRiskRelationController extends BaseController {
|
||||
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getUserId() == null && currentUserId != null) {
|
||||
item.setUserId(currentUserId);
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditSupplier;
|
||||
import com.gxwebsoft.credit.param.CreditSupplierImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditSupplierParam;
|
||||
@@ -170,6 +171,7 @@ public class CreditSupplierController extends BaseController {
|
||||
CreditSupplier::getSupplier,
|
||||
CreditSupplier::getCompanyId,
|
||||
CreditSupplier::setCompanyId,
|
||||
CreditSupplier::setCompanyName,
|
||||
CreditSupplier::getHasData,
|
||||
CreditSupplier::setHasData,
|
||||
CreditSupplier::getTenantId,
|
||||
@@ -211,6 +213,11 @@ public class CreditSupplierController extends BaseController {
|
||||
Integer currentUserId = loginUser != null ? loginUser.getUserId() : null;
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
Map<String, String> urlBySupplier = ExcelImportSupport.readUrlByKey(file, usedSheetIndex, usedTitleRows, usedHeadRows, "供应商");
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -230,6 +237,9 @@ public class CreditSupplierController extends BaseController {
|
||||
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getUserId() == null && currentUserId != null) {
|
||||
item.setUserId(currentUserId);
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditCompany;
|
||||
import com.gxwebsoft.credit.entity.CreditUser;
|
||||
import com.gxwebsoft.credit.param.CreditUserImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditUserParam;
|
||||
@@ -176,6 +177,7 @@ public class CreditUserController extends BaseController {
|
||||
CreditUser::getWinningName,
|
||||
CreditUser::getCompanyId,
|
||||
CreditUser::setCompanyId,
|
||||
CreditUser::setCompanyName,
|
||||
CreditUser::getHasData,
|
||||
CreditUser::setHasData,
|
||||
CreditUser::getTenantId,
|
||||
@@ -216,6 +218,11 @@ public class CreditUserController extends BaseController {
|
||||
Integer currentUserId = loginUser != null ? loginUser.getUserId() : null;
|
||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||
Map<Integer, String> urlMap = readNameHyperlinks(file, sheetIndex, usedTitleRows, usedHeadRows);
|
||||
String fixedCompanyName = null;
|
||||
if (companyId != null && companyId > 0) {
|
||||
CreditCompany fixedCompany = creditCompanyService.getById(companyId);
|
||||
fixedCompanyName = fixedCompany != null ? fixedCompany.getName() : null;
|
||||
}
|
||||
|
||||
final int chunkSize = 500;
|
||||
final int mpBatchSize = 500;
|
||||
@@ -233,6 +240,9 @@ public class CreditUserController extends BaseController {
|
||||
}
|
||||
if (item.getCompanyId() == null && companyId != null) {
|
||||
item.setCompanyId(companyId);
|
||||
if (ImportHelper.isBlank(item.getCompanyName()) && !ImportHelper.isBlank(fixedCompanyName)) {
|
||||
item.setCompanyName(fixedCompanyName);
|
||||
}
|
||||
}
|
||||
if (item.getCompanyId() != null && item.getCompanyId() > 0) {
|
||||
touchedCompanyIds.add(item.getCompanyId());
|
||||
|
||||
@@ -61,7 +61,6 @@ public class CreditCompetitor implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "所属企业名称")
|
||||
|
||||
@@ -55,7 +55,6 @@ public class CreditCustomer implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "是否有数据")
|
||||
|
||||
@@ -82,7 +82,6 @@ public class CreditExternal implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "是否有数据")
|
||||
|
||||
@@ -54,7 +54,6 @@ public class CreditRiskRelation implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "是否有数据")
|
||||
|
||||
@@ -55,7 +55,6 @@ public class CreditSupplier implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "是否有数据")
|
||||
|
||||
@@ -85,7 +85,6 @@ public class CreditUser implements Serializable {
|
||||
private String companyAlias;
|
||||
|
||||
@Schema(description = "企业名称")
|
||||
@TableField(exist = false)
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "是否有数据")
|
||||
|
||||
Reference in New Issue
Block a user