diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java index f6a02e6..cf7cebd 100644 --- a/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditNearbyCompanyController.java @@ -137,6 +137,7 @@ public class CreditNearbyCompanyController extends BaseController { @Operation(summary = "批量导入附近企业") @PostMapping("/import") public ApiResult> importBatch(@RequestParam("file") MultipartFile file, + @RequestParam(value = "companyId", required = false) Integer companyId, @RequestParam(value = "parentId", required = false) Integer parentId, @RequestParam(value = "type", required = false) Integer type) { List errorMessages = new ArrayList<>(); @@ -181,6 +182,9 @@ public class CreditNearbyCompanyController extends BaseController { if (item.getType() == null && type != null) { item.setType(type); } + if (item.getCompanyId() == null && companyId != null) { + item.setCompanyId(companyId); + } if (item.getUserId() == null && currentUserId != null) { item.setUserId(currentUserId); } @@ -208,6 +212,7 @@ public class CreditNearbyCompanyController extends BaseController { CreditNearbyCompany existing = creditNearbyCompanyService.lambdaQuery() .eq(!ImportHelper.isBlank(item.getCode()), CreditNearbyCompany::getCode, item.getCode()) .eq(ImportHelper.isBlank(item.getCode()), CreditNearbyCompany::getName, item.getName()) + .eq(companyId != null, CreditNearbyCompany::getCompanyId, companyId) .eq(parentId != null, CreditNearbyCompany::getParentId, parentId) .eq(type != null, CreditNearbyCompany::getType, type) .one(); diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditAdministrativeLicenseMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditAdministrativeLicenseMapper.xml index d9bcdee..fc34b76 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditAdministrativeLicenseMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditAdministrativeLicenseMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_administrative_license a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -72,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBankruptcyMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBankruptcyMapper.xml index 9e50bbb..9daa686 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBankruptcyMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBankruptcyMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_bankruptcy a + AND a.id = #{param.id} @@ -60,6 +61,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBranchMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBranchMapper.xml index 623f9b6..61609ad 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBranchMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBranchMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_branch a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -60,6 +61,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml index 8bdc719..2cd12d2 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml index 11aabae..513edb2 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml index 6ca9552..4bb5cc8 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml @@ -64,6 +64,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml index 4b105ad..fcadd3f 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml index fdc0d8a..5e96e61 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCustomerMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCustomerMapper.xml index 6806a5d..bcda081 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCustomerMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCustomerMapper.xml @@ -58,6 +58,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml index 324e7fd..2af6961 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml index 29624e9..dc1df00 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml @@ -85,6 +85,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml index defd553..9aaa712 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml index 22d06a9..49d5046 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditHistoricalLegalPersonMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditHistoricalLegalPersonMapper.xml index a71e5e8..729cbf7 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditHistoricalLegalPersonMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditHistoricalLegalPersonMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_historical_legal_person a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -54,6 +55,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorHistoryMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorHistoryMapper.xml index e5835b5..91689bc 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorHistoryMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorHistoryMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_judgment_debtor_history a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -72,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml index 4dc62b0..4b73e53 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudiciaryMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudiciaryMapper.xml index 48ab759..7a6d83f 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudiciaryMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudiciaryMapper.xml @@ -94,6 +94,7 @@ AND (a.name LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml index 6529280..3052dbe 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditNearbyCompanyMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditNearbyCompanyMapper.xml index 6d7171f..2164163 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditNearbyCompanyMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditNearbyCompanyMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_nearby_company a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -13,7 +14,7 @@ AND a.name LIKE CONCAT('%', #{param.name}, '%') - + AND a.company_id = #{param.companyId} @@ -61,9 +62,9 @@ AND a.region LIKE CONCAT('%', #{param.region}, '%') - - AND a.taxpayer_code LIKE CONCAT('%', #{param.taxpayerCode}, '%') - + + + AND a.registration_number LIKE CONCAT('%', #{param.registrationNumber}, '%') @@ -201,6 +202,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditPatentMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditPatentMapper.xml index 1691de9..1fbee90 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditPatentMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditPatentMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_patent a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -72,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml index 2caae1a..20002e7 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml @@ -61,6 +61,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml index ab964a6..51c81b3 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml @@ -58,6 +58,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSuspectedRelationshipMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSuspectedRelationshipMapper.xml index 27444d5..fbb20f2 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSuspectedRelationshipMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSuspectedRelationshipMapper.xml @@ -6,6 +6,7 @@ SELECT a.* FROM credit_suspected_relationship a + LEFT JOIN credit_company b ON a.company_id = b.id AND a.id = #{param.id} @@ -69,6 +70,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml index c08524e..be1e288 100644 --- a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml @@ -73,6 +73,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR b.name = #{param.keywords} ) diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditNearbyCompanyParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditNearbyCompanyParam.java index 4a81a36..f2ba839 100644 --- a/src/main/java/com/gxwebsoft/credit/param/CreditNearbyCompanyParam.java +++ b/src/main/java/com/gxwebsoft/credit/param/CreditNearbyCompanyParam.java @@ -75,7 +75,7 @@ public class CreditNearbyCompanyParam extends BaseParam { @Schema(description = "企业ID") @QueryField(type = QueryType.EQ) - private Integer companyId; + private String companyId; @Schema(description = "纳税人识别号") private String taxpayerCode;