From 7ba034ab1e275cda304650eee4bf6aacc529d45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 20 Jan 2026 22:13:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(controller):=20=E6=96=B0=E5=A2=9E=E4=BC=81?= =?UTF-8?q?=E4=B8=9AID=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在BatchImportSupport中添加CompanyIdRefreshStats统计类 - 实现基于企业名称匹配的companyId批量更新逻辑 - 添加normalizeCompanyName和addCompanyNameMapping辅助方法 - 在各个Credit控制器中注入CreditCompanyService依赖 - 为所有相关控制器添加/company-id/refresh接口端点 - 实现多租户环境下的安全匹配和更新机制 - 支持limit参数控制批量处理数量 - 提供详细的更新统计数据返回 --- .../easypoi/excel/entity/ImportParams.java | 118 ++++++++++ .../credit/controller/BatchImportSupport.java | 218 ++++++++++++++++++ ...CreditAdministrativeLicenseController.java | 41 ++++ .../CreditBankruptcyController.java | 41 ++++ .../controller/CreditBranchController.java | 41 ++++ .../CreditBreachOfTrustController.java | 41 ++++ .../CreditCaseFilingController.java | 41 ++++ .../CreditCompetitorController.java | 41 ++++ .../CreditCourtAnnouncementController.java | 41 ++++ .../CreditCourtSessionController.java | 41 ++++ .../controller/CreditCustomerController.java | 41 ++++ .../CreditDeliveryNoticeController.java | 41 ++++ .../controller/CreditExternalController.java | 41 ++++ .../CreditFinalVersionController.java | 41 ++++ .../controller/CreditGqdjController.java | 41 ++++ ...CreditHistoricalLegalPersonController.java | 41 ++++ .../CreditJudgmentDebtorController.java | 190 ++------------- .../CreditJudicialDocumentController.java | 41 ++++ .../controller/CreditJudiciaryController.java | 62 ++++- .../controller/CreditMediationController.java | 41 ++++ .../CreditNearbyCompanyController.java | 41 ++++ .../controller/CreditPatentController.java | 41 ++++ .../CreditRiskRelationController.java | 42 ++++ .../controller/CreditSupplierController.java | 41 ++++ ...CreditSuspectedRelationshipController.java | 41 ++++ .../controller/CreditUserController.java | 41 ++++ .../controller/CreditXgxfController.java | 41 ++++ .../credit/entity/CreditBreachOfTrust.java | 1 - .../credit/entity/CreditCaseFiling.java | 1 - .../credit/entity/CreditCourtSession.java | 1 - .../credit/entity/CreditJudicialDocument.java | 1 - .../credit/entity/CreditMediation.java | 1 - .../param/CreditBreachOfTrustImportParam.java | 1 - .../param/CreditBreachOfTrustParam.java | 1 - 34 files changed, 1351 insertions(+), 188 deletions(-) create mode 100644 cn/afterturn/easypoi/excel/entity/ImportParams.java diff --git a/cn/afterturn/easypoi/excel/entity/ImportParams.java b/cn/afterturn/easypoi/excel/entity/ImportParams.java new file mode 100644 index 0000000..f6cad32 --- /dev/null +++ b/cn/afterturn/easypoi/excel/entity/ImportParams.java @@ -0,0 +1,118 @@ +/** + * Copyright 2013-2015 JueYue (qrb.jueyue@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.afterturn.easypoi.excel.entity; + +import cn.afterturn.easypoi.handler.inter.IExcelVerifyHandler; +import lombok.Data; + +/** + * 导入参数设置 + * + * @author JueYue + * 2013-9-24 + * @version 1.0 + */ +@Data +public class ImportParams extends ExcelBaseParams { + + public static final String SAVE_URL = "/excel/upload/excelUpload"; + + /** + * 表格标题行数,默认0 + */ + private int titleRows = 0; + /** + * 表头行数,默认1 + */ + private int headRows = 1; + /** + * 字段真正值和列标题之间的距离 默认0 + */ + private int startRows = 0; + + /** + * 主键设置,如何这个cell没有值,就跳过 或者认为这个是list的下面的值 + * 大家不理解,去掉这个 + */ + + private Integer keyIndex = null; + /** + * 开始读取的sheet位置,默认为0 + */ + private int startSheetIndex = 0; + /** + * 上传表格需要读取的sheet 数量,默认为1 + */ + private int sheetNum = 1; + /** + * 是否需要保存上传的Excel,默认为false + */ + private boolean needSave = false; + /** + * 校验组 + */ + private Class[] verifyGroup = null; + /** + * 是否需要校验上传的Excel,默认为false + */ + private boolean needVerify = false; + /** + * 返回文件是否分割,默认是分割 + */ + private boolean verifyFileSplit = true; + /** + * 校验处理接口 + */ + private IExcelVerifyHandler verifyHandler; + /** + * 保存上传的Excel目录,默认是 如 TestEntity这个类保存路径就是 + * upload/excelUpload/Test/yyyyMMddHHmss_***** 保存名称上传时间_五位随机数 + */ + private String saveUrl = SAVE_URL; + /** + * 最后的无效行数 + */ + private int lastOfInvalidRow = 0; + /** + * 手动控制读取的行数 + */ + private int readRows = 0; + /** + * 导入时校验数据模板,是不是正确的Excel + */ + private String[] importFields; + /** + * 导入时校验excel的标题列顺序。依赖于importFields的配置顺序 + */ + private boolean needCheckOrder = false; + /** + * Key-Value 读取标记,以这个为Key,后面一个Cell 为Value,多个改为ArrayList + */ + private String keyMark = ":"; + /** + * 按照Key-Value 规则读取全局扫描Excel,但是跳过List读取范围提升性能 + * 仅仅支持titleRows + headRows + startRows 以及 lastOfInvalidRow + */ + private boolean readSingleCell = false; + /** + * 是否并行计算 + */ + private boolean concurrentTask = false; + /** + * 最小截取大小 + */ + private Integer critical = 1000; +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/BatchImportSupport.java b/src/main/java/com/gxwebsoft/credit/controller/BatchImportSupport.java index 1a34240..008ab23 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/BatchImportSupport.java +++ b/src/main/java/com/gxwebsoft/credit/controller/BatchImportSupport.java @@ -3,6 +3,8 @@ package com.gxwebsoft.credit.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.support.SFunction; import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.credit.entity.CreditCompany; +import com.gxwebsoft.credit.service.CreditCompanyService; import org.springframework.stereotype.Component; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; @@ -11,6 +13,8 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.function.BiConsumer; @@ -39,6 +43,194 @@ public class BatchImportSupport { return requiresNewTx.execute(status -> supplier.get()); } + public static final class CompanyIdRefreshStats { + public final boolean anyDataRead; + public final int updated; + public final int matched; + public final int notFound; + public final int ambiguous; + + private CompanyIdRefreshStats(boolean anyDataRead, int updated, int matched, int notFound, int ambiguous) { + this.anyDataRead = anyDataRead; + this.updated = updated; + this.matched = matched; + this.notFound = notFound; + this.ambiguous = ambiguous; + } + + public Map toMap() { + Map result = new LinkedHashMap<>(); + result.put("updated", updated); + result.put("matched", matched); + result.put("notFound", notFound); + result.put("ambiguous", ambiguous); + return result; + } + } + + /** + * 按企业名称匹配 CreditCompany(name / matchName) 并回填 companyId。 + * + *

默认仅更新 companyId=0 的记录(onlyNull=true);onlyNull=false 时会覆盖更新(仅当 companyId 不同)。

+ * + *

注意:为避免跨租户误更新,当 currentTenantId 为空时会按记录自身 tenantId 维度匹配, + * tenantId 为空的记录将被跳过并计入 notFound。

+ */ + public CompanyIdRefreshStats refreshCompanyIdByCompanyName(IService service, + CreditCompanyService creditCompanyService, + Integer currentTenantId, + Boolean onlyNull, + Integer limit, + SFunction idGetter, + BiConsumer idSetter, + SFunction nameGetter, + SFunction companyIdGetter, + BiConsumer companyIdSetter, + SFunction tenantIdGetter, + Supplier patchFactory) { + boolean onlyNullFlag = (onlyNull == null) || Boolean.TRUE.equals(onlyNull); + + // 1) 读取待处理数据(仅取必要字段,避免一次性拉全表字段) + var query = service.lambdaQuery() + .select(idGetter, nameGetter, companyIdGetter, tenantIdGetter) + .eq(currentTenantId != null, tenantIdGetter, currentTenantId) + .isNotNull(nameGetter); + if (onlyNullFlag) { + query.eq(companyIdGetter, 0); + } + if (limit != null && limit > 0) { + query.last("limit " + Math.min(limit, 200000)); + } + List rows = query.list(); + + if (CollectionUtils.isEmpty(rows)) { + return new CompanyIdRefreshStats(false, 0, 0, 0, 0); + } + + // 2) 按租户维度匹配(避免管理员/跨租户场景误匹配) + Map> rowsByTenant = new LinkedHashMap<>(); + int missingTenant = 0; + for (T row : rows) { + if (row == null) { + continue; + } + Integer tenantId = currentTenantId != null ? currentTenantId : tenantIdGetter.apply(row); + if (tenantId == null) { + // 未知租户下不做跨租户匹配,避免误更新 + missingTenant++; + continue; + } + rowsByTenant.computeIfAbsent(tenantId, k -> new ArrayList<>()).add(row); + } + + // 3) 批量更新 companyId + int updated = 0; + int matched = 0; + int notFound = 0; + int ambiguous = 0; + final int batchSize = 500; + List updates = new ArrayList<>(batchSize); + + final int inChunkSize = 900; + for (Map.Entry> entry : rowsByTenant.entrySet()) { + Integer tenantId = entry.getKey(); + List tenantRows = entry.getValue(); + if (tenantId == null || CollectionUtils.isEmpty(tenantRows)) { + continue; + } + + // 3.1) 查询当前租户下的 companyId 映射 + LinkedHashMap companyIdByName = new LinkedHashMap<>(); + LinkedHashMap ambiguousByName = new LinkedHashMap<>(); + LinkedHashSet nameSet = new LinkedHashSet<>(); + for (T row : tenantRows) { + String name = normalizeCompanyName(row != null ? nameGetter.apply(row) : null); + if (name != null) { + nameSet.add(name); + } + } + List allNames = new ArrayList<>(nameSet); + for (int i = 0; i < allNames.size(); i += inChunkSize) { + List chunk = allNames.subList(i, Math.min(allNames.size(), i + inChunkSize)); + if (CollectionUtils.isEmpty(chunk)) { + continue; + } + List companies = creditCompanyService.lambdaQuery() + .select(CreditCompany::getId, CreditCompany::getName, CreditCompany::getMatchName, CreditCompany::getTenantId) + .eq(CreditCompany::getTenantId, tenantId) + .and(w -> w.in(CreditCompany::getName, chunk).or().in(CreditCompany::getMatchName, chunk)) + .list(); + + for (CreditCompany c : companies) { + if (c == null || c.getId() == null) { + continue; + } + addCompanyNameMapping(companyIdByName, ambiguousByName, normalizeCompanyName(c.getName()), c.getId()); + addCompanyNameMapping(companyIdByName, ambiguousByName, normalizeCompanyName(c.getMatchName()), c.getId()); + } + } + + // 3.2) 更新当前租户下的数据 companyId + for (T row : tenantRows) { + String key = normalizeCompanyName(row != null ? nameGetter.apply(row) : null); + if (key == null) { + continue; + } + + Integer amb = ambiguousByName.get(key); + if (amb != null && amb > 0) { + ambiguous++; + continue; + } + + Integer companyId = companyIdByName.get(key); + if (companyId == null) { + notFound++; + continue; + } + matched++; + + Integer oldCompanyId = row != null ? companyIdGetter.apply(row) : null; + boolean needUpdate; + if (onlyNullFlag) { + needUpdate = oldCompanyId != null && oldCompanyId == 0; + } else { + needUpdate = oldCompanyId == null || !companyId.equals(oldCompanyId); + } + if (!needUpdate) { + continue; + } + + Integer id = row != null ? idGetter.apply(row) : null; + if (id == null) { + continue; + } + T patch = patchFactory.get(); + idSetter.accept(patch, id); + companyIdSetter.accept(patch, companyId); + updates.add(patch); + if (updates.size() >= batchSize) { + List batch = new ArrayList<>(updates); + updates.clear(); + updated += runInNewTx(() -> service.updateBatchById(batch, batchSize) ? batch.size() : 0); + } + } + } + + // currentTenantId 为空时,租户缺失的数据不做匹配更新,避免误更新 + if (currentTenantId == null && missingTenant > 0) { + notFound += missingTenant; + } + + if (!updates.isEmpty()) { + List batch = new ArrayList<>(updates); + updates.clear(); + updated += runInNewTx(() -> service.updateBatchById(batch, batchSize) ? batch.size() : 0); + } + + return new CompanyIdRefreshStats(true, updated, matched, notFound, ambiguous); + } + /** * 批量 upsert:优先按 code 匹配;code 为空时按 name 匹配。 */ @@ -462,6 +654,32 @@ public class BatchImportSupport { return trimmed.isEmpty() ? null : trimmed; } + private static String normalizeCompanyName(String name) { + if (name == null) { + return null; + } + // 兼容 Excel/网页复制带来的全角空格 + String v = name.replace(' ', ' ').trim(); + return v.isEmpty() ? null : v; + } + + private static void addCompanyNameMapping(Map idByName, + Map ambiguousByName, + String key, + Integer companyId) { + if (key == null || companyId == null) { + return; + } + Integer existing = idByName.get(key); + if (existing == null) { + idByName.put(key, companyId); + return; + } + if (!existing.equals(companyId)) { + ambiguousByName.put(key, 1); + } + } + private static Integer extractId(T entity, SFunction idColumn) { // SFunction 是 getter method ref,直接调用即可 return idColumn.apply(entity); diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditAdministrativeLicenseController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditAdministrativeLicenseController.java index 4f028ee..336ae0a 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditAdministrativeLicenseController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditAdministrativeLicenseController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditAdministrativeLicense; import com.gxwebsoft.credit.param.CreditAdministrativeLicenseImportParam; import com.gxwebsoft.credit.param.CreditAdministrativeLicenseParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditAdministrativeLicenseService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditAdministrativeLicenseController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询行政许可") @GetMapping("/page") public ApiResult> page(CreditAdministrativeLicenseParam param) { @@ -134,6 +138,43 @@ public class CreditAdministrativeLicenseController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditAdministrativeLicense:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditAdministrativeLicenseService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditAdministrativeLicense::getId, + CreditAdministrativeLicense::setId, + CreditAdministrativeLicense::getName, + CreditAdministrativeLicense::getCompanyId, + CreditAdministrativeLicense::setCompanyId, + CreditAdministrativeLicense::getTenantId, + CreditAdministrativeLicense::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入行政许可 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditBankruptcyController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditBankruptcyController.java index 699751d..877fb6a 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditBankruptcyController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditBankruptcyController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditBankruptcy; import com.gxwebsoft.credit.param.CreditBankruptcyImportParam; import com.gxwebsoft.credit.param.CreditBankruptcyParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditBankruptcyService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditBankruptcyController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询破产重整") @GetMapping("/page") public ApiResult> page(CreditBankruptcyParam param) { @@ -134,6 +138,43 @@ public class CreditBankruptcyController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditBankruptcy:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditBankruptcyService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditBankruptcy::getId, + CreditBankruptcy::setId, + CreditBankruptcy::getParty, + CreditBankruptcy::getCompanyId, + CreditBankruptcy::setCompanyId, + CreditBankruptcy::getTenantId, + CreditBankruptcy::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入破产重整 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditBranchController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditBranchController.java index 77a7f30..d1e5011 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditBranchController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditBranchController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditBranch; import com.gxwebsoft.credit.param.CreditBranchImportParam; import com.gxwebsoft.credit.param.CreditBranchParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditBranchService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditBranchController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询分支机构") @GetMapping("/page") public ApiResult> page(CreditBranchParam param) { @@ -133,6 +137,43 @@ public class CreditBranchController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditBranch:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditBranchService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditBranch::getId, + CreditBranch::setId, + CreditBranch::getName, + CreditBranch::getCompanyId, + CreditBranch::setCompanyId, + CreditBranch::getTenantId, + CreditBranch::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入分支机构 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java index cca8c7b..0d70ecf 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditBreachOfTrust; import com.gxwebsoft.credit.param.CreditBreachOfTrustImportParam; import com.gxwebsoft.credit.param.CreditBreachOfTrustParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditBreachOfTrustService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -43,6 +44,9 @@ public class CreditBreachOfTrustController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询失信被执行人") @GetMapping("/page") public ApiResult> page(CreditBreachOfTrustParam param) { @@ -130,6 +134,43 @@ public class CreditBreachOfTrustController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditBreachOfTrustService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditBreachOfTrust::getId, + CreditBreachOfTrust::setId, + CreditBreachOfTrust::getPlaintiffAppellant, + CreditBreachOfTrust::getCompanyId, + CreditBreachOfTrust::setCompanyId, + CreditBreachOfTrust::getTenantId, + CreditBreachOfTrust::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入失信被执行人 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java index cd46b5e..e7b8c8d 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditCaseFiling; import com.gxwebsoft.credit.param.CreditCaseFilingImportParam; import com.gxwebsoft.credit.param.CreditCaseFilingParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditCaseFilingService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditCaseFilingController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询司法大数据") @GetMapping("/page") public ApiResult> page(CreditCaseFilingParam param) { @@ -133,6 +137,43 @@ public class CreditCaseFilingController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditCaseFiling:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditCaseFilingService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditCaseFiling::getId, + CreditCaseFiling::setId, + CreditCaseFiling::getAppellee, + CreditCaseFiling::getCompanyId, + CreditCaseFiling::setCompanyId, + CreditCaseFiling::getTenantId, + CreditCaseFiling::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入立案信息 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java index 24fe511..aedeb3c 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditCompetitor; import com.gxwebsoft.credit.param.CreditCompetitorImportParam; import com.gxwebsoft.credit.param.CreditCompetitorParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditCompetitorService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditCompetitorController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询竞争对手") @GetMapping("/page") public ApiResult> page(CreditCompetitorParam param) { @@ -133,6 +137,43 @@ public class CreditCompetitorController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditCompetitor:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditCompetitorService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditCompetitor::getId, + CreditCompetitor::setId, + CreditCompetitor::getName, + CreditCompetitor::getCompanyId, + CreditCompetitor::setCompanyId, + CreditCompetitor::getTenantId, + CreditCompetitor::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入竞争对手 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java index b492e6c..bf00b44 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditCourtAnnouncement; import com.gxwebsoft.credit.param.CreditCourtAnnouncementImportParam; import com.gxwebsoft.credit.param.CreditCourtAnnouncementParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditCourtAnnouncementService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditCourtAnnouncementController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询法院公告司法大数据") @GetMapping("/page") public ApiResult> page(CreditCourtAnnouncementParam param) { @@ -133,6 +137,43 @@ public class CreditCourtAnnouncementController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditCourtAnnouncementService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditCourtAnnouncement::getId, + CreditCourtAnnouncement::setId, + CreditCourtAnnouncement::getAppellee, + CreditCourtAnnouncement::getCompanyId, + CreditCourtAnnouncement::setCompanyId, + CreditCourtAnnouncement::getTenantId, + CreditCourtAnnouncement::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入法院公告司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java index 6a1ef25..eb7bca2 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditCourtSession; import com.gxwebsoft.credit.param.CreditCourtSessionImportParam; import com.gxwebsoft.credit.param.CreditCourtSessionParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditCourtSessionService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditCourtSessionController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询开庭公告司法大数据") @GetMapping("/page") public ApiResult> page(CreditCourtSessionParam param) { @@ -134,6 +138,43 @@ public class CreditCourtSessionController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditCourtSession:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditCourtSessionService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditCourtSession::getId, + CreditCourtSession::setId, + CreditCourtSession::getAppellee, + CreditCourtSession::getCompanyId, + CreditCourtSession::setCompanyId, + CreditCourtSession::getTenantId, + CreditCourtSession::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入开庭公告司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCustomerController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCustomerController.java index 7fdb4ed..2afbc07 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditCustomerController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCustomerController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditCustomer; import com.gxwebsoft.credit.param.CreditCustomerImportParam; import com.gxwebsoft.credit.param.CreditCustomerParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditCustomerController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询客户") @GetMapping("/page") public ApiResult> page(CreditCustomerParam param) { @@ -129,6 +133,43 @@ public class CreditCustomerController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditCustomer:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditCustomerService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditCustomer::getId, + CreditCustomer::setId, + CreditCustomer::getName, + CreditCustomer::getCompanyId, + CreditCustomer::setCompanyId, + CreditCustomer::getTenantId, + CreditCustomer::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入客户 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java index ef0b301..8b09154 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditDeliveryNotice; import com.gxwebsoft.credit.param.CreditDeliveryNoticeImportParam; import com.gxwebsoft.credit.param.CreditDeliveryNoticeParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditDeliveryNoticeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditDeliveryNoticeController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询送达公告司法大数据") @GetMapping("/page") public ApiResult> page(CreditDeliveryNoticeParam param) { @@ -133,6 +137,43 @@ public class CreditDeliveryNoticeController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditDeliveryNoticeService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditDeliveryNotice::getId, + CreditDeliveryNotice::setId, + CreditDeliveryNotice::getOtherPartiesThirdParty, + CreditDeliveryNotice::getCompanyId, + CreditDeliveryNotice::setCompanyId, + CreditDeliveryNotice::getTenantId, + CreditDeliveryNotice::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入送达公告司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java index 79aea50..80d0fbf 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditExternal; import com.gxwebsoft.credit.param.CreditExternalImportParam; import com.gxwebsoft.credit.param.CreditExternalParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditExternalService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditExternalController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询对外投资") @GetMapping("/page") public ApiResult> page(CreditExternalParam param) { @@ -133,6 +137,43 @@ public class CreditExternalController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditExternal:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditExternalService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditExternal::getId, + CreditExternal::setId, + CreditExternal::getName, + CreditExternal::getCompanyId, + CreditExternal::setCompanyId, + CreditExternal::getTenantId, + CreditExternal::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入对外投资 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java index 7b3d5ee..b07df8e 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditFinalVersion; import com.gxwebsoft.credit.param.CreditFinalVersionImportParam; import com.gxwebsoft.credit.param.CreditFinalVersionParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditFinalVersionService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditFinalVersionController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询终本案件") @GetMapping("/page") public ApiResult> page(CreditFinalVersionParam param) { @@ -134,6 +138,43 @@ public class CreditFinalVersionController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditFinalVersion:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditFinalVersionService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditFinalVersion::getId, + CreditFinalVersion::setId, + CreditFinalVersion::getAppellee, + CreditFinalVersion::getCompanyId, + CreditFinalVersion::setCompanyId, + CreditFinalVersion::getTenantId, + CreditFinalVersion::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入终本案件 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java index 19ae87f..1fa1b6e 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditGqdj; import com.gxwebsoft.credit.param.CreditGqdjImportParam; import com.gxwebsoft.credit.param.CreditGqdjParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditGqdjService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditGqdjController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询股权冻结") @GetMapping("/page") public ApiResult> page(CreditGqdjParam param) { @@ -134,6 +138,43 @@ public class CreditGqdjController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditGqdj:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditGqdjService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditGqdj::getId, + CreditGqdj::setId, + CreditGqdj::getAppellee, + CreditGqdj::getCompanyId, + CreditGqdj::setCompanyId, + CreditGqdj::getTenantId, + CreditGqdj::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入股权冻结司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditHistoricalLegalPersonController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditHistoricalLegalPersonController.java index b62edce..77f0f80 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditHistoricalLegalPersonController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditHistoricalLegalPersonController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditHistoricalLegalPerson; import com.gxwebsoft.credit.param.CreditHistoricalLegalPersonImportParam; import com.gxwebsoft.credit.param.CreditHistoricalLegalPersonParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditHistoricalLegalPersonService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditHistoricalLegalPersonController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询历史法定代表人") @GetMapping("/page") public ApiResult> page(CreditHistoricalLegalPersonParam param) { @@ -133,6 +137,43 @@ public class CreditHistoricalLegalPersonController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditHistoricalLegalPerson:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditHistoricalLegalPersonService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditHistoricalLegalPerson::getId, + CreditHistoricalLegalPerson::setId, + CreditHistoricalLegalPerson::getName, + CreditHistoricalLegalPerson::getCompanyId, + CreditHistoricalLegalPerson::setCompanyId, + CreditHistoricalLegalPerson::getTenantId, + CreditHistoricalLegalPerson::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入历史法定代表人 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java index 4f361a3..93905cb 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java @@ -6,7 +6,6 @@ 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.CreditJudgmentDebtor; import com.gxwebsoft.credit.param.CreditJudgmentDebtorImportParam; import com.gxwebsoft.credit.param.CreditJudgmentDebtorParam; @@ -164,153 +163,25 @@ public class CreditJudgmentDebtorController extends BaseController { User loginUser = getLoginUser(); Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; - // 1) 读取待处理数据(仅取必要字段,避免一次性拉全表字段) - var debtorQuery = creditJudgmentDebtorService.lambdaQuery() - .select(CreditJudgmentDebtor::getId, CreditJudgmentDebtor::getName, CreditJudgmentDebtor::getCompanyId, CreditJudgmentDebtor::getTenantId) - .eq(currentTenantId != null, CreditJudgmentDebtor::getTenantId, currentTenantId) - .isNotNull(CreditJudgmentDebtor::getName); - if (Boolean.TRUE.equals(onlyNull)) { - debtorQuery.eq(CreditJudgmentDebtor::getCompanyId, 0); + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditJudgmentDebtorService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditJudgmentDebtor::getId, + CreditJudgmentDebtor::setId, + CreditJudgmentDebtor::getName, + CreditJudgmentDebtor::getCompanyId, + CreditJudgmentDebtor::setCompanyId, + CreditJudgmentDebtor::getTenantId, + CreditJudgmentDebtor::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); } - if (limit != null && limit > 0) { - debtorQuery.last("limit " + Math.min(limit, 200000)); - } - List debtors = debtorQuery.list(); - - if (CollectionUtils.isEmpty(debtors)) { - Map result = new LinkedHashMap<>(); - result.put("updated", 0); - result.put("matched", 0); - result.put("notFound", 0); - result.put("ambiguous", 0); - return success("无可更新数据", result); - } - - // 2) 按租户维度匹配(避免管理员/跨租户场景误匹配) - Map> debtorsByTenant = new LinkedHashMap<>(); - for (CreditJudgmentDebtor d : debtors) { - if (d == null) { - continue; - } - Integer tenantId = currentTenantId != null ? currentTenantId : d.getTenantId(); - if (tenantId == null) { - // 未知租户下不做跨租户匹配,避免误更新 - continue; - } - debtorsByTenant.computeIfAbsent(tenantId, k -> new ArrayList<>()).add(d); - } - - // 3) 批量更新 companyId - int updated = 0; - int matched = 0; - int notFound = 0; - int ambiguous = 0; - final int batchSize = 500; - List updates = new ArrayList<>(batchSize); - - final int inChunkSize = 900; - for (Map.Entry> entry : debtorsByTenant.entrySet()) { - Integer tenantId = entry.getKey(); - List tenantDebtors = entry.getValue(); - if (tenantId == null || CollectionUtils.isEmpty(tenantDebtors)) { - continue; - } - - // 3.1) 查询当前租户下的 companyId 映射 - LinkedHashMap companyIdByName = new LinkedHashMap<>(); - LinkedHashMap ambiguousByName = new LinkedHashMap<>(); - java.util.LinkedHashSet nameSet = new java.util.LinkedHashSet<>(); - for (CreditJudgmentDebtor d : tenantDebtors) { - String name = normalizeCompanyName(d != null ? d.getName() : null); - if (name != null) { - nameSet.add(name); - } - } - List allNames = new ArrayList<>(nameSet); - for (int i = 0; i < allNames.size(); i += inChunkSize) { - List chunk = allNames.subList(i, Math.min(allNames.size(), i + inChunkSize)); - if (CollectionUtils.isEmpty(chunk)) { - continue; - } - List companies = creditCompanyService.lambdaQuery() - .select(CreditCompany::getId, CreditCompany::getName, CreditCompany::getMatchName, CreditCompany::getTenantId) - .eq(CreditCompany::getTenantId, tenantId) - .and(w -> w.in(CreditCompany::getName, chunk).or().in(CreditCompany::getMatchName, chunk)) - .list(); - - for (CreditCompany c : companies) { - if (c == null || c.getId() == null) { - continue; - } - addCompanyNameMapping(companyIdByName, ambiguousByName, normalizeCompanyName(c.getName()), c.getId()); - addCompanyNameMapping(companyIdByName, ambiguousByName, normalizeCompanyName(c.getMatchName()), c.getId()); - } - } - - // 3.2) 更新当前租户下的被执行人 companyId - for (CreditJudgmentDebtor d : tenantDebtors) { - String key = normalizeCompanyName(d != null ? d.getName() : null); - if (key == null) { - continue; - } - - Integer amb = ambiguousByName.get(key); - if (amb != null && amb > 0) { - ambiguous++; - continue; - } - - Integer companyId = companyIdByName.get(key); - if (companyId == null) { - notFound++; - continue; - } - matched++; - - boolean needUpdate = d.getCompanyId() == null || !companyId.equals(d.getCompanyId()); - if (Boolean.TRUE.equals(onlyNull)) { - needUpdate = d.getCompanyId() != null && d.getCompanyId() == 0; - } - if (!needUpdate) { - continue; - } - - CreditJudgmentDebtor patch = new CreditJudgmentDebtor(); - patch.setId(d.getId()); - patch.setCompanyId(companyId); - updates.add(patch); - if (updates.size() >= batchSize) { - updated += batchImportSupport.runInNewTx(() -> { - boolean ok = creditJudgmentDebtorService.updateBatchById(updates, batchSize); - return ok ? updates.size() : 0; - }); - updates.clear(); - } - } - } - - // currentTenantId 为空时,租户缺失的数据不做匹配更新,避免误更新 - if (currentTenantId == null) { - for (CreditJudgmentDebtor d : debtors) { - if (d != null && d.getTenantId() == null) { - notFound++; - } - } - } - - if (!updates.isEmpty()) { - updated += batchImportSupport.runInNewTx(() -> { - boolean ok = creditJudgmentDebtorService.updateBatchById(updates, batchSize); - return ok ? updates.size() : 0; - }); - } - - Map result = new LinkedHashMap<>(); - result.put("updated", updated); - result.put("matched", matched); - result.put("notFound", notFound); - result.put("ambiguous", ambiguous); - return success("更新完成,更新" + updated + "条", result); + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); } /** @@ -417,31 +288,6 @@ public class CreditJudgmentDebtorController extends BaseController { return ImportHelper.isBlank(param.getCaseNumber()); } - private static String normalizeCompanyName(String name) { - if (name == null) { - return null; - } - String v = name.replace(' ', ' ').trim(); - return v.isEmpty() ? null : v; - } - - private static void addCompanyNameMapping(Map idByName, - Map ambiguousByName, - String key, - Integer companyId) { - if (key == null || companyId == null) { - return; - } - Integer existing = idByName.get(key); - if (existing == null) { - idByName.put(key, companyId); - return; - } - if (!existing.equals(companyId)) { - ambiguousByName.put(key, 1); - } - } - private boolean isImportHeaderRow(CreditJudgmentDebtorImportParam param) { return isHeaderValue(param.getName(), "序号") || isHeaderValue(param.getName1(), "序号") diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java index 1d6f07d..f536c33 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditJudicialDocument; import com.gxwebsoft.credit.param.CreditJudicialDocumentImportParam; import com.gxwebsoft.credit.param.CreditJudicialDocumentParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditJudicialDocumentService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditJudicialDocumentController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询裁判文书司法大数据") @GetMapping("/page") public ApiResult> page(CreditJudicialDocumentParam param) { @@ -134,6 +138,43 @@ public class CreditJudicialDocumentController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditJudicialDocumentService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditJudicialDocument::getId, + CreditJudicialDocument::setId, + CreditJudicialDocument::getAppellee, + CreditJudicialDocument::getCompanyId, + CreditJudicialDocument::setCompanyId, + CreditJudicialDocument::getTenantId, + CreditJudicialDocument::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入裁判文书司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditJudiciaryController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditJudiciaryController.java index 7b8856f..1f4cbc2 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditJudiciaryController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditJudiciaryController.java @@ -13,6 +13,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditJudiciary; import com.gxwebsoft.credit.param.CreditJudiciaryImportParam; import com.gxwebsoft.credit.param.CreditJudiciaryParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditJudiciaryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -45,6 +46,9 @@ public class CreditJudiciaryController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询司法案件") @GetMapping("/page") public ApiResult> page(CreditJudiciaryParam param) { @@ -132,6 +136,43 @@ public class CreditJudiciaryController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditJudiciary:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditJudiciaryService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditJudiciary::getId, + CreditJudiciary::setId, + CreditJudiciary::getName, + CreditJudiciary::getCompanyId, + CreditJudiciary::setCompanyId, + CreditJudiciary::getTenantId, + CreditJudiciary::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入司法案件 */ @@ -144,13 +185,16 @@ public class CreditJudiciaryController extends BaseController { int successCount = 0; try { + // 支持按选项卡名称导入:默认读取“司法案件”sheet(不存在则回退到第 0 个sheet) + int sheetIndex = ExcelImportSupport.findSheetIndex(file, "司法案件", 0); + List list = null; int usedTitleRows = 0; int usedHeadRows = 0; int[][] tryConfigs = new int[][]{{1, 1}, {0, 1}, {0, 2}, {0, 3}}; for (int[] config : tryConfigs) { - list = filterEmptyRows(tryImport(file, config[0], config[1])); + list = filterEmptyRows(tryImport(file, config[0], config[1], sheetIndex)); if (!CollectionUtils.isEmpty(list)) { usedTitleRows = config[0]; usedHeadRows = config[1]; @@ -165,18 +209,18 @@ public class CreditJudiciaryController extends BaseController { Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; // easypoi 默认不会读取单元格超链接地址;url 可能挂在“案号/案件名称”等列的超链接中,需要额外读取回填。 - Map urlByCode = ExcelImportSupport.readHyperlinksByHeaderKey(file, 0, usedTitleRows, usedHeadRows, "案号"); - Map urlByName = ExcelImportSupport.readHyperlinksByHeaderKey(file, 0, usedTitleRows, usedHeadRows, "案件名称"); + Map urlByCode = ExcelImportSupport.readHyperlinksByHeaderKey(file, sheetIndex, usedTitleRows, usedHeadRows, "案号"); + Map urlByName = ExcelImportSupport.readHyperlinksByHeaderKey(file, sheetIndex, usedTitleRows, usedHeadRows, "案件名称"); // 有些源文件会单独提供“url/网址/链接”等列(可能是纯文本也可能是超链接) - Map urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, 0, usedTitleRows, usedHeadRows, "案号", "url"); + Map urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, sheetIndex, usedTitleRows, usedHeadRows, "案号", "url"); if (urlByCodeFromUrlCol.isEmpty()) { - urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, 0, usedTitleRows, usedHeadRows, "案号", "URL"); + urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, sheetIndex, usedTitleRows, usedHeadRows, "案号", "URL"); } if (urlByCodeFromUrlCol.isEmpty()) { - urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, 0, usedTitleRows, usedHeadRows, "案号", "网址"); + urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, sheetIndex, usedTitleRows, usedHeadRows, "案号", "网址"); } if (urlByCodeFromUrlCol.isEmpty()) { - urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, 0, usedTitleRows, usedHeadRows, "案号", "链接"); + urlByCodeFromUrlCol = ExcelImportSupport.readKeyValueByHeaders(file, sheetIndex, usedTitleRows, usedHeadRows, "案号", "链接"); } final int chunkSize = 500; @@ -359,11 +403,11 @@ public class CreditJudiciaryController extends BaseController { workbook.close(); } - private List tryImport(MultipartFile file, int titleRows, int headRows) throws Exception { + private List tryImport(MultipartFile file, int titleRows, int headRows, int sheetIndex) throws Exception { ImportParams importParams = new ImportParams(); importParams.setTitleRows(titleRows); importParams.setHeadRows(headRows); - importParams.setStartSheetIndex(0); + importParams.setStartSheetIndex(sheetIndex); importParams.setSheetNum(1); return ExcelImportUtil.importExcel(file.getInputStream(), CreditJudiciaryImportParam.class, importParams); } diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java index 71528e0..74c1319 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditMediation; import com.gxwebsoft.credit.param.CreditMediationImportParam; import com.gxwebsoft.credit.param.CreditMediationParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditMediationService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditMediationController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询诉前调解司法大数据") @GetMapping("/page") public ApiResult> page(CreditMediationParam param) { @@ -133,6 +137,43 @@ public class CreditMediationController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditMediation:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditMediationService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditMediation::getId, + CreditMediation::setId, + CreditMediation::getAppellee, + CreditMediation::getCompanyId, + CreditMediation::setCompanyId, + CreditMediation::getTenantId, + CreditMediation::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入诉前调解司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java index dccdd91..f49436b 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditNearbyCompany; import com.gxwebsoft.credit.param.CreditNearbyCompanyImportParam; import com.gxwebsoft.credit.param.CreditNearbyCompanyParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditNearbyCompanyService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditNearbyCompanyController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询附近企业") @GetMapping("/page") public ApiResult> page(CreditNearbyCompanyParam param) { @@ -133,6 +137,43 @@ public class CreditNearbyCompanyController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditNearbyCompany:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditNearbyCompanyService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditNearbyCompany::getId, + CreditNearbyCompany::setId, + CreditNearbyCompany::getName, + CreditNearbyCompany::getCompanyId, + CreditNearbyCompany::setCompanyId, + CreditNearbyCompany::getTenantId, + CreditNearbyCompany::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入附近企业 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditPatentController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditPatentController.java index cd4c1a6..4f29559 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditPatentController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditPatentController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditPatent; import com.gxwebsoft.credit.param.CreditPatentImportParam; import com.gxwebsoft.credit.param.CreditPatentParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditPatentService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditPatentController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询专利") @GetMapping("/page") public ApiResult> page(CreditPatentParam param) { @@ -133,6 +137,43 @@ public class CreditPatentController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditPatent:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditPatentService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditPatent::getId, + CreditPatent::setId, + CreditPatent::getPatentApplicant, + CreditPatent::getCompanyId, + CreditPatent::setCompanyId, + CreditPatent::getTenantId, + CreditPatent::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入专利 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java index d1194a6..17f03f1 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditRiskRelation; import com.gxwebsoft.credit.param.CreditRiskRelationImportParam; import com.gxwebsoft.credit.param.CreditRiskRelationParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditRiskRelationService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -23,6 +24,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * 风险关系表控制器 @@ -40,6 +42,9 @@ public class CreditRiskRelationController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询风险关系表") @GetMapping("/page") public ApiResult> page(CreditRiskRelationParam param) { @@ -132,6 +137,43 @@ public class CreditRiskRelationController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditRiskRelation:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditRiskRelationService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditRiskRelation::getId, + CreditRiskRelation::setId, + CreditRiskRelation::getMainBodyName, + CreditRiskRelation::getCompanyId, + CreditRiskRelation::setCompanyId, + CreditRiskRelation::getTenantId, + CreditRiskRelation::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入风险关系表 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java index 3d77b12..674d22f 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditSupplier; import com.gxwebsoft.credit.param.CreditSupplierImportParam; import com.gxwebsoft.credit.param.CreditSupplierParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditSupplierService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditSupplierController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询供应商") @GetMapping("/page") public ApiResult> page(CreditSupplierParam param) { @@ -133,6 +137,43 @@ public class CreditSupplierController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditSupplier:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditSupplierService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditSupplier::getId, + CreditSupplier::setId, + CreditSupplier::getSupplier, + CreditSupplier::getCompanyId, + CreditSupplier::setCompanyId, + CreditSupplier::getTenantId, + CreditSupplier::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入供应商 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditSuspectedRelationshipController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditSuspectedRelationshipController.java index 6a2deed..42abbab 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditSuspectedRelationshipController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditSuspectedRelationshipController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditSuspectedRelationship; import com.gxwebsoft.credit.param.CreditSuspectedRelationshipImportParam; import com.gxwebsoft.credit.param.CreditSuspectedRelationshipParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditSuspectedRelationshipService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -41,6 +42,9 @@ public class CreditSuspectedRelationshipController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询疑似关系") @GetMapping("/page") public ApiResult> page(CreditSuspectedRelationshipParam param) { @@ -133,6 +137,43 @@ public class CreditSuspectedRelationshipController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditSuspectedRelationship:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditSuspectedRelationshipService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditSuspectedRelationship::getId, + CreditSuspectedRelationship::setId, + CreditSuspectedRelationship::getName, + CreditSuspectedRelationship::getCompanyId, + CreditSuspectedRelationship::setCompanyId, + CreditSuspectedRelationship::getTenantId, + CreditSuspectedRelationship::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入疑似关系 */ diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditUserController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditUserController.java index 27c1124..f85919b 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditUserController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditUserController.java @@ -14,6 +14,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditUser; import com.gxwebsoft.credit.param.CreditUserImportParam; import com.gxwebsoft.credit.param.CreditUserParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditUserService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -57,6 +58,9 @@ public class CreditUserController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询招投标信息表") @GetMapping("/page") public ApiResult> page(CreditUserParam param) { @@ -144,6 +148,43 @@ public class CreditUserController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditUser:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditUserService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditUser::getId, + CreditUser::setId, + CreditUser::getWinningName, + CreditUser::getCompanyId, + CreditUser::setCompanyId, + CreditUser::getTenantId, + CreditUser::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入招投标信息 * Excel表头格式:客户名称、唯一标识、类型、企业角色、上级ID、信息类型、所在国家、所在省份、所在城市、所在辖区、街道地址、招采单位名称、中标单位名称、中标金额、备注、是否推荐、到期时间、排序、状态、用户ID、租户ID diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java index 1740dc4..a13fce7 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java @@ -9,6 +9,7 @@ import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.credit.entity.CreditXgxf; import com.gxwebsoft.credit.param.CreditXgxfImportParam; import com.gxwebsoft.credit.param.CreditXgxfParam; +import com.gxwebsoft.credit.service.CreditCompanyService; import com.gxwebsoft.credit.service.CreditXgxfService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -42,6 +43,9 @@ public class CreditXgxfController extends BaseController { @Resource private BatchImportSupport batchImportSupport; + @Resource + private CreditCompanyService creditCompanyService; + @Operation(summary = "分页查询限制高消费") @GetMapping("/page") public ApiResult> page(CreditXgxfParam param) { @@ -134,6 +138,43 @@ public class CreditXgxfController extends BaseController { return fail("删除失败"); } + /** + * 根据企业名称匹配企业并更新 companyId(匹配 CreditCompany.name / CreditCompany.matchName) + * + *

默认仅更新 companyId=0 的记录;如需覆盖更新,传 onlyNull=false。

+ */ + @PreAuthorize("hasAuthority('credit:creditXgxf:update')") + @OperationLog + @Operation(summary = "根据企业名称匹配并更新companyId") + @PostMapping("/company-id/refresh") + public ApiResult> refreshCompanyIdByCompanyName( + @RequestParam(value = "onlyNull", required = false, defaultValue = "true") Boolean onlyNull, + @RequestParam(value = "limit", required = false) Integer limit + ) { + User loginUser = getLoginUser(); + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName( + creditXgxfService, + creditCompanyService, + currentTenantId, + onlyNull, + limit, + CreditXgxf::getId, + CreditXgxf::setId, + CreditXgxf::getDataType, + CreditXgxf::getCompanyId, + CreditXgxf::setCompanyId, + CreditXgxf::getTenantId, + CreditXgxf::new + ); + + if (!stats.anyDataRead) { + return success("无可更新数据", stats.toMap()); + } + return success("更新完成,更新" + stats.updated + "条", stats.toMap()); + } + /** * 批量导入限制高消费司法大数据 */ diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java b/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java index 2cbf748..7fab26a 100644 --- a/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java @@ -37,7 +37,6 @@ public class CreditBreachOfTrust implements Serializable { private String plaintiffAppellant; @Schema(description = "疑似申请执行人") - @TableField("Appellee") private String appellee; @Schema(description = "涉案金额(元)") diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java index 4887fc5..35735d0 100644 --- a/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java @@ -37,7 +37,6 @@ public class CreditCaseFiling implements Serializable { private String plaintiffAppellant; @Schema(description = "被告/被上诉人") - @TableField("Appellee") private String appellee; @Schema(description = "其他当事人/第三人") diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java index 2ceb2cb..4706ca6 100644 --- a/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java @@ -37,7 +37,6 @@ public class CreditCourtSession implements Serializable { private String plaintiffAppellant; @Schema(description = "被告/被上诉人") - @TableField("Appellee") private String appellee; @Schema(description = "其他当事人/第三人") diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java b/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java index 69867c6..df52790 100644 --- a/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java @@ -58,7 +58,6 @@ public class CreditJudicialDocument implements Serializable { private String releaseDate; @Schema(description = "被告/被上诉人") - @TableField("Appellee") private String appellee; @Schema(description = "法院") diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java b/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java index 4780fa9..71963a0 100644 --- a/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java @@ -37,7 +37,6 @@ public class CreditMediation implements Serializable { private String plaintiffAppellant; @Schema(description = "被告/被上诉人") - @TableField("Appellee") private String appellee; @Schema(description = "其他当事人/第三人") diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustImportParam.java index efb482d..1dc9c0a 100644 --- a/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustImportParam.java +++ b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustImportParam.java @@ -22,7 +22,6 @@ public class CreditBreachOfTrustImportParam implements Serializable { private String plaintiffAppellant; @Excel(name = "疑似申请执行人") - @TableField("Appellee") private String appellee; @Excel(name = "涉案金额(元)") diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java index 3391169..57b340f 100644 --- a/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java +++ b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java @@ -35,7 +35,6 @@ public class CreditBreachOfTrustParam extends BaseParam { private String plaintiffAppellant; @Schema(description = "疑似申请执行人") - @TableField("Appellee") private String appellee; @Schema(description = "涉案金额(元)")