From cb8cc3c530777dc7e0fd8052cf7a7bdc6e13c346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sun, 21 Dec 2025 20:41:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(credit):=20=E6=B7=BB=E5=8A=A0=E5=A4=B1?= =?UTF-8?q?=E4=BF=A1=E8=A2=AB=E6=89=A7=E8=A1=8C=E4=BA=BA=E5=92=8C=E5=8F=B8?= =?UTF-8?q?=E6=B3=95=E5=A4=A7=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增失信被执行人实体类、控制器、Mapper及Service实现 - 新增司法大数据实体类、控制器、Mapper及Service实现 - 实现分页查询、列表查询、详情查询接口 - 支持新增、修改、删除及批量操作接口 - 支持Excel模板下载与数据导入功能 - 配置MQTT生产环境启用开关及连接地址调整 - 移除旧审计报告相关控制器、枚举及DTO定义 --- docs/PROJECT_STARTUP_REPORT.md | 2 +- .../ai/config/KnowledgeBaseConfig.java | 16 - .../gxwebsoft/ai/config/TemplateConfig.java | 12 - .../ai/constants/KnowledgeBaseConstants.java | 19 - .../ai/controller/AuditReportController.java | 144 ------- .../controller/KnowledgeBaseController.java | 59 --- .../gxwebsoft/ai/dto/AuditReportRequest.java | 42 -- .../ai/dto/KnowledgeBaseRequest.java | 20 - .../gxwebsoft/ai/enums/AuditReportEnum.java | 45 -- .../factory/KnowledgeBaseClientFactory.java | 23 -- .../ai/util/KnowledgeBaseCreate.java | 384 ----------------- .../ai/util/KnowledgeBaseManage.java | 145 ------- .../ai/util/KnowledgeBaseRetrieve.java | 110 ----- .../ai/util/KnowledgeBaseUpdate.java | 384 ----------------- .../CreditBreachOfTrustController.java | 274 ++++++++++++ .../CreditCaseFilingController.java | 278 +++++++++++++ .../CreditCompetitorController.java | 272 ++++++++++++ .../CreditCourtAnnouncementController.java | 278 +++++++++++++ .../CreditCourtSessionController.java | 278 +++++++++++++ .../CreditDeliveryNoticeController.java | 278 +++++++++++++ .../controller/CreditExternalController.java | 286 +++++++++++++ .../CreditFinalVersionController.java | 278 +++++++++++++ .../controller/CreditGqdjController.java | 278 +++++++++++++ .../CreditJudgmentDebtorController.java | 271 ++++++++++++ .../CreditJudicialDocumentController.java | 278 +++++++++++++ .../controller/CreditMediationController.java | 278 +++++++++++++ .../CreditRiskRelationController.java | 269 ++++++++++++ .../controller/CreditSupplierController.java | 267 ++++++++++++ .../controller/CreditXgxfController.java | 278 +++++++++++++ .../credit/controller/ExcelImportSupport.java | 81 ++++ .../credit/controller/ImportHelper.java | 39 ++ src/main/java/com/gxwebsoft/credit/data.sql | 389 ++++++++++++++++++ .../credit/entity/CreditBreachOfTrust.java | 95 +++++ .../credit/entity/CreditCaseFiling.java | 95 +++++ .../credit/entity/CreditCompetitor.java | 84 ++++ .../entity/CreditCourtAnnouncement.java | 95 +++++ .../credit/entity/CreditCourtSession.java | 95 +++++ .../credit/entity/CreditDeliveryNotice.java | 95 +++++ .../credit/entity/CreditExternal.java | 107 +++++ .../credit/entity/CreditFinalVersion.java | 95 +++++ .../gxwebsoft/credit/entity/CreditGqdj.java | 95 +++++ .../credit/entity/CreditJudgmentDebtor.java | 84 ++++ .../credit/entity/CreditJudicialDocument.java | 95 +++++ .../credit/entity/CreditMediation.java | 95 +++++ .../credit/entity/CreditRiskRelation.java | 79 ++++ .../credit/entity/CreditSupplier.java | 78 ++++ .../gxwebsoft/credit/entity/CreditXgxf.java | 95 +++++ .../mapper/CreditBreachOfTrustMapper.java | 37 ++ .../credit/mapper/CreditCaseFilingMapper.java | 37 ++ .../credit/mapper/CreditCompetitorMapper.java | 37 ++ .../mapper/CreditCourtAnnouncementMapper.java | 37 ++ .../mapper/CreditCourtSessionMapper.java | 37 ++ .../mapper/CreditDeliveryNoticeMapper.java | 37 ++ .../credit/mapper/CreditExternalMapper.java | 37 ++ .../mapper/CreditFinalVersionMapper.java | 37 ++ .../credit/mapper/CreditGqdjMapper.java | 37 ++ .../mapper/CreditJudgmentDebtorMapper.java | 37 ++ .../mapper/CreditJudicialDocumentMapper.java | 37 ++ .../credit/mapper/CreditMediationMapper.java | 37 ++ .../mapper/CreditRiskRelationMapper.java | 37 ++ .../credit/mapper/CreditSupplierMapper.java | 37 ++ .../credit/mapper/CreditXgxfMapper.java | 37 ++ .../mapper/xml/CreditBreachOfTrustMapper.xml | 87 ++++ .../mapper/xml/CreditCaseFilingMapper.xml | 87 ++++ .../mapper/xml/CreditCompetitorMapper.xml | 78 ++++ .../xml/CreditCourtAnnouncementMapper.xml | 87 ++++ .../mapper/xml/CreditCourtSessionMapper.xml | 87 ++++ .../mapper/xml/CreditDeliveryNoticeMapper.xml | 87 ++++ .../mapper/xml/CreditExternalMapper.xml | 99 +++++ .../mapper/xml/CreditFinalVersionMapper.xml | 87 ++++ .../credit/mapper/xml/CreditGqdjMapper.xml | 87 ++++ .../mapper/xml/CreditJudgmentDebtorMapper.xml | 78 ++++ .../xml/CreditJudicialDocumentMapper.xml | 87 ++++ .../mapper/xml/CreditMediationMapper.xml | 87 ++++ .../mapper/xml/CreditRiskRelationMapper.xml | 75 ++++ .../mapper/xml/CreditSupplierMapper.xml | 72 ++++ .../credit/mapper/xml/CreditXgxfMapper.xml | 87 ++++ .../param/CreditBreachOfTrustParam.java | 84 ++++ .../credit/param/CreditCaseFilingParam.java | 84 ++++ .../param/CreditCompetitorImportParam.java | 38 ++ .../credit/param/CreditCompetitorParam.java | 75 ++++ .../param/CreditCourtAnnouncementParam.java | 84 ++++ .../credit/param/CreditCourtSessionParam.java | 84 ++++ .../param/CreditDeliveryNoticeParam.java | 84 ++++ .../param/CreditExternalImportParam.java | 59 +++ .../credit/param/CreditExternalParam.java | 100 +++++ .../credit/param/CreditFinalVersionParam.java | 84 ++++ .../credit/param/CreditGqdjParam.java | 84 ++++ .../CreditJudgmentDebtorImportParam.java | 38 ++ .../param/CreditJudgmentDebtorParam.java | 75 ++++ .../param/CreditJudicialDocumentParam.java | 84 ++++ .../param/CreditJudicialImportParam.java | 47 +++ .../credit/param/CreditMediationParam.java | 84 ++++ .../param/CreditRiskRelationImportParam.java | 35 ++ .../credit/param/CreditRiskRelationParam.java | 72 ++++ .../param/CreditSupplierImportParam.java | 32 ++ .../credit/param/CreditSupplierParam.java | 69 ++++ .../credit/param/CreditXgxfParam.java | 84 ++++ .../service/CreditBreachOfTrustService.java | 42 ++ .../service/CreditCaseFilingService.java | 42 ++ .../service/CreditCompetitorService.java | 42 ++ .../CreditCourtAnnouncementService.java | 42 ++ .../service/CreditCourtSessionService.java | 42 ++ .../service/CreditDeliveryNoticeService.java | 42 ++ .../credit/service/CreditExternalService.java | 42 ++ .../service/CreditFinalVersionService.java | 42 ++ .../credit/service/CreditGqdjService.java | 42 ++ .../service/CreditJudgmentDebtorService.java | 42 ++ .../CreditJudicialDocumentService.java | 42 ++ .../service/CreditMediationService.java | 42 ++ .../service/CreditRiskRelationService.java | 42 ++ .../credit/service/CreditSupplierService.java | 42 ++ .../credit/service/CreditXgxfService.java | 42 ++ .../impl/CreditBreachOfTrustServiceImpl.java | 47 +++ .../impl/CreditCaseFilingServiceImpl.java | 47 +++ .../impl/CreditCompetitorServiceImpl.java | 47 +++ .../CreditCourtAnnouncementServiceImpl.java | 47 +++ .../impl/CreditCourtSessionServiceImpl.java | 47 +++ .../impl/CreditDeliveryNoticeServiceImpl.java | 47 +++ .../impl/CreditExternalServiceImpl.java | 47 +++ .../impl/CreditFinalVersionServiceImpl.java | 47 +++ .../service/impl/CreditGqdjServiceImpl.java | 47 +++ .../impl/CreditJudgmentDebtorServiceImpl.java | 47 +++ .../CreditJudicialDocumentServiceImpl.java | 47 +++ .../impl/CreditMediationServiceImpl.java | 47 +++ .../impl/CreditRiskRelationServiceImpl.java | 47 +++ .../impl/CreditSupplierServiceImpl.java | 47 +++ .../service/impl/CreditXgxfServiceImpl.java | 47 +++ src/main/resources/application-dev.yml | 2 +- src/main/resources/application-prod.yml | 2 +- 130 files changed, 10677 insertions(+), 1406 deletions(-) delete mode 100644 src/main/java/com/gxwebsoft/ai/config/KnowledgeBaseConfig.java delete mode 100644 src/main/java/com/gxwebsoft/ai/config/TemplateConfig.java delete mode 100644 src/main/java/com/gxwebsoft/ai/constants/KnowledgeBaseConstants.java delete mode 100644 src/main/java/com/gxwebsoft/ai/controller/AuditReportController.java delete mode 100644 src/main/java/com/gxwebsoft/ai/controller/KnowledgeBaseController.java delete mode 100644 src/main/java/com/gxwebsoft/ai/dto/AuditReportRequest.java delete mode 100644 src/main/java/com/gxwebsoft/ai/dto/KnowledgeBaseRequest.java delete mode 100644 src/main/java/com/gxwebsoft/ai/enums/AuditReportEnum.java delete mode 100644 src/main/java/com/gxwebsoft/ai/factory/KnowledgeBaseClientFactory.java delete mode 100644 src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseCreate.java delete mode 100644 src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseManage.java delete mode 100644 src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseRetrieve.java delete mode 100644 src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseUpdate.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/ExcelImportSupport.java create mode 100644 src/main/java/com/gxwebsoft/credit/controller/ImportHelper.java create mode 100644 src/main/java/com/gxwebsoft/credit/data.sql create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditCompetitor.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditCourtAnnouncement.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditDeliveryNotice.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditFinalVersion.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditJudgmentDebtor.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditRiskRelation.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditSupplier.java create mode 100644 src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditBreachOfTrustMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditCaseFilingMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditCompetitorMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditCourtAnnouncementMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditCourtSessionMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditDeliveryNoticeMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditExternalMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditFinalVersionMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditGqdjMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditJudgmentDebtorMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditJudicialDocumentMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditMediationMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditRiskRelationMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditSupplierMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/CreditXgxfMapper.java create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditCaseFilingParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditCompetitorImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditCompetitorParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditCourtAnnouncementParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditCourtSessionParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditDeliveryNoticeParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditExternalImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditExternalParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditFinalVersionParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditGqdjParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditJudicialDocumentParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditJudicialImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditMediationParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditSupplierImportParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditSupplierParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/param/CreditXgxfParam.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditBreachOfTrustService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditCaseFilingService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditCompetitorService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditCourtAnnouncementService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditCourtSessionService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditDeliveryNoticeService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditExternalService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditFinalVersionService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditGqdjService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditJudgmentDebtorService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditJudicialDocumentService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditMediationService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditRiskRelationService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditSupplierService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/CreditXgxfService.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditBreachOfTrustServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditCaseFilingServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditCompetitorServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtAnnouncementServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtSessionServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditDeliveryNoticeServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditExternalServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditFinalVersionServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditGqdjServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditJudgmentDebtorServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditJudicialDocumentServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditMediationServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditRiskRelationServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditSupplierServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/credit/service/impl/CreditXgxfServiceImpl.java diff --git a/docs/PROJECT_STARTUP_REPORT.md b/docs/PROJECT_STARTUP_REPORT.md index 7140236..96be198 100644 --- a/docs/PROJECT_STARTUP_REPORT.md +++ b/docs/PROJECT_STARTUP_REPORT.md @@ -31,7 +31,7 @@ #### 外部服务 - **MQTT服务**: 连接成功 ✅ - - 服务器: tcp://1.14.159.185:1883 + - 服务器: tcp://132.232.214.96:1883 - 客户端ID: hjm_car_1753549632706 - 主题订阅: /SW_GPS/# - **Redis**: 连接配置正常 ✅ diff --git a/src/main/java/com/gxwebsoft/ai/config/KnowledgeBaseConfig.java b/src/main/java/com/gxwebsoft/ai/config/KnowledgeBaseConfig.java deleted file mode 100644 index d34d1ae..0000000 --- a/src/main/java/com/gxwebsoft/ai/config/KnowledgeBaseConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.gxwebsoft.ai.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -@Data -@Component -@ConfigurationProperties(prefix = "aliyun.knowledge-base") -public class KnowledgeBaseConfig { - - private String accessKeyId; - private String accessKeySecret; - private String workspaceId; - -} \ No newline at end of file diff --git a/src/main/java/com/gxwebsoft/ai/config/TemplateConfig.java b/src/main/java/com/gxwebsoft/ai/config/TemplateConfig.java deleted file mode 100644 index 354fc51..0000000 --- a/src/main/java/com/gxwebsoft/ai/config/TemplateConfig.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.gxwebsoft.ai.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -@Data -@Component -@ConfigurationProperties(prefix = "ai.template") -public class TemplateConfig { - private String wordTemplatePath; -} \ No newline at end of file diff --git a/src/main/java/com/gxwebsoft/ai/constants/KnowledgeBaseConstants.java b/src/main/java/com/gxwebsoft/ai/constants/KnowledgeBaseConstants.java deleted file mode 100644 index 340b215..0000000 --- a/src/main/java/com/gxwebsoft/ai/constants/KnowledgeBaseConstants.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.gxwebsoft.ai.constants; - -public class KnowledgeBaseConstants { - - public static final String[] KEY_WORDS = { - "", - "审计依据 法律法规 审计业务约定书 经济责任审计管理办法 中共中央办公厅 国务院办公厅 党政主要领导干部审计规定 国家法规 公司管理制度 年度工作目标 党政主要领导干部经济责任审计规定", - "审计目标 经济责任审计目标 资产负债损益真实性 合法性 效益性 经济指标完成情况 重大决策执行 遵守财经法规 国有资产保值增值 经济责任评价 任职期间履职评价 责任界定 业绩评价", - "审计对象 审计范围 被审计领导干部 [职务] [姓名] 任职期间 [开始日期]至[结束日期] 职务任期 重大问题追溯 重要事项延伸 审计时限 下属子公司 代管企业", - "被审计单位基本情况 单位概况 组织机构 人员结构 财务会计政策 合并口径财务数据 资产总额 负债总额 营业收入 利润 内部控制制度 子公司 代管企业 职能部门设置 合并财务报表", - "审计内容 审计重点 贯彻执行经济方针 重大决策执行 发展战略 年度目标完成 法人治理结构 内部控制 财务真实性 风险管控 党风廉政建设 以往审计整改 三重一大经济决策 资产管理 采购管理 债权债务", - "审计风险 证据不充分 评价不客观 内部控制失效 法律法规变化 风险应对策略 审计证据充分性 评价客观性 内部控制审查 法规政策跟踪 重要性水平", - "审计方法 穿行测试 趋势分析 比率分析 访谈法 数据分析 分析性程序 检查 监盘 观察 询问 函证 计算 重新执行", - "审计步骤 时间安排 准备阶段 实施阶段 报告阶段 归档阶段 审计人员安排 资料收集 实质性程序 审计报告编写 交换意见 审计归档 进点会 进度表", - "审计组织实施 审计组人员分工 职责分配 审计工作计划 前期调研 审前培训 实地审计 质量控制 内部培训 沟通协调 分级复核 集体讨论 重大事项汇报 里程碑事件清单 审计工作组 项目负责人 主审" - }; - - -} \ No newline at end of file diff --git a/src/main/java/com/gxwebsoft/ai/controller/AuditReportController.java b/src/main/java/com/gxwebsoft/ai/controller/AuditReportController.java deleted file mode 100644 index ec8a757..0000000 --- a/src/main/java/com/gxwebsoft/ai/controller/AuditReportController.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.gxwebsoft.ai.controller; - -import java.io.FileOutputStream; -import java.io.OutputStream; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletResponse; - -import org.apache.poi.openxml4j.util.ZipSecureFile; -import org.apache.poi.xwpf.usermodel.XWPFDocument; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import com.alibaba.fastjson.JSONObject; -import com.gxwebsoft.ai.config.TemplateConfig; -import com.gxwebsoft.ai.dto.AuditReportRequest; -import com.gxwebsoft.ai.dto.KnowledgeBaseRequest; -import com.gxwebsoft.ai.enums.AuditReportEnum; -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import com.gxwebsoft.common.system.entity.User; - -import cn.afterturn.easypoi.word.WordExportUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpUtil; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; - -/** - * 审计报告控制器 - * @author GIIT-YC - * - */ -@Tag(name = "审计报告") -@RestController -@RequestMapping("/api/ai/auditReport") -public class AuditReportController extends BaseController { - - @Autowired - private TemplateConfig templateConfig; - - @Autowired - private KnowledgeBaseController knowledgeBaseController; - - private String invok(String query, String knowledge, String history, String suggestion, String userName) { - // 构建请求体 - JSONObject requestBody = new JSONObject(); - JSONObject inputs = new JSONObject(); - inputs.put("query", query); - inputs.put("knowledge", knowledge); - inputs.put("history", history); - inputs.put("suggestion", suggestion); - - requestBody.put("inputs", inputs); - requestBody.put("response_mode", "blocking"); - requestBody.put("user", userName); - - // 发送 POST 请求 - String result = HttpUtil.createPost("http://1.14.159.185:8180/v1/workflows/run") - .header("Authorization", "Bearer app-d7Ok9FECVZG2Ybw9wpg7tGu9") - .header("Content-Type", "application/json") - .body(requestBody.toString()) - .timeout(600000) - .execute() - .body(); - // 解析返回的JSON字符串 - JSONObject jsonResponse = JSONObject.parseObject(result); - // 获取data字段 - JSONObject data = jsonResponse.getJSONObject("data"); - // 获取outputs字段 - JSONObject outputs = data.getJSONObject("outputs"); - // 获取outputs中的result字符串 - String resultStr = outputs.getString("result"); - return resultStr; - } - - /** - * 生成审计报告-单一模块 - */ - @Operation(summary = "生成审计报告-单一模块") - @PostMapping("/generate") - public ApiResult generateAuditReport(@RequestBody AuditReportRequest req) { - final User loginUser = getLoginUser(); - - KnowledgeBaseRequest knowledgeBaseRequest = new KnowledgeBaseRequest(); - knowledgeBaseRequest.setKbId(req.getKbId()); - knowledgeBaseRequest.setFormCommit((req.getFormCommit() > 10) ? req.getFormCommit() / 10 : req.getFormCommit()); - String knowledge = knowledgeBaseController.query(knowledgeBaseRequest).getData().toString(); - - String query = AuditReportEnum.getByCode(req.getFormCommit()).getDesc(); - String ret = this.invok(query, knowledge, req.getHistory(), req.getSuggestion(), loginUser.getUsername()); - - return success(ret); - } - - /** - * 生成并下载审计报告 - */ - @Operation(summary = "生成并下载审计报告") - @PostMapping("/download") - public void downloadAuditReport(@RequestBody AuditReportRequest req, HttpServletResponse response) { - // 保存原始的安全阈值 - double originalMinInflateRatio = ZipSecureFile.getMinInflateRatio(); - - try { - // 降低Zip bomb检测的阈值,解决模板文件的安全检测问题 - ZipSecureFile.setMinInflateRatio(0.001); - - // 准备模板数据 - Map map = new HashMap<>(); - map.put(AuditReportEnum.AUDIT_TITLE.getCode().toString(), req.getFrom0()); - map.put(AuditReportEnum.AUDIT_BASIS.getCode().toString(), req.getFrom1()); - map.put(AuditReportEnum.AUDIT_OBJECTIVE.getCode().toString(), req.getFrom2()); - map.put(AuditReportEnum.AUDIT_SCOPE.getCode().toString(), req.getFrom3()); - map.put(AuditReportEnum.UNIT_OVERVIEW.getCode().toString(), req.getFrom41()); - map.put(AuditReportEnum.ORG_AND_PERSONNEL.getCode().toString(), req.getFrom42()); - map.put(AuditReportEnum.AUDIT_CONTENT_METHODS.getCode().toString(), req.getFrom5()); - - // 使用Easypoi的Word模板功能 - XWPFDocument document = WordExportUtil.exportWord07(templateConfig.getWordTemplatePath(), map); - - // 设置响应头 - response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document"); - response.setHeader("Content-Disposition", "attachment; filename=audit_report.docx"); - - // 输出到响应流 - OutputStream out = response.getOutputStream(); - document.write(out); - out.flush(); - out.close(); - - } catch (Exception e) { - throw new RuntimeException("生成审计报告失败", e); - } finally { - // 恢复原始的安全阈值 - ZipSecureFile.setMinInflateRatio(originalMinInflateRatio); - } - } - -} diff --git a/src/main/java/com/gxwebsoft/ai/controller/KnowledgeBaseController.java b/src/main/java/com/gxwebsoft/ai/controller/KnowledgeBaseController.java deleted file mode 100644 index ed819e4..0000000 --- a/src/main/java/com/gxwebsoft/ai/controller/KnowledgeBaseController.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.gxwebsoft.ai.controller; - -import com.aliyun.bailian20231229.Client; -import com.aliyun.bailian20231229.models.RetrieveResponse; -import com.aliyun.bailian20231229.models.RetrieveResponseBody.RetrieveResponseBodyDataNodes; -import com.gxwebsoft.ai.config.KnowledgeBaseConfig; -import com.gxwebsoft.ai.constants.KnowledgeBaseConstants; -import com.gxwebsoft.ai.factory.KnowledgeBaseClientFactory; -import com.gxwebsoft.ai.util.KnowledgeBaseRetrieve; -import com.gxwebsoft.ai.dto.KnowledgeBaseRequest; -import com.gxwebsoft.common.core.web.ApiResult; -import com.gxwebsoft.common.core.web.BaseController; -import cn.hutool.core.util.StrUtil; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -@Tag(name = "知识库") -@RestController -@RequestMapping("/api/ai/knowledgeBase") -public class KnowledgeBaseController extends BaseController { - - @Autowired - private KnowledgeBaseConfig config; - - @Autowired - private KnowledgeBaseClientFactory clientFactory; - - @Operation(summary = "查询知识库") - @GetMapping("/query") - public ApiResult query(KnowledgeBaseRequest req) { - Set ret = new LinkedHashSet<>(); - String workspaceId = config.getWorkspaceId(); - List keyWords = Arrays.asList(KnowledgeBaseConstants.KEY_WORDS); - String indexId = req.getKbId(); - String query = StrUtil.isEmpty(req.getQuery()) ? keyWords.get(req.getFormCommit()) : req.getQuery(); - Integer topK = req.getTopK() == null ? 10 : req.getTopK(); - - try { - Client client = clientFactory.createClient(); - RetrieveResponse resp = KnowledgeBaseRetrieve.retrieveIndex(client, workspaceId, indexId, query); - for (RetrieveResponseBodyDataNodes node : resp.getBody().getData().getNodes()) { - ret.add(node.getText()); - if (ret.size() >= topK) { - break; - } - } - } catch (Exception e) { - return fail("查询失败:" + e.getMessage()); - } - return success(ret); - } -} \ No newline at end of file diff --git a/src/main/java/com/gxwebsoft/ai/dto/AuditReportRequest.java b/src/main/java/com/gxwebsoft/ai/dto/AuditReportRequest.java deleted file mode 100644 index 1fa78be..0000000 --- a/src/main/java/com/gxwebsoft/ai/dto/AuditReportRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.ai.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Data -public class AuditReportRequest{ - - @Schema(description = "审计标题") - private String from0; - - @Schema(description = "审计依据") - private String from1; - - @Schema(description = "审计目标") - private String from2; - - @Schema(description = "审计对象和范围") - private String from3; - - @Schema(description = "被审计单位基本情况-单位概况") - private String from41; - - @Schema(description = "被审计单位基本情况-机构和人员相关情况") - private String from42; - - @Schema(description = "审计内容和重点及审计方法") - private String from5; - - @Schema(description = "知识库ID") - private String kbId; - - @Schema(description = "生成模块:AuditReportEnum.code") - private Integer formCommit; - - @Schema(description = "历史内容") - private String history; - - @Schema(description = "修改建议") - private String suggestion; - -} diff --git a/src/main/java/com/gxwebsoft/ai/dto/KnowledgeBaseRequest.java b/src/main/java/com/gxwebsoft/ai/dto/KnowledgeBaseRequest.java deleted file mode 100644 index bee6ee3..0000000 --- a/src/main/java/com/gxwebsoft/ai/dto/KnowledgeBaseRequest.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.gxwebsoft.ai.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -@Data -public class KnowledgeBaseRequest { - - @Schema(description = "知识库ID") - private String kbId; - - @Schema(description = "召回内容") - private String query; - - @Schema(description = "召回模块(1~9)") - private Integer formCommit; - - @Schema(description = "返回TOP切片数量") - private Integer topK; -} diff --git a/src/main/java/com/gxwebsoft/ai/enums/AuditReportEnum.java b/src/main/java/com/gxwebsoft/ai/enums/AuditReportEnum.java deleted file mode 100644 index d66b145..0000000 --- a/src/main/java/com/gxwebsoft/ai/enums/AuditReportEnum.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gxwebsoft.ai.enums; - -public enum AuditReportEnum { - - AUDIT_TITLE(0, "审计标题"), - AUDIT_BASIS(1, "审计依据"), - AUDIT_OBJECTIVE(2, "审计目标"), - AUDIT_SCOPE(3, "审计对象和范围"), - UNIT_OVERVIEW(41, "被审计单位基本情况-单位概况"), - ORG_AND_PERSONNEL(42, "被审计单位基本情况-机构和人员相关情况"), - AUDIT_CONTENT_METHODS(5, "审计内容和重点及审计方法"); - - private final Integer code; - private final String desc; - - AuditReportEnum(Integer code, String desc) { - this.code = code; - this.desc = desc; - } - - public Integer getCode() { - return code; - } - - public String getDesc() { - return desc; - } - - public static AuditReportEnum getByCode(Integer code) { - for (AuditReportEnum value : values()) { - if (value.code.equals(code)) { - return value; - } - } - return null; - } - - /** - * 根据代码获取描述信息 - */ - public static String getDescByCode(Integer code) { - AuditReportEnum enumValue = getByCode(code); - return enumValue != null ? enumValue.getDesc() : null; - } -} diff --git a/src/main/java/com/gxwebsoft/ai/factory/KnowledgeBaseClientFactory.java b/src/main/java/com/gxwebsoft/ai/factory/KnowledgeBaseClientFactory.java deleted file mode 100644 index 0fe1c5e..0000000 --- a/src/main/java/com/gxwebsoft/ai/factory/KnowledgeBaseClientFactory.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.gxwebsoft.ai.factory; - -import com.aliyun.bailian20231229.Client; -import com.aliyun.teaopenapi.models.Config; -import com.gxwebsoft.ai.config.KnowledgeBaseConfig; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -@Component -public class KnowledgeBaseClientFactory { - - @Autowired - private KnowledgeBaseConfig config; - - public Client createClient() throws Exception { - Config authConfig = new Config() - .setAccessKeyId(config.getAccessKeyId()) - .setAccessKeySecret(config.getAccessKeySecret()); - // 下方接入地址以公有云的公网接入地址为例,可按需更换接入地址。 - authConfig.endpoint = "bailian.cn-beijing.aliyuncs.com"; - return new com.aliyun.bailian20231229.Client(authConfig); - } -} diff --git a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseCreate.java b/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseCreate.java deleted file mode 100644 index 7ef388a..0000000 --- a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseCreate.java +++ /dev/null @@ -1,384 +0,0 @@ -package com.gxwebsoft.ai.util; - -import com.aliyun.bailian20231229.models.*; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.io.File; -import java.io.FileInputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.MessageDigest; -import java.util.*; -import java.util.concurrent.TimeUnit; - -/** - * 创建知识库 - * @author GIIT-YC - * - */ -public class KnowledgeBaseCreate { - - String ALIBABA_CLOUD_ACCESS_KEY_ID = "LTAI5tD5YRKuxWz6Eg7qrM4P"; - String ALIBABA_CLOUD_ACCESS_KEY_SECRET = "bO8TBDXflOwbtSKimPpG8XrJnyzgTk"; - String WORKSPACE_ID = "llm-4pf5auwewoz34zqu"; - - /** - * 检查并提示设置必要的环境变量。 - * - * @return true 如果所有必需的环境变量都已设置,否则 false - */ - public static boolean checkEnvironmentVariables() { - Map requiredVars = new HashMap<>(); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID"); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码"); - requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID"); - - List missingVars = new ArrayList<>(); - for (Map.Entry entry : requiredVars.entrySet()) { - String value = System.getenv(entry.getKey()); - if (value == null || value.isEmpty()) { - missingVars.add(entry.getKey()); - System.out.println("错误:请设置 " + entry.getKey() + " 环境变量 (" + entry.getValue() + ")"); - } - } - - return missingVars.isEmpty(); - } - - /** - * 计算文档的MD5值。 - * - * @param filePath 文档本地路径 - * @return 文档的MD5值 - * @throws Exception 如果计算过程中发生错误 - */ - public static String calculateMD5(String filePath) throws Exception { - MessageDigest md = MessageDigest.getInstance("MD5"); - try (FileInputStream fis = new FileInputStream(filePath)) { - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = fis.read(buffer)) != -1) { - md.update(buffer, 0, bytesRead); - } - } - StringBuilder sb = new StringBuilder(); - for (byte b : md.digest()) { - sb.append(String.format("%02x", b & 0xff)); - } - return sb.toString(); - } - - /** - * 获取文档大小(以字节为单位)。 - * - * @param filePath 文档本地路径 - * @return 文档大小(以字节为单位) - */ - public static String getFileSize(String filePath) { - File file = new File(filePath); - long fileSize = file.length(); - return String.valueOf(fileSize); - } - - /** - * 初始化客户端(Client)。 - * - * @return 配置好的客户端对象 - */ - public static com.aliyun.bailian20231229.Client createClient() throws Exception { - com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config() - .setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")) - .setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")); - // 下方接入地址以公有云的公网接入地址为例,可按需更换接入地址。 - config.endpoint = "bailian.cn-beijing.aliyuncs.com"; - return new com.aliyun.bailian20231229.Client(config); - } - - /** - * 申请文档上传租约。 - * - * @param client 客户端对象 - * @param categoryId 类目ID - * @param fileName 文档名称 - * @param fileMd5 文档的MD5值 - * @param fileSize 文档大小(以字节为单位) - * @param workspaceId 业务空间ID - * @return 阿里云百炼服务的响应对象 - */ - public static ApplyFileUploadLeaseResponse applyLease(com.aliyun.bailian20231229.Client client, String categoryId, - String fileName, String fileMd5, String fileSize, String workspaceId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.ApplyFileUploadLeaseRequest applyFileUploadLeaseRequest = new com.aliyun.bailian20231229.models.ApplyFileUploadLeaseRequest(); - applyFileUploadLeaseRequest.setFileName(fileName); - applyFileUploadLeaseRequest.setMd5(fileMd5); - applyFileUploadLeaseRequest.setSizeInBytes(fileSize); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - ApplyFileUploadLeaseResponse applyFileUploadLeaseResponse = null; - applyFileUploadLeaseResponse = client.applyFileUploadLeaseWithOptions(categoryId, workspaceId, - applyFileUploadLeaseRequest, headers, runtime); - return applyFileUploadLeaseResponse; - } - - /** - * 上传文档到临时存储。 - * - * @param preSignedUrl 上传租约中的 URL - * @param headers 上传请求的头部 - * @param filePath 文档本地路径 - * @throws Exception 如果上传过程中发生错误 - */ - public static void uploadFile(String preSignedUrl, Map headers, String filePath) throws Exception { - File file = new File(filePath); - if (!file.exists() || !file.isFile()) { - throw new IllegalArgumentException("文件不存在或不是普通文件: " + filePath); - } - - try (FileInputStream fis = new FileInputStream(file)) { - URL url = new URL(preSignedUrl); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.setRequestMethod("PUT"); - conn.setDoOutput(true); - - // 设置上传请求头 - conn.setRequestProperty("X-bailian-extra", headers.get("X-bailian-extra")); - conn.setRequestProperty("Content-Type", headers.get("Content-Type")); - - // 分块读取并上传文档 - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = fis.read(buffer)) != -1) { - conn.getOutputStream().write(buffer, 0, bytesRead); - } - - int responseCode = conn.getResponseCode(); - if (responseCode != 200) { - throw new RuntimeException("上传失败: " + responseCode); - } - } - } - - /** - * 将文档添加到类目中。 - * - * @param client 客户端对象 - * @param leaseId 租约ID - * @param parser 用于文档的解析器 - * @param categoryId 类目ID - * @param workspaceId 业务空间ID - * @return 阿里云百炼服务的响应对象 - */ - public static AddFileResponse addFile(com.aliyun.bailian20231229.Client client, String leaseId, String parser, - String categoryId, String workspaceId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.AddFileRequest addFileRequest = new com.aliyun.bailian20231229.models.AddFileRequest(); - addFileRequest.setLeaseId(leaseId); - addFileRequest.setParser(parser); - addFileRequest.setCategoryId(categoryId); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.addFileWithOptions(workspaceId, addFileRequest, headers, runtime); - } - - /** - * 查询文档的基本信息。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param fileId 文档ID - * @return 阿里云百炼服务的响应对象 - */ - public static DescribeFileResponse describeFile(com.aliyun.bailian20231229.Client client, String workspaceId, - String fileId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.describeFileWithOptions(workspaceId, fileId, headers, runtime); - } - - /** - * 在阿里云百炼服务中创建知识库(初始化)。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param fileId 文档ID - * @param name 知识库名称 - * @param structureType 知识库的数据类型 - * @param sourceType 应用数据的数据类型,支持类目类型和文档类型 - * @param sinkType 知识库的向量存储类型 - * @return 阿里云百炼服务的响应对象 - */ - public static CreateIndexResponse createIndex(com.aliyun.bailian20231229.Client client, String workspaceId, - String fileId, String name, String structureType, String sourceType, String sinkType) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.CreateIndexRequest createIndexRequest = new com.aliyun.bailian20231229.models.CreateIndexRequest(); - createIndexRequest.setStructureType(structureType); - createIndexRequest.setName(name); - createIndexRequest.setSourceType(sourceType); - createIndexRequest.setSinkType(sinkType); - createIndexRequest.setDocumentIds(Collections.singletonList(fileId)); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.createIndexWithOptions(workspaceId, createIndexRequest, headers, runtime); - } - - /** - * 向阿里云百炼服务提交索引任务。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param indexId 知识库ID - * @return 阿里云百炼服务的响应对象 - */ - public static SubmitIndexJobResponse submitIndex(com.aliyun.bailian20231229.Client client, String workspaceId, - String indexId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.SubmitIndexJobRequest submitIndexJobRequest = new com.aliyun.bailian20231229.models.SubmitIndexJobRequest(); - submitIndexJobRequest.setIndexId(indexId); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.submitIndexJobWithOptions(workspaceId, submitIndexJobRequest, headers, runtime); - } - - /** - * 查询索引任务状态。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param jobId 任务ID - * @param indexId 知识库ID - * @return 阿里云百炼服务的响应对象 - */ - public static GetIndexJobStatusResponse getIndexJobStatus(com.aliyun.bailian20231229.Client client, - String workspaceId, String jobId, String indexId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.GetIndexJobStatusRequest getIndexJobStatusRequest = new com.aliyun.bailian20231229.models.GetIndexJobStatusRequest(); - getIndexJobStatusRequest.setIndexId(indexId); - getIndexJobStatusRequest.setJobId(jobId); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - GetIndexJobStatusResponse getIndexJobStatusResponse = null; - getIndexJobStatusResponse = client.getIndexJobStatusWithOptions(workspaceId, getIndexJobStatusRequest, headers, - runtime); - return getIndexJobStatusResponse; - } - - /** - * 使用阿里云百炼服务创建知识库。 - * - * @param filePath 文档本地路径 - * @param workspaceId 业务空间ID - * @param name 知识库名称 - * @return 如果成功,返回知识库ID;否则返回 null - */ - public static String createKnowledgeBase(String filePath, String workspaceId, String name) { - // 设置默认值 - String categoryId = "default"; - String parser = "DASHSCOPE_DOCMIND"; - String sourceType = "DATA_CENTER_FILE"; - String structureType = "unstructured"; - String sinkType = "DEFAULT"; - try { - // 步骤1:初始化客户端(Client) - System.out.println("步骤1:初始化Client"); - com.aliyun.bailian20231229.Client client = createClient(); - - // 步骤2:准备文档信息 - System.out.println("步骤2:准备文档信息"); - String fileName = new File(filePath).getName(); - String fileMd5 = calculateMD5(filePath); - String fileSize = getFileSize(filePath); - - // 步骤3:申请上传租约 - System.out.println("步骤3:向阿里云百炼申请上传租约"); - ApplyFileUploadLeaseResponse leaseResponse = applyLease(client, categoryId, fileName, fileMd5, fileSize, - workspaceId); - String leaseId = leaseResponse.getBody().getData().getFileUploadLeaseId(); - String uploadUrl = leaseResponse.getBody().getData().getParam().getUrl(); - Object uploadHeaders = leaseResponse.getBody().getData().getParam().getHeaders(); - - // 步骤4:上传文档 - System.out.println("步骤4:上传文档到阿里云百炼"); - // 请自行安装jackson-databind - // 将上一步的uploadHeaders转换为Map(Key-Value形式) - ObjectMapper mapper = new ObjectMapper(); - Map uploadHeadersMap = (Map) mapper - .readValue(mapper.writeValueAsString(uploadHeaders), Map.class); - uploadFile(uploadUrl, uploadHeadersMap, filePath); - - // 步骤5:将文档添加到服务器 - System.out.println("步骤5:将文档添加到阿里云百炼服务器"); - AddFileResponse addResponse = addFile(client, leaseId, parser, categoryId, workspaceId); - String fileId = addResponse.getBody().getData().getFileId(); - - // 步骤6:检查文档状态 - System.out.println("步骤6:检查阿里云百炼中的文档状态"); - while (true) { - DescribeFileResponse describeResponse = describeFile(client, workspaceId, fileId); - String status = describeResponse.getBody().getData().getStatus(); - System.out.println("当前文档状态:" + status); - - if (status.equals("INIT")) { - System.out.println("文档待解析,请稍候..."); - } else if (status.equals("PARSING")) { - System.out.println("文档解析中,请稍候..."); - } else if (status.equals("PARSE_SUCCESS")) { - System.out.println("文档解析完成!"); - break; - } else { - System.out.println("未知的文档状态:" + status + ",请联系技术支持。"); - return null; - } - TimeUnit.SECONDS.sleep(5); - } - - // 步骤7:初始化知识库 - System.out.println("步骤7:在阿里云百炼中创建知识库"); - CreateIndexResponse indexResponse = createIndex(client, workspaceId, fileId, name, structureType, - sourceType, sinkType); - String indexId = indexResponse.getBody().getData().getId(); - - // 步骤8:提交索引任务 - System.out.println("步骤8:向阿里云百炼提交索引任务"); - SubmitIndexJobResponse submitResponse = submitIndex(client, workspaceId, indexId); - String jobId = submitResponse.getBody().getData().getId(); - - // 步骤9:获取索引任务状态 - System.out.println("步骤9:获取阿里云百炼索引任务状态"); - while (true) { - GetIndexJobStatusResponse getStatusResponse = getIndexJobStatus(client, workspaceId, jobId, indexId); - String status = getStatusResponse.getBody().getData().getStatus(); - System.out.println("当前索引任务状态:" + status); - - if (status.equals("COMPLETED")) { - break; - } - TimeUnit.SECONDS.sleep(5); - } - - System.out.println("阿里云百炼知识库创建成功!"); - return indexId; - - } catch (Exception e) { - System.out.println("发生错误:" + e.getMessage()); - e.printStackTrace(); - return null; - } - } - - /** - * 主函数。 - */ - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - if (!checkEnvironmentVariables()) { - return; - } - - System.out.print("请输入您需要上传文档的实际本地路径(以Linux为例:/xxx/xxx/阿里云百炼系列手机产品介绍.docx):"); - String filePath = scanner.nextLine(); - - System.out.print("请为您的知识库输入一个名称:"); - String kbName = scanner.nextLine(); - - String workspaceId = System.getenv("WORKSPACE_ID"); - String result = createKnowledgeBase(filePath, workspaceId, kbName); - if (result != null) { - System.out.println("知识库ID: " + result); - } - } -} diff --git a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseManage.java b/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseManage.java deleted file mode 100644 index c669d52..0000000 --- a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseManage.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.gxwebsoft.ai.util; - -import com.aliyun.bailian20231229.models.DeleteIndexResponse; -import com.aliyun.bailian20231229.models.ListIndicesResponse; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.util.*; - -/** - * 管理知识库 - * @author GIIT-YC - * - */ -public class KnowledgeBaseManage { - - String ALIBABA_CLOUD_ACCESS_KEY_ID = "LTAI5tD5YRKuxWz6Eg7qrM4P"; - String ALIBABA_CLOUD_ACCESS_KEY_SECRET = "bO8TBDXflOwbtSKimPpG8XrJnyzgTk"; - String WORKSPACE_ID = "llm-4pf5auwewoz34zqu"; - - /** - * 检查并提示设置必要的环境变量。 - * - * @return true 如果所有必需的环境变量都已设置,否则 false - */ - public static boolean checkEnvironmentVariables() { - Map requiredVars = new HashMap<>(); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID"); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码"); - requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID"); - - List missingVars = new ArrayList<>(); - for (Map.Entry entry : requiredVars.entrySet()) { - String value = System.getenv(entry.getKey()); - if (value == null || value.isEmpty()) { - missingVars.add(entry.getKey()); - System.out.println("错误:请设置 " + entry.getKey() + " 环境变量 (" + entry.getValue() + ")"); - } - } - - return missingVars.isEmpty(); - } - - /** - * 创建并配置客户端(Client) - * - * @return 配置好的客户端(Client) - */ - public static com.aliyun.bailian20231229.Client createClient() throws Exception { - com.aliyun.credentials.Client credential = new com.aliyun.credentials.Client(); - com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config() - .setCredential(credential); - // 下方接入地址以公有云的公网接入地址为例,可按需更换接入地址。 - config.endpoint = "bailian.cn-beijing.aliyuncs.com"; - return new com.aliyun.bailian20231229.Client(config); - } - - /** - * 获取指定业务空间下一个或多个知识库的详细信息 - * - * @param client 客户端(Client) - * @param workspaceId 业务空间ID - * @return 阿里云百炼服务的响应 - */ - public static ListIndicesResponse listIndices(com.aliyun.bailian20231229.Client client, String workspaceId) - throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.ListIndicesRequest listIndicesRequest = new com.aliyun.bailian20231229.models.ListIndicesRequest(); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.listIndicesWithOptions(workspaceId, listIndicesRequest, headers, runtime); - } - - /** - * 永久性删除指定的知识库 - * - * @param client 客户端(Client) - * @param workspaceId 业务空间ID - * @param indexId 知识库ID - * @return 阿里云百炼服务的响应 - */ - public static DeleteIndexResponse deleteIndex(com.aliyun.bailian20231229.Client client, String workspaceId, - String indexId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.DeleteIndexRequest deleteIndexRequest = new com.aliyun.bailian20231229.models.DeleteIndexRequest(); - deleteIndexRequest.setIndexId(indexId); - com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); - return client.deleteIndexWithOptions(workspaceId, deleteIndexRequest, headers, runtime); - } - - /** - * 主函数 - */ - public static void main(String[] args) { - if (!checkEnvironmentVariables()) { - System.out.println("环境变量校验未通过。"); - return; - } - - try { - Scanner scanner = new Scanner(System.in); - System.out.print("请选择要执行的操作:\n1. 查看知识库\n2. 删除知识库\n请输入选项(1或2):"); - String startOption = scanner.nextLine(); - com.aliyun.bailian20231229.Client client = createClient(); - if (startOption.equals("1")) { - // 查看知识库 - System.out.println("\n执行查看知识库"); - String workspaceId = System.getenv("WORKSPACE_ID"); - ListIndicesResponse response = listIndices(client, workspaceId); - // 请自行安装jackson-databind。将响应转换为 JSON 字符串 - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(response.getBody().getData()); - System.out.println(result); - } else if (startOption.equals("2")) { - System.out.println("\n执行删除知识库"); - String workspaceId = System.getenv("WORKSPACE_ID"); - System.out.print("请输入知识库ID:"); // 即 CreateIndex 接口返回的 Data.Id,您也可以在阿里云百炼控制台的知识库页面获取。 - String indexId = scanner.nextLine(); - // 删除前二次确认 - boolean confirm = false; - while (!confirm) { - System.out.print("您确定要永久性删除该知识库 " + indexId + " 吗?(y/n): "); - String input = scanner.nextLine().trim().toLowerCase(); - if (input.equals("y")) { - confirm = true; - } else if (input.equals("n")) { - System.out.println("已取消删除操作。"); - return; - } else { - System.out.println("无效输入,请输入 y 或 n。"); - } - } - DeleteIndexResponse resp = deleteIndex(client, workspaceId, indexId); - if (resp.getBody().getStatus().equals("200")) { - System.out.println("知识库" + indexId + "删除成功!"); - } else { - ObjectMapper mapper = new ObjectMapper(); - System.out.println("发生错误:" + mapper.writeValueAsString(resp.getBody())); - } - } else { - System.out.println("无效的选项,程序退出。"); - } - } catch (Exception e) { - System.out.println("发生错误:" + e.getMessage()); - } - } -} diff --git a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseRetrieve.java b/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseRetrieve.java deleted file mode 100644 index a7b568e..0000000 --- a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseRetrieve.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.gxwebsoft.ai.util; - -import com.aliyun.bailian20231229.models.RetrieveRequest; -import com.aliyun.bailian20231229.models.RetrieveResponse; -import com.aliyun.teautil.models.RuntimeOptions; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.util.*; - -/** - * 检索知识库 - * @author GIIT-YC - * - */ -public class KnowledgeBaseRetrieve { - - static String ALIBABA_CLOUD_ACCESS_KEY_ID = "LTAI5tD5YRKuxWz6Eg7qrM4P"; - static String ALIBABA_CLOUD_ACCESS_KEY_SECRET = "bO8TBDXflOwbtSKimPpG8XrJnyzgTk"; - static String WORKSPACE_ID = "llm-4pf5auwewoz34zqu"; - - - /** - * 检查并提示设置必要的环境变量。 - * - * @return true 如果所有必需的环境变量都已设置,否则 false - */ - public static boolean checkEnvironmentVariables() { - Map requiredVars = new HashMap<>(); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID"); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码"); - requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID"); - - List missingVars = new ArrayList<>(); - for (Map.Entry entry : requiredVars.entrySet()) { - String value = System.getenv(entry.getKey()); - if (value == null || value.isEmpty()) { - missingVars.add(entry.getKey()); - System.out.println("错误:请设置 " + entry.getKey() + " 环境变量 (" + entry.getValue() + ")"); - } - } - - return missingVars.isEmpty(); - } - - /** - * 初始化客户端(Client)。 - * - * @return 配置好的客户端对象 - */ - public static com.aliyun.bailian20231229.Client createClient() throws Exception { - com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config() - .setAccessKeyId(ALIBABA_CLOUD_ACCESS_KEY_ID) - .setAccessKeySecret(ALIBABA_CLOUD_ACCESS_KEY_SECRET); - // 下方接入地址以公有云的公网接入地址为例,可按需更换接入地址。 - config.endpoint = "bailian.cn-beijing.aliyuncs.com"; - return new com.aliyun.bailian20231229.Client(config); - } - - /** - * 在指定的知识库中检索信息。 - * - * @param client 客户端对象(bailian20231229Client) - * @param workspaceId 业务空间ID - * @param indexId 知识库ID - * @param query 检索查询语句 - * @return 阿里云百炼服务的响应 - */ - public static RetrieveResponse retrieveIndex(com.aliyun.bailian20231229.Client client, String workspaceId, - String indexId, String query) throws Exception { - RetrieveRequest retrieveRequest = new RetrieveRequest(); - retrieveRequest.setIndexId(indexId); - retrieveRequest.setQuery(query); - retrieveRequest.setDenseSimilarityTopK(null); - RuntimeOptions runtime = new RuntimeOptions(); - return client.retrieveWithOptions(workspaceId, retrieveRequest, null, runtime); - } - - /** - * 使用阿里云百炼服务检索知识库。 - */ - public static void main(String[] args) { -// if (!checkEnvironmentVariables()) { -// System.out.println("环境变量校验未通过。"); -// return; -// } - - try { - // 步骤1:初始化客户端(Client) - System.out.println("步骤1:创建Client"); - com.aliyun.bailian20231229.Client client = createClient(); - - // 步骤2:检索知识库 - System.out.println("步骤2:检索知识库"); - Scanner scanner = new Scanner(System.in); - System.out.print("请输入知识库ID:"); // 即 CreateIndex 接口返回的 Data.Id,您也可以在阿里云百炼控制台的知识库页面获取。 - String indexId = scanner.nextLine(); - System.out.print("请输入检索query:"); - String query = scanner.nextLine(); - String workspaceId = WORKSPACE_ID; - RetrieveResponse resp = retrieveIndex(client, workspaceId, indexId, query); - - // 请自行安装jackson-databind。将响应体responsebody转换为 JSON 字符串 - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(resp.getBody()); - System.out.println(result); - } catch (Exception e) { - System.out.println("发生错误:" + e.getMessage()); - } - } -} diff --git a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseUpdate.java b/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseUpdate.java deleted file mode 100644 index 276d6dd..0000000 --- a/src/main/java/com/gxwebsoft/ai/util/KnowledgeBaseUpdate.java +++ /dev/null @@ -1,384 +0,0 @@ -package com.gxwebsoft.ai.util; - -import com.aliyun.bailian20231229.models.*; -import com.aliyun.teautil.models.RuntimeOptions; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.io.File; -import java.io.FileInputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.nio.file.Paths; -import java.security.MessageDigest; -import java.util.*; - -/** - * 更新知识库 - * @author GIIT-YC - * - */ -public class KnowledgeBaseUpdate { - - String ALIBABA_CLOUD_ACCESS_KEY_ID = "LTAI5tD5YRKuxWz6Eg7qrM4P"; - String ALIBABA_CLOUD_ACCESS_KEY_SECRET = "bO8TBDXflOwbtSKimPpG8XrJnyzgTk"; - String WORKSPACE_ID = "llm-4pf5auwewoz34zqu"; - - /** - * 检查并提示设置必要的环境变量。 - * - * @return true 如果所有必需的环境变量都已设置,否则 false - */ - public static boolean checkEnvironmentVariables() { - Map requiredVars = new HashMap<>(); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID"); - requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码"); - requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID"); - - List missingVars = new ArrayList<>(); - for (Map.Entry entry : requiredVars.entrySet()) { - String value = System.getenv(entry.getKey()); - if (value == null || value.isEmpty()) { - missingVars.add(entry.getKey()); - System.out.println("错误:请设置 " + entry.getKey() + " 环境变量 (" + entry.getValue() + ")"); - } - } - - return missingVars.isEmpty(); - } - - /** - * 创建并配置客户端(Client) - * - * @return 配置好的客户端(Client) - */ - public static com.aliyun.bailian20231229.Client createClient() throws Exception { - com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config() - .setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID")) - .setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET")); - // 下方接入地址以公有云的公网接入地址为例,可按需更换接入地址。 - config.endpoint = "bailian.cn-beijing.aliyuncs.com"; - return new com.aliyun.bailian20231229.Client(config); - } - - /** - * 计算文档的MD5值 - * - * @param filePath 文档本地路径 - * @return 文档的MD5值 - */ - public static String calculateMD5(String filePath) throws Exception { - MessageDigest md = MessageDigest.getInstance("MD5"); - try (FileInputStream fis = new FileInputStream(filePath)) { - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = fis.read(buffer)) != -1) { - md.update(buffer, 0, bytesRead); - } - } - StringBuilder sb = new StringBuilder(); - for (byte b : md.digest()) { - sb.append(String.format("%02x", b & 0xff)); - } - return sb.toString(); - } - - /** - * 获取文档大小(以字节为单位) - * - * @param filePath 文档本地路径 - * @return 文档大小(以字节为单位) - */ - public static String getFileSize(String filePath) { - File file = new File(filePath); - long fileSize = file.length(); - return String.valueOf(fileSize); - } - - /** - * 申请文档上传租约。 - * - * @param client 客户端对象 - * @param categoryId 类目ID - * @param fileName 文档名称 - * @param fileMd5 文档的MD5值 - * @param fileSize 文档大小(以字节为单位) - * @param workspaceId 业务空间ID - * @return 阿里云百炼服务的响应对象 - */ - public static ApplyFileUploadLeaseResponse applyLease(com.aliyun.bailian20231229.Client client, String categoryId, - String fileName, String fileMd5, String fileSize, String workspaceId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.ApplyFileUploadLeaseRequest applyFileUploadLeaseRequest = new com.aliyun.bailian20231229.models.ApplyFileUploadLeaseRequest(); - applyFileUploadLeaseRequest.setFileName(fileName); - applyFileUploadLeaseRequest.setMd5(fileMd5); - applyFileUploadLeaseRequest.setSizeInBytes(fileSize); - RuntimeOptions runtime = new RuntimeOptions(); - ApplyFileUploadLeaseResponse applyFileUploadLeaseResponse = null; - applyFileUploadLeaseResponse = client.applyFileUploadLeaseWithOptions(categoryId, workspaceId, - applyFileUploadLeaseRequest, headers, runtime); - return applyFileUploadLeaseResponse; - } - - /** - * 上传文档到临时存储。 - * - * @param preSignedUrl 上传租约中的 URL - * @param headers 上传请求的头部 - * @param filePath 文档本地路径 - * @throws Exception 如果上传过程中发生错误 - */ - public static void uploadFile(String preSignedUrl, Map headers, String filePath) throws Exception { - File file = new File(filePath); - if (!file.exists() || !file.isFile()) { - throw new IllegalArgumentException("文件不存在或不是普通文件: " + filePath); - } - - try (FileInputStream fis = new FileInputStream(file)) { - URL url = new URL(preSignedUrl); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.setRequestMethod("PUT"); - conn.setDoOutput(true); - - // 设置上传请求头 - conn.setRequestProperty("X-bailian-extra", headers.get("X-bailian-extra")); - conn.setRequestProperty("Content-Type", headers.get("Content-Type")); - - // 分块读取并上传文档 - byte[] buffer = new byte[4096]; - int bytesRead; - while ((bytesRead = fis.read(buffer)) != -1) { - conn.getOutputStream().write(buffer, 0, bytesRead); - } - - int responseCode = conn.getResponseCode(); - if (responseCode != 200) { - throw new RuntimeException("上传失败: " + responseCode); - } - } - } - - /** - * 将文档添加到类目中。 - * - * @param client 客户端对象 - * @param leaseId 租约ID - * @param parser 用于文档的解析器 - * @param categoryId 类目ID - * @param workspaceId 业务空间ID - * @return 阿里云百炼服务的响应对象 - */ - public static AddFileResponse addFile(com.aliyun.bailian20231229.Client client, String leaseId, String parser, - String categoryId, String workspaceId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.AddFileRequest addFileRequest = new com.aliyun.bailian20231229.models.AddFileRequest(); - addFileRequest.setLeaseId(leaseId); - addFileRequest.setParser(parser); - addFileRequest.setCategoryId(categoryId); - RuntimeOptions runtime = new RuntimeOptions(); - return client.addFileWithOptions(workspaceId, addFileRequest, headers, runtime); - } - - /** - * 查询文档的基本信息。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param fileId 文档ID - * @return 阿里云百炼服务的响应对象 - */ - public static DescribeFileResponse describeFile(com.aliyun.bailian20231229.Client client, String workspaceId, - String fileId) throws Exception { - Map headers = new HashMap<>(); - RuntimeOptions runtime = new RuntimeOptions(); - return client.describeFileWithOptions(workspaceId, fileId, headers, runtime); - } - - /** - * 向一个非结构化知识库追加导入已解析的文档 - * - * @param client 客户端(Client) - * @param workspaceId 业务空间ID - * @param indexId 知识库ID - * @param fileId 文档ID - * @param sourceType 数据类型 - * @return 阿里云百炼服务的响应 - */ - public static SubmitIndexAddDocumentsJobResponse submitIndexAddDocumentsJob( - com.aliyun.bailian20231229.Client client, String workspaceId, String indexId, String fileId, - String sourceType) throws Exception { - Map headers = new HashMap<>(); - SubmitIndexAddDocumentsJobRequest submitIndexAddDocumentsJobRequest = new SubmitIndexAddDocumentsJobRequest(); - submitIndexAddDocumentsJobRequest.setIndexId(indexId); - submitIndexAddDocumentsJobRequest.setDocumentIds(Collections.singletonList(fileId)); - submitIndexAddDocumentsJobRequest.setSourceType(sourceType); - RuntimeOptions runtime = new RuntimeOptions(); - return client.submitIndexAddDocumentsJobWithOptions(workspaceId, submitIndexAddDocumentsJobRequest, headers, - runtime); - } - - /** - * 查询索引任务状态。 - * - * @param client 客户端对象 - * @param workspaceId 业务空间ID - * @param jobId 任务ID - * @param indexId 知识库ID - * @return 阿里云百炼服务的响应对象 - */ - public static GetIndexJobStatusResponse getIndexJobStatus(com.aliyun.bailian20231229.Client client, - String workspaceId, String jobId, String indexId) throws Exception { - Map headers = new HashMap<>(); - com.aliyun.bailian20231229.models.GetIndexJobStatusRequest getIndexJobStatusRequest = new com.aliyun.bailian20231229.models.GetIndexJobStatusRequest(); - getIndexJobStatusRequest.setIndexId(indexId); - getIndexJobStatusRequest.setJobId(jobId); - RuntimeOptions runtime = new RuntimeOptions(); - GetIndexJobStatusResponse getIndexJobStatusResponse = null; - getIndexJobStatusResponse = client.getIndexJobStatusWithOptions(workspaceId, getIndexJobStatusRequest, headers, - runtime); - return getIndexJobStatusResponse; - } - - /** - * 从指定的非结构化知识库中永久删除一个或多个文档 - * - * @param client 客户端(Client) - * @param workspaceId 业务空间ID - * @param indexId 知识库ID - * @param fileId 文档ID - * @return 阿里云百炼服务的响应 - */ - public static DeleteIndexDocumentResponse deleteIndexDocument(com.aliyun.bailian20231229.Client client, - String workspaceId, String indexId, String fileId) throws Exception { - Map headers = new HashMap<>(); - DeleteIndexDocumentRequest deleteIndexDocumentRequest = new DeleteIndexDocumentRequest(); - deleteIndexDocumentRequest.setIndexId(indexId); - deleteIndexDocumentRequest.setDocumentIds(Collections.singletonList(fileId)); - RuntimeOptions runtime = new RuntimeOptions(); - return client.deleteIndexDocumentWithOptions(workspaceId, deleteIndexDocumentRequest, headers, runtime); - } - - /** - * 使用阿里云百炼服务更新知识库 - * - * @param filePath 文档(更新后的)的实际本地路径 - * @param workspaceId 业务空间ID - * @param indexId 需要更新的知识库ID - * @param oldFileId 需要更新的文档的FileID - * @return 如果成功,返回知识库ID;否则返回 null - */ - public static String updateKnowledgeBase(String filePath, String workspaceId, String indexId, String oldFileId) { - // 设置默认值 - String categoryId = "default"; - String parser = "DASHSCOPE_DOCMIND"; - String sourceType = "DATA_CENTER_FILE"; - try { - // 步骤1:初始化客户端(Client) - System.out.println("步骤1:创建Client"); - com.aliyun.bailian20231229.Client client = createClient(); - - // 步骤2:准备文档信息(更新后的文档) - System.out.println("步骤2:准备文档信息"); - String fileName = Paths.get(filePath).getFileName().toString(); - String fileMd5 = calculateMD5(filePath); - String fileSize = getFileSize(filePath); - - // 步骤3:申请上传租约 - System.out.println("步骤3:向阿里云百炼申请上传租约"); - ApplyFileUploadLeaseResponse leaseResponse = applyLease(client, categoryId, fileName, fileMd5, fileSize, - workspaceId); - String leaseId = leaseResponse.getBody().getData().getFileUploadLeaseId(); - String uploadUrl = leaseResponse.getBody().getData().getParam().getUrl(); - Object uploadHeaders = leaseResponse.getBody().getData().getParam().getHeaders(); - - // 步骤4:上传文档到临时存储 - System.out.println("步骤4:上传文档到临时存储"); - // 请自行安装jackson-databind - // 将上一步的uploadHeaders转换为Map(Key-Value形式) - ObjectMapper mapper = new ObjectMapper(); - Map uploadHeadersMap = (Map) mapper - .readValue(mapper.writeValueAsString(uploadHeaders), Map.class); - uploadFile(uploadUrl, uploadHeadersMap, filePath); - - // 步骤5:添加文档到类目中 - System.out.println("步骤5:添加文档到类目中"); - AddFileResponse addResponse = addFile(client, leaseId, parser, categoryId, workspaceId); - String fileId = addResponse.getBody().getData().getFileId(); - - // 步骤6:检查更新后的文档状态 - System.out.println("步骤6:检查阿里云百炼中的文档状态"); - while (true) { - DescribeFileResponse describeResponse = describeFile(client, workspaceId, fileId); - String status = describeResponse.getBody().getData().getStatus(); - System.out.println("当前文档状态:" + status); - if ("INIT".equals(status)) { - System.out.println("文档待解析,请稍候..."); - } else if ("PARSING".equals(status)) { - System.out.println("文档解析中,请稍候..."); - } else if ("PARSE_SUCCESS".equals(status)) { - System.out.println("文档解析完成!"); - break; - } else { - System.out.println("未知的文档状态:" + status + ",请联系技术支持。"); - return null; - } - Thread.sleep(5000); - } - - // 步骤7:提交追加文档任务 - System.out.println("步骤7:提交追加文档任务"); - SubmitIndexAddDocumentsJobResponse indexAddResponse = submitIndexAddDocumentsJob(client, workspaceId, - indexId, fileId, sourceType); - String jobId = indexAddResponse.getBody().getData().getId(); - - // 步骤8:等待追加任务完成 - System.out.println("步骤8:等待追加任务完成"); - while (true) { - GetIndexJobStatusResponse jobStatusResponse = getIndexJobStatus(client, workspaceId, jobId, indexId); - String status = jobStatusResponse.getBody().getData().getStatus(); - System.out.println("当前索引任务状态:" + status); - if ("COMPLETED".equals(status)) { - break; - } - Thread.sleep(5000); - } - - // 步骤9:删除旧文档 - System.out.println("步骤9:删除旧文档"); - deleteIndexDocument(client, workspaceId, indexId, oldFileId); - - System.out.println("阿里云百炼知识库更新成功!"); - return indexId; - } catch (Exception e) { - System.out.println("发生错误:" + e.getMessage()); - return null; - } - } - - /** - * 主函数。 - */ - public static void main(String[] args) { - if (!checkEnvironmentVariables()) { - System.out.println("环境变量校验未通过。"); - return; - } - - Scanner scanner = new Scanner(System.in); - System.out.print("请输入您需要上传文档(更新后的)的实际本地路径(以Linux为例:/xxx/xxx/阿里云百炼系列手机产品介绍.docx):"); - String filePath = scanner.nextLine(); - - System.out.print("请输入需要更新的知识库ID:"); // 即 CreateIndex 接口返回的 Data.Id,您也可以在阿里云百炼控制台的知识库页面获取。 - String indexId = scanner.nextLine(); // 即 AddFile 接口返回的 FileId。您也可以在阿里云百炼控制台的应用数据页面,单击文件名称旁的 ID 图标获取。 - - System.out.print("请输入需要更新的文档的 FileID:"); - String oldFileId = scanner.nextLine(); - - String workspaceId = System.getenv("WORKSPACE_ID"); - String result = updateKnowledgeBase(filePath, workspaceId, indexId, oldFileId); - if (result != null) { - System.out.println("知识库更新成功,返回知识库ID: " + result); - } else { - System.out.println("知识库更新失败。"); - } - } -} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java new file mode 100644 index 0000000..76f3928 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditBreachOfTrustController.java @@ -0,0 +1,274 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditBreachOfTrust; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditBreachOfTrustParam; +import com.gxwebsoft.credit.service.CreditBreachOfTrustService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +/** + * 失信被执行人控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:46:14 + */ +@Tag(name = "失信被执行人管理") +@RestController +@RequestMapping("/api/credit/credit-breach-of-trust") +public class CreditBreachOfTrustController extends BaseController { + @Resource + private CreditBreachOfTrustService creditBreachOfTrustService; + + @Operation(summary = "分页查询失信被执行人") + @GetMapping("/page") + public ApiResult> page(CreditBreachOfTrustParam param) { + // 使用关联查询 + return success(creditBreachOfTrustService.pageRel(param)); + } + + @Operation(summary = "查询全部失信被执行人") + @GetMapping() + public ApiResult> list(CreditBreachOfTrustParam param) { + // 使用关联查询 + return success(creditBreachOfTrustService.listRel(param)); + } + + @Operation(summary = "根据id查询失信被执行人") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditBreachOfTrustService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:save')") + @OperationLog + @Operation(summary = "添加失信被执行人") + @PostMapping() + public ApiResult save(@RequestBody CreditBreachOfTrust creditBreachOfTrust) { + if (creditBreachOfTrustService.save(creditBreachOfTrust)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:update')") + @OperationLog + @Operation(summary = "修改失信被执行人") + @PutMapping() + public ApiResult update(@RequestBody CreditBreachOfTrust creditBreachOfTrust) { + if (creditBreachOfTrustService.updateById(creditBreachOfTrust)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:remove')") + @OperationLog + @Operation(summary = "删除失信被执行人") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditBreachOfTrustService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:save')") + @OperationLog + @Operation(summary = "批量添加失信被执行人") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditBreachOfTrustService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:update')") + @OperationLog + @Operation(summary = "批量修改失信被执行人") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditBreachOfTrustService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:remove')") + @OperationLog + @Operation(summary = "批量删除失信被执行人") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditBreachOfTrustService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入失信被执行人 + */ + @PreAuthorize("hasAuthority('credit:creditBreachOfTrust:save')") + @Operation(summary = "批量导入失信被执行人") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditBreachOfTrust item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditBreachOfTrustService.save(item); + if (!saved) { + CreditBreachOfTrust existing = creditBreachOfTrustService.lambdaQuery() + .eq(CreditBreachOfTrust::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditBreachOfTrustService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载失信被执行人导入模板 + */ + @Operation(summary = "下载失信被执行人导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("失信被执行人"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("失信被执行人导入模板", "失信被执行人", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_breach_of_trust_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditBreachOfTrust convertImportParamToEntity(CreditJudicialImportParam param) { + CreditBreachOfTrust entity = new CreditBreachOfTrust(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java new file mode 100644 index 0000000..54d5b8c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCaseFilingController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditCaseFiling; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditCaseFilingParam; +import com.gxwebsoft.credit.service.CreditCaseFilingService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:47:23 + */ +@Tag(name = "司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-case-filing") +public class CreditCaseFilingController extends BaseController { + @Resource + private CreditCaseFilingService creditCaseFilingService; + + @Operation(summary = "分页查询司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditCaseFilingParam param) { + // 使用关联查询 + return success(creditCaseFilingService.pageRel(param)); + } + + @Operation(summary = "查询全部司法大数据") + @GetMapping() + public ApiResult> list(CreditCaseFilingParam param) { + // 使用关联查询 + return success(creditCaseFilingService.listRel(param)); + } + + @Operation(summary = "根据id查询司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditCaseFilingService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:save')") + @OperationLog + @Operation(summary = "添加司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditCaseFiling creditCaseFiling) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditCaseFiling.setUserId(loginUser.getUserId()); + // } + if (creditCaseFilingService.save(creditCaseFiling)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:update')") + @OperationLog + @Operation(summary = "修改司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditCaseFiling creditCaseFiling) { + if (creditCaseFilingService.updateById(creditCaseFiling)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:remove')") + @OperationLog + @Operation(summary = "删除司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditCaseFilingService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:save')") + @OperationLog + @Operation(summary = "批量添加司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditCaseFilingService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:update')") + @OperationLog + @Operation(summary = "批量修改司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditCaseFilingService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCaseFiling:remove')") + @OperationLog + @Operation(summary = "批量删除司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditCaseFilingService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditCaseFiling:save')") + @Operation(summary = "批量导入司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditCaseFiling item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditCaseFilingService.save(item); + if (!saved) { + CreditCaseFiling existing = creditCaseFilingService.lambdaQuery() + .eq(CreditCaseFiling::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditCaseFilingService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载司法大数据导入模板 + */ + @Operation(summary = "下载司法大数据导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("司法大数据"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("司法大数据导入模板", "司法大数据", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_case_filing_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditCaseFiling convertImportParamToEntity(CreditJudicialImportParam param) { + CreditCaseFiling entity = new CreditCaseFiling(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java new file mode 100644 index 0000000..31598b2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCompetitorController.java @@ -0,0 +1,272 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditCompetitor; +import com.gxwebsoft.credit.param.CreditCompetitorImportParam; +import com.gxwebsoft.credit.param.CreditCompetitorParam; +import com.gxwebsoft.credit.service.CreditCompetitorService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 竞争对手控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:05 + */ +@Tag(name = "竞争对手管理") +@RestController +@RequestMapping("/api/credit/credit-competitor") +public class CreditCompetitorController extends BaseController { + @Resource + private CreditCompetitorService creditCompetitorService; + + @Operation(summary = "分页查询竞争对手") + @GetMapping("/page") + public ApiResult> page(CreditCompetitorParam param) { + // 使用关联查询 + return success(creditCompetitorService.pageRel(param)); + } + + @Operation(summary = "查询全部竞争对手") + @GetMapping() + public ApiResult> list(CreditCompetitorParam param) { + // 使用关联查询 + return success(creditCompetitorService.listRel(param)); + } + + @Operation(summary = "根据id查询竞争对手") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditCompetitorService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:save')") + @OperationLog + @Operation(summary = "添加竞争对手") + @PostMapping() + public ApiResult save(@RequestBody CreditCompetitor creditCompetitor) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditCompetitor.setUserId(loginUser.getUserId()); + // } + if (creditCompetitorService.save(creditCompetitor)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:update')") + @OperationLog + @Operation(summary = "修改竞争对手") + @PutMapping() + public ApiResult update(@RequestBody CreditCompetitor creditCompetitor) { + if (creditCompetitorService.updateById(creditCompetitor)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:remove')") + @OperationLog + @Operation(summary = "删除竞争对手") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditCompetitorService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:save')") + @OperationLog + @Operation(summary = "批量添加竞争对手") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditCompetitorService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:update')") + @OperationLog + @Operation(summary = "批量修改竞争对手") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditCompetitorService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCompetitor:remove')") + @OperationLog + @Operation(summary = "批量删除竞争对手") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditCompetitorService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入竞争对手 + */ + @PreAuthorize("hasAuthority('credit:creditCompetitor:save')") + @Operation(summary = "批量导入竞争对手") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditCompetitorImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditCompetitorImportParam param = list.get(i); + try { + CreditCompetitor item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCompanyName())) { + errorMessages.add("第" + excelRowNumber + "行:企业名称不能为空"); + continue; + } + + boolean saved = creditCompetitorService.save(item); + if (!saved) { + CreditCompetitor existing = creditCompetitorService.lambdaQuery() + .eq(CreditCompetitor::getCompanyName, item.getCompanyName()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditCompetitorService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载竞争对手导入模板 + */ + @Operation(summary = "下载竞争对手导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditCompetitorImportParam example = new CreditCompetitorImportParam(); + example.setCompanyName("示例科技有限公司"); + example.setLegalRepresentative("张三"); + example.setRegisteredCapital("5000"); + example.setEstablishmentDate("2015-01-01"); + example.setRegistrationStatus("存续"); + example.setIndustry("软件和信息服务业"); + example.setProvince("广东省"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("竞争对手导入模板", "竞争对手", CreditCompetitorImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_competitor_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditCompetitorImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCompanyName()) + && ImportHelper.isBlank(param.getLegalRepresentative()) + && ImportHelper.isBlank(param.getRegisteredCapital()) + && ImportHelper.isBlank(param.getEstablishmentDate()); + } + + private CreditCompetitor convertImportParamToEntity(CreditCompetitorImportParam param) { + CreditCompetitor entity = new CreditCompetitor(); + + entity.setCompanyName(param.getCompanyName()); + entity.setLegalRepresentative(param.getLegalRepresentative()); + entity.setRegisteredCapital(ImportHelper.parseBigDecimal(param.getRegisteredCapital(), "注册资本")); + entity.setEstablishmentDate(ImportHelper.parseLocalDate(param.getEstablishmentDate(), "成立日期")); + entity.setRegistrationStatus(param.getRegistrationStatus()); + entity.setIndustry(param.getIndustry()); + entity.setProvince(param.getProvince()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java new file mode 100644 index 0000000..e242d80 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtAnnouncementController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditCourtAnnouncement; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditCourtAnnouncementParam; +import com.gxwebsoft.credit.service.CreditCourtAnnouncementService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 法院公告司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +@Tag(name = "法院公告司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-court-announcement") +public class CreditCourtAnnouncementController extends BaseController { + @Resource + private CreditCourtAnnouncementService creditCourtAnnouncementService; + + @Operation(summary = "分页查询法院公告司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditCourtAnnouncementParam param) { + // 使用关联查询 + return success(creditCourtAnnouncementService.pageRel(param)); + } + + @Operation(summary = "查询全部法院公告司法大数据") + @GetMapping() + public ApiResult> list(CreditCourtAnnouncementParam param) { + // 使用关联查询 + return success(creditCourtAnnouncementService.listRel(param)); + } + + @Operation(summary = "根据id查询法院公告司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditCourtAnnouncementService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:save')") + @OperationLog + @Operation(summary = "添加法院公告司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditCourtAnnouncement creditCourtAnnouncement) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditCourtAnnouncement.setUserId(loginUser.getUserId()); + // } + if (creditCourtAnnouncementService.save(creditCourtAnnouncement)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:update')") + @OperationLog + @Operation(summary = "修改法院公告司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditCourtAnnouncement creditCourtAnnouncement) { + if (creditCourtAnnouncementService.updateById(creditCourtAnnouncement)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:remove')") + @OperationLog + @Operation(summary = "删除法院公告司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditCourtAnnouncementService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:save')") + @OperationLog + @Operation(summary = "批量添加法院公告司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditCourtAnnouncementService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:update')") + @OperationLog + @Operation(summary = "批量修改法院公告司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditCourtAnnouncementService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:remove')") + @OperationLog + @Operation(summary = "批量删除法院公告司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditCourtAnnouncementService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入法院公告司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:save')") + @Operation(summary = "批量导入法院公告司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditCourtAnnouncement item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditCourtAnnouncementService.save(item); + if (!saved) { + CreditCourtAnnouncement existing = creditCourtAnnouncementService.lambdaQuery() + .eq(CreditCourtAnnouncement::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditCourtAnnouncementService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载法院公告司法大数据导入模板 + */ + @Operation(summary = "下载法院公告司法大数据导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("法院公告"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("法院公告导入模板", "法院公告", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_court_announcement_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditCourtAnnouncement convertImportParamToEntity(CreditJudicialImportParam param) { + CreditCourtAnnouncement entity = new CreditCourtAnnouncement(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java new file mode 100644 index 0000000..558699c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditCourtSessionController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditCourtSession; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditCourtSessionParam; +import com.gxwebsoft.credit.service.CreditCourtSessionService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 开庭公告司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:33 + */ +@Tag(name = "开庭公告司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-court-session") +public class CreditCourtSessionController extends BaseController { + @Resource + private CreditCourtSessionService creditCourtSessionService; + + @Operation(summary = "分页查询开庭公告司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditCourtSessionParam param) { + // 使用关联查询 + return success(creditCourtSessionService.pageRel(param)); + } + + @Operation(summary = "查询全部开庭公告司法大数据") + @GetMapping() + public ApiResult> list(CreditCourtSessionParam param) { + // 使用关联查询 + return success(creditCourtSessionService.listRel(param)); + } + + @Operation(summary = "根据id查询开庭公告司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditCourtSessionService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:save')") + @OperationLog + @Operation(summary = "添加开庭公告司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditCourtSession creditCourtSession) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditCourtSession.setUserId(loginUser.getUserId()); + // } + if (creditCourtSessionService.save(creditCourtSession)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:update')") + @OperationLog + @Operation(summary = "修改开庭公告司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditCourtSession creditCourtSession) { + if (creditCourtSessionService.updateById(creditCourtSession)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:remove')") + @OperationLog + @Operation(summary = "删除开庭公告司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditCourtSessionService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:save')") + @OperationLog + @Operation(summary = "批量添加开庭公告司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditCourtSessionService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:update')") + @OperationLog + @Operation(summary = "批量修改开庭公告司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditCourtSessionService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditCourtSession:remove')") + @OperationLog + @Operation(summary = "批量删除开庭公告司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditCourtSessionService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入开庭公告司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditCourtSession:save')") + @Operation(summary = "批量导入开庭公告司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditCourtSession item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditCourtSessionService.save(item); + if (!saved) { + CreditCourtSession existing = creditCourtSessionService.lambdaQuery() + .eq(CreditCourtSession::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditCourtSessionService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载开庭公告司法大数据导入模板 + */ + @Operation(summary = "下载开庭公告司法大数据导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("开庭公告"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("开庭公告导入模板", "开庭公告", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_court_session_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditCourtSession convertImportParamToEntity(CreditJudicialImportParam param) { + CreditCourtSession entity = new CreditCourtSession(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java new file mode 100644 index 0000000..6659b55 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditDeliveryNoticeController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditDeliveryNotice; +import com.gxwebsoft.credit.param.CreditDeliveryNoticeParam; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.service.CreditDeliveryNoticeService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 送达公告司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:52 + */ +@Tag(name = "送达公告司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-delivery-notice") +public class CreditDeliveryNoticeController extends BaseController { + @Resource + private CreditDeliveryNoticeService creditDeliveryNoticeService; + + @Operation(summary = "分页查询送达公告司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditDeliveryNoticeParam param) { + // 使用关联查询 + return success(creditDeliveryNoticeService.pageRel(param)); + } + + @Operation(summary = "查询全部送达公告司法大数据") + @GetMapping() + public ApiResult> list(CreditDeliveryNoticeParam param) { + // 使用关联查询 + return success(creditDeliveryNoticeService.listRel(param)); + } + + @Operation(summary = "根据id查询送达公告司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditDeliveryNoticeService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:save')") + @OperationLog + @Operation(summary = "添加送达公告司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditDeliveryNotice creditDeliveryNotice) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditDeliveryNotice.setUserId(loginUser.getUserId()); + // } + if (creditDeliveryNoticeService.save(creditDeliveryNotice)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:update')") + @OperationLog + @Operation(summary = "修改送达公告司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditDeliveryNotice creditDeliveryNotice) { + if (creditDeliveryNoticeService.updateById(creditDeliveryNotice)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:remove')") + @OperationLog + @Operation(summary = "删除送达公告司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditDeliveryNoticeService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:save')") + @OperationLog + @Operation(summary = "批量添加送达公告司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditDeliveryNoticeService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:update')") + @OperationLog + @Operation(summary = "批量修改送达公告司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditDeliveryNoticeService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:remove')") + @OperationLog + @Operation(summary = "批量删除送达公告司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditDeliveryNoticeService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入送达公告司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditDeliveryNotice:save')") + @Operation(summary = "批量导入送达公告司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditDeliveryNotice item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditDeliveryNoticeService.save(item); + if (!saved) { + CreditDeliveryNotice existing = creditDeliveryNoticeService.lambdaQuery() + .eq(CreditDeliveryNotice::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditDeliveryNoticeService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载送达公告导入模板 + */ + @Operation(summary = "下载送达公告导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("送达公告"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("送达公告导入模板", "送达公告", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_delivery_notice_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditDeliveryNotice convertImportParamToEntity(CreditJudicialImportParam param) { + CreditDeliveryNotice entity = new CreditDeliveryNotice(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java new file mode 100644 index 0000000..f35c968 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditExternalController.java @@ -0,0 +1,286 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditExternal; +import com.gxwebsoft.credit.param.CreditExternalImportParam; +import com.gxwebsoft.credit.param.CreditExternalParam; +import com.gxwebsoft.credit.service.CreditExternalService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 对外投资控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:12 + */ +@Tag(name = "对外投资管理") +@RestController +@RequestMapping("/api/credit/credit-external") +public class CreditExternalController extends BaseController { + @Resource + private CreditExternalService creditExternalService; + + @Operation(summary = "分页查询对外投资") + @GetMapping("/page") + public ApiResult> page(CreditExternalParam param) { + // 使用关联查询 + return success(creditExternalService.pageRel(param)); + } + + @Operation(summary = "查询全部对外投资") + @GetMapping() + public ApiResult> list(CreditExternalParam param) { + // 使用关联查询 + return success(creditExternalService.listRel(param)); + } + + @Operation(summary = "根据id查询对外投资") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditExternalService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:save')") + @OperationLog + @Operation(summary = "添加对外投资") + @PostMapping() + public ApiResult save(@RequestBody CreditExternal creditExternal) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditExternal.setUserId(loginUser.getUserId()); + // } + if (creditExternalService.save(creditExternal)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:update')") + @OperationLog + @Operation(summary = "修改对外投资") + @PutMapping() + public ApiResult update(@RequestBody CreditExternal creditExternal) { + if (creditExternalService.updateById(creditExternal)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:remove')") + @OperationLog + @Operation(summary = "删除对外投资") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditExternalService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:save')") + @OperationLog + @Operation(summary = "批量添加对外投资") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditExternalService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:update')") + @OperationLog + @Operation(summary = "批量修改对外投资") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditExternalService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditExternal:remove')") + @OperationLog + @Operation(summary = "批量删除对外投资") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditExternalService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入对外投资 + */ + @PreAuthorize("hasAuthority('credit:creditExternal:save')") + @Operation(summary = "批量导入对外投资") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditExternalImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditExternalImportParam param = list.get(i); + try { + CreditExternal item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getName())) { + errorMessages.add("第" + excelRowNumber + "行:被投资企业名称不能为空"); + continue; + } + + boolean saved = creditExternalService.save(item); + if (!saved) { + CreditExternal existing = creditExternalService.lambdaQuery() + .eq(CreditExternal::getName, item.getName()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditExternalService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载对外投资导入模板 + */ + @Operation(summary = "下载对外投资导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditExternalImportParam example = new CreditExternalImportParam(); + example.setName("示例科技有限公司"); + example.setStatusTxt("存续"); + example.setLegalRepresentative("李四"); + example.setRegisteredCapital("10000"); + example.setEstablishmentDate("2018-06-01"); + example.setShareholdingRatio("20"); + example.setSubscribedInvestmentAmount("2000"); + example.setSubscribedInvestmentDate("2019-01-01"); + example.setIndirectShareholdingRatio("5"); + example.setInvestmentDate("2019-06-01"); + example.setRegion("上海"); + example.setIndustry("信息技术"); + example.setInvestmentCount(1); + example.setRelatedProductsInstitutions("关联产品示例"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("对外投资导入模板", "对外投资", CreditExternalImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_external_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditExternalImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getName()) + && ImportHelper.isBlank(param.getLegalRepresentative()) + && ImportHelper.isBlank(param.getRegisteredCapital()) + && ImportHelper.isBlank(param.getEstablishmentDate()); + } + + private CreditExternal convertImportParamToEntity(CreditExternalImportParam param) { + CreditExternal entity = new CreditExternal(); + + entity.setName(param.getName()); + entity.setStatusTxt(param.getStatusTxt()); + entity.setLegalRepresentative(param.getLegalRepresentative()); + entity.setRegisteredCapital(ImportHelper.parseBigDecimal(param.getRegisteredCapital(), "注册资本")); + entity.setEstablishmentDate(ImportHelper.parseLocalDate(param.getEstablishmentDate(), "成立日期")); + entity.setShareholdingRatio(ImportHelper.parseBigDecimal(param.getShareholdingRatio(), "持股比例")); + entity.setSubscribedInvestmentAmount(ImportHelper.parseBigDecimal(param.getSubscribedInvestmentAmount(), "认缴出资额")); + entity.setSubscribedInvestmentDate(ImportHelper.parseLocalDate(param.getSubscribedInvestmentDate(), "认缴出资日期")); + entity.setIndirectShareholdingRatio(ImportHelper.parseBigDecimal(param.getIndirectShareholdingRatio(), "间接持股比例")); + entity.setInvestmentDate(ImportHelper.parseLocalDate(param.getInvestmentDate(), "投资日期")); + entity.setRegion(param.getRegion()); + entity.setIndustry(param.getIndustry()); + entity.setInvestmentCount(param.getInvestmentCount()); + entity.setRelatedProductsInstitutions(param.getRelatedProductsInstitutions()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java new file mode 100644 index 0000000..32f39b2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditFinalVersionController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditFinalVersion; +import com.gxwebsoft.credit.param.CreditFinalVersionParam; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.service.CreditFinalVersionService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 终本案件控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +@Tag(name = "终本案件管理") +@RestController +@RequestMapping("/api/credit/credit-final-version") +public class CreditFinalVersionController extends BaseController { + @Resource + private CreditFinalVersionService creditFinalVersionService; + + @Operation(summary = "分页查询终本案件") + @GetMapping("/page") + public ApiResult> page(CreditFinalVersionParam param) { + // 使用关联查询 + return success(creditFinalVersionService.pageRel(param)); + } + + @Operation(summary = "查询全部终本案件") + @GetMapping() + public ApiResult> list(CreditFinalVersionParam param) { + // 使用关联查询 + return success(creditFinalVersionService.listRel(param)); + } + + @Operation(summary = "根据id查询终本案件") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditFinalVersionService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:save')") + @OperationLog + @Operation(summary = "添加终本案件") + @PostMapping() + public ApiResult save(@RequestBody CreditFinalVersion creditFinalVersion) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditFinalVersion.setUserId(loginUser.getUserId()); + // } + if (creditFinalVersionService.save(creditFinalVersion)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:update')") + @OperationLog + @Operation(summary = "修改终本案件") + @PutMapping() + public ApiResult update(@RequestBody CreditFinalVersion creditFinalVersion) { + if (creditFinalVersionService.updateById(creditFinalVersion)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:remove')") + @OperationLog + @Operation(summary = "删除终本案件") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditFinalVersionService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:save')") + @OperationLog + @Operation(summary = "批量添加终本案件") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditFinalVersionService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:update')") + @OperationLog + @Operation(summary = "批量修改终本案件") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditFinalVersionService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditFinalVersion:remove')") + @OperationLog + @Operation(summary = "批量删除终本案件") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditFinalVersionService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入终本案件 + */ + @PreAuthorize("hasAuthority('credit:creditFinalVersion:save')") + @Operation(summary = "批量导入终本案件") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditFinalVersion item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditFinalVersionService.save(item); + if (!saved) { + CreditFinalVersion existing = creditFinalVersionService.lambdaQuery() + .eq(CreditFinalVersion::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditFinalVersionService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载终本案件导入模板 + */ + @Operation(summary = "下载终本案件导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("终本案件"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("终本案件导入模板", "终本案件", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_final_version_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditFinalVersion convertImportParamToEntity(CreditJudicialImportParam param) { + CreditFinalVersion entity = new CreditFinalVersion(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java new file mode 100644 index 0000000..67eeeed --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditGqdjController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditGqdj; +import com.gxwebsoft.credit.param.CreditGqdjParam; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.service.CreditGqdjService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 股权冻结控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +@Tag(name = "股权冻结管理") +@RestController +@RequestMapping("/api/credit/credit-gqdj") +public class CreditGqdjController extends BaseController { + @Resource + private CreditGqdjService creditGqdjService; + + @Operation(summary = "分页查询股权冻结") + @GetMapping("/page") + public ApiResult> page(CreditGqdjParam param) { + // 使用关联查询 + return success(creditGqdjService.pageRel(param)); + } + + @Operation(summary = "查询全部股权冻结") + @GetMapping() + public ApiResult> list(CreditGqdjParam param) { + // 使用关联查询 + return success(creditGqdjService.listRel(param)); + } + + @Operation(summary = "根据id查询股权冻结") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditGqdjService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:save')") + @OperationLog + @Operation(summary = "添加股权冻结") + @PostMapping() + public ApiResult save(@RequestBody CreditGqdj creditGqdj) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditGqdj.setUserId(loginUser.getUserId()); + // } + if (creditGqdjService.save(creditGqdj)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:update')") + @OperationLog + @Operation(summary = "修改股权冻结") + @PutMapping() + public ApiResult update(@RequestBody CreditGqdj creditGqdj) { + if (creditGqdjService.updateById(creditGqdj)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:remove')") + @OperationLog + @Operation(summary = "删除股权冻结") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditGqdjService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:save')") + @OperationLog + @Operation(summary = "批量添加股权冻结") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditGqdjService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:update')") + @OperationLog + @Operation(summary = "批量修改股权冻结") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditGqdjService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditGqdj:remove')") + @OperationLog + @Operation(summary = "批量删除股权冻结") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditGqdjService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入股权冻结司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditGqdj:save')") + @Operation(summary = "批量导入股权冻结司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditGqdj item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditGqdjService.save(item); + if (!saved) { + CreditGqdj existing = creditGqdjService.lambdaQuery() + .eq(CreditGqdj::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditGqdjService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载股权冻结导入模板 + */ + @Operation(summary = "下载股权冻结导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("股权冻结"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("股权冻结导入模板", "股权冻结", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_gqdj_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditGqdj convertImportParamToEntity(CreditJudicialImportParam param) { + CreditGqdj entity = new CreditGqdj(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java new file mode 100644 index 0000000..a14a9e0 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditJudgmentDebtorController.java @@ -0,0 +1,271 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditJudgmentDebtor; +import com.gxwebsoft.credit.param.CreditJudgmentDebtorImportParam; +import com.gxwebsoft.credit.param.CreditJudgmentDebtorParam; +import com.gxwebsoft.credit.service.CreditJudgmentDebtorService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 被执行人控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:55 + */ +@Tag(name = "被执行人管理") +@RestController +@RequestMapping("/api/credit/credit-judgment-debtor") +public class CreditJudgmentDebtorController extends BaseController { + @Resource + private CreditJudgmentDebtorService creditJudgmentDebtorService; + + @Operation(summary = "分页查询被执行人") + @GetMapping("/page") + public ApiResult> page(CreditJudgmentDebtorParam param) { + // 使用关联查询 + return success(creditJudgmentDebtorService.pageRel(param)); + } + + @Operation(summary = "查询全部被执行人") + @GetMapping() + public ApiResult> list(CreditJudgmentDebtorParam param) { + // 使用关联查询 + return success(creditJudgmentDebtorService.listRel(param)); + } + + @Operation(summary = "根据id查询被执行人") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditJudgmentDebtorService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:save')") + @OperationLog + @Operation(summary = "添加被执行人") + @PostMapping() + public ApiResult save(@RequestBody CreditJudgmentDebtor creditJudgmentDebtor) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditJudgmentDebtor.setUserId(loginUser.getUserId()); + // } + if (creditJudgmentDebtorService.save(creditJudgmentDebtor)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:update')") + @OperationLog + @Operation(summary = "修改被执行人") + @PutMapping() + public ApiResult update(@RequestBody CreditJudgmentDebtor creditJudgmentDebtor) { + if (creditJudgmentDebtorService.updateById(creditJudgmentDebtor)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:remove')") + @OperationLog + @Operation(summary = "删除被执行人") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditJudgmentDebtorService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:save')") + @OperationLog + @Operation(summary = "批量添加被执行人") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditJudgmentDebtorService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:update')") + @OperationLog + @Operation(summary = "批量修改被执行人") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditJudgmentDebtorService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:remove')") + @OperationLog + @Operation(summary = "批量删除被执行人") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditJudgmentDebtorService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入被执行人 + */ + @PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:save')") + @Operation(summary = "批量导入被执行人") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudgmentDebtorImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudgmentDebtorImportParam param = list.get(i); + try { + CreditJudgmentDebtor item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditJudgmentDebtorService.save(item); + if (!saved) { + CreditJudgmentDebtor existing = creditJudgmentDebtorService.lambdaQuery() + .eq(CreditJudgmentDebtor::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditJudgmentDebtorService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载被执行人导入模板 + */ + @Operation(summary = "下载被执行人导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudgmentDebtorImportParam example = new CreditJudgmentDebtorImportParam(); + example.setCaseNumber("(2024)示例案号"); + example.setName("某某公司"); + example.setCode("1234567890"); + example.setOccurrenceTime("2024-01-10"); + example.setAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("被执行人导入模板", "被执行人", CreditJudgmentDebtorImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_judgment_debtor_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudgmentDebtorImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getName()) + && ImportHelper.isBlank(param.getCode()); + } + + private CreditJudgmentDebtor convertImportParamToEntity(CreditJudgmentDebtorImportParam param) { + CreditJudgmentDebtor entity = new CreditJudgmentDebtor(); + + entity.setCaseNumber(param.getCaseNumber()); + entity.setName(param.getName()); + entity.setCode(param.getCode()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "立案日期")); + entity.setAmount(ImportHelper.parseBigDecimal(param.getAmount(), "执行标的(元)")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java new file mode 100644 index 0000000..3c2d72e --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditJudicialDocumentController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditJudicialDocument; +import com.gxwebsoft.credit.param.CreditJudicialDocumentParam; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.service.CreditJudicialDocumentService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 裁判文书司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:03 + */ +@Tag(name = "裁判文书司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-judicial-document") +public class CreditJudicialDocumentController extends BaseController { + @Resource + private CreditJudicialDocumentService creditJudicialDocumentService; + + @Operation(summary = "分页查询裁判文书司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditJudicialDocumentParam param) { + // 使用关联查询 + return success(creditJudicialDocumentService.pageRel(param)); + } + + @Operation(summary = "查询全部裁判文书司法大数据") + @GetMapping() + public ApiResult> list(CreditJudicialDocumentParam param) { + // 使用关联查询 + return success(creditJudicialDocumentService.listRel(param)); + } + + @Operation(summary = "根据id查询裁判文书司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditJudicialDocumentService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:save')") + @OperationLog + @Operation(summary = "添加裁判文书司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditJudicialDocument creditJudicialDocument) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditJudicialDocument.setUserId(loginUser.getUserId()); + // } + if (creditJudicialDocumentService.save(creditJudicialDocument)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:update')") + @OperationLog + @Operation(summary = "修改裁判文书司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditJudicialDocument creditJudicialDocument) { + if (creditJudicialDocumentService.updateById(creditJudicialDocument)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:remove')") + @OperationLog + @Operation(summary = "删除裁判文书司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditJudicialDocumentService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:save')") + @OperationLog + @Operation(summary = "批量添加裁判文书司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditJudicialDocumentService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:update')") + @OperationLog + @Operation(summary = "批量修改裁判文书司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditJudicialDocumentService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:remove')") + @OperationLog + @Operation(summary = "批量删除裁判文书司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditJudicialDocumentService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入裁判文书司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditJudicialDocument:save')") + @Operation(summary = "批量导入裁判文书司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditJudicialDocument item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditJudicialDocumentService.save(item); + if (!saved) { + CreditJudicialDocument existing = creditJudicialDocumentService.lambdaQuery() + .eq(CreditJudicialDocument::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditJudicialDocumentService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载裁判文书导入模板 + */ + @Operation(summary = "下载裁判文书导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("裁判文书"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("裁判文书导入模板", "裁判文书", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_judicial_document_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditJudicialDocument convertImportParamToEntity(CreditJudicialImportParam param) { + CreditJudicialDocument entity = new CreditJudicialDocument(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java new file mode 100644 index 0000000..564bfde --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditMediationController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditMediation; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditMediationParam; +import com.gxwebsoft.credit.service.CreditMediationService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 诉前调解司法大数据控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:25 + */ +@Tag(name = "诉前调解司法大数据管理") +@RestController +@RequestMapping("/api/credit/credit-mediation") +public class CreditMediationController extends BaseController { + @Resource + private CreditMediationService creditMediationService; + + @Operation(summary = "分页查询诉前调解司法大数据") + @GetMapping("/page") + public ApiResult> page(CreditMediationParam param) { + // 使用关联查询 + return success(creditMediationService.pageRel(param)); + } + + @Operation(summary = "查询全部诉前调解司法大数据") + @GetMapping() + public ApiResult> list(CreditMediationParam param) { + // 使用关联查询 + return success(creditMediationService.listRel(param)); + } + + @Operation(summary = "根据id查询诉前调解司法大数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditMediationService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:save')") + @OperationLog + @Operation(summary = "添加诉前调解司法大数据") + @PostMapping() + public ApiResult save(@RequestBody CreditMediation creditMediation) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditMediation.setUserId(loginUser.getUserId()); + // } + if (creditMediationService.save(creditMediation)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:update')") + @OperationLog + @Operation(summary = "修改诉前调解司法大数据") + @PutMapping() + public ApiResult update(@RequestBody CreditMediation creditMediation) { + if (creditMediationService.updateById(creditMediation)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:remove')") + @OperationLog + @Operation(summary = "删除诉前调解司法大数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditMediationService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:save')") + @OperationLog + @Operation(summary = "批量添加诉前调解司法大数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditMediationService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:update')") + @OperationLog + @Operation(summary = "批量修改诉前调解司法大数据") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditMediationService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditMediation:remove')") + @OperationLog + @Operation(summary = "批量删除诉前调解司法大数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditMediationService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入诉前调解司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditMediation:save')") + @Operation(summary = "批量导入诉前调解司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditMediation item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditMediationService.save(item); + if (!saved) { + CreditMediation existing = creditMediationService.lambdaQuery() + .eq(CreditMediation::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditMediationService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载诉前调解导入模板 + */ + @Operation(summary = "下载诉前调解导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("诉前调解"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("诉前调解导入模板", "诉前调解", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_mediation_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditMediation convertImportParamToEntity(CreditJudicialImportParam param) { + CreditMediation entity = new CreditMediation(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java new file mode 100644 index 0000000..d58c2c2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditRiskRelationController.java @@ -0,0 +1,269 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditRiskRelation; +import com.gxwebsoft.credit.param.CreditRiskRelationImportParam; +import com.gxwebsoft.credit.param.CreditRiskRelationParam; +import com.gxwebsoft.credit.service.CreditRiskRelationService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 风险关系表控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:41 + */ +@Tag(name = "风险关系表管理") +@RestController +@RequestMapping("/api/credit/credit-risk-relation") +public class CreditRiskRelationController extends BaseController { + @Resource + private CreditRiskRelationService creditRiskRelationService; + + @Operation(summary = "分页查询风险关系表") + @GetMapping("/page") + public ApiResult> page(CreditRiskRelationParam param) { + // 使用关联查询 + return success(creditRiskRelationService.pageRel(param)); + } + + @Operation(summary = "查询全部风险关系表") + @GetMapping() + public ApiResult> list(CreditRiskRelationParam param) { + // 使用关联查询 + return success(creditRiskRelationService.listRel(param)); + } + + @Operation(summary = "根据id查询风险关系表") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditRiskRelationService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:save')") + @OperationLog + @Operation(summary = "添加风险关系表") + @PostMapping() + public ApiResult save(@RequestBody CreditRiskRelation creditRiskRelation) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditRiskRelation.setUserId(loginUser.getUserId()); + // } + if (creditRiskRelationService.save(creditRiskRelation)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:update')") + @OperationLog + @Operation(summary = "修改风险关系表") + @PutMapping() + public ApiResult update(@RequestBody CreditRiskRelation creditRiskRelation) { + if (creditRiskRelationService.updateById(creditRiskRelation)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:remove')") + @OperationLog + @Operation(summary = "删除风险关系表") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditRiskRelationService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:save')") + @OperationLog + @Operation(summary = "批量添加风险关系表") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditRiskRelationService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:update')") + @OperationLog + @Operation(summary = "批量修改风险关系表") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditRiskRelationService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditRiskRelation:remove')") + @OperationLog + @Operation(summary = "批量删除风险关系表") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditRiskRelationService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入风险关系表 + */ + @PreAuthorize("hasAuthority('credit:creditRiskRelation:save')") + @Operation(summary = "批量导入风险关系表") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditRiskRelationImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditRiskRelationImportParam param = list.get(i); + try { + CreditRiskRelation item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getMainBodyName())) { + errorMessages.add("第" + excelRowNumber + "行:主体名称不能为空"); + continue; + } + + boolean saved = creditRiskRelationService.save(item); + if (!saved) { + CreditRiskRelation existing = creditRiskRelationService.lambdaQuery() + .eq(CreditRiskRelation::getMainBodyName, item.getMainBodyName()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditRiskRelationService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载风险关系导入模板 + */ + @Operation(summary = "下载风险关系导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditRiskRelationImportParam example = new CreditRiskRelationImportParam(); + example.setMainBodyName("示例企业"); + example.setRegistrationStatus("存续"); + example.setRegisteredCapital("8000"); + example.setProvinceRegion("浙江"); + example.setAssociatedRelation("关联企业"); + example.setRiskRelation("存在风险关联"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("风险关系导入模板", "风险关系", CreditRiskRelationImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_risk_relation_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditRiskRelationImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getMainBodyName()) + && ImportHelper.isBlank(param.getRegistrationStatus()) + && ImportHelper.isBlank(param.getRegisteredCapital()); + } + + private CreditRiskRelation convertImportParamToEntity(CreditRiskRelationImportParam param) { + CreditRiskRelation entity = new CreditRiskRelation(); + + entity.setMainBodyName(param.getMainBodyName()); + entity.setRegistrationStatus(param.getRegistrationStatus()); + entity.setRegisteredCapital(ImportHelper.parseBigDecimal(param.getRegisteredCapital(), "注册资本")); + entity.setProvinceRegion(param.getProvinceRegion()); + entity.setAssociatedRelation(param.getAssociatedRelation()); + entity.setRiskRelation(param.getRiskRelation()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java new file mode 100644 index 0000000..8682c9c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditSupplierController.java @@ -0,0 +1,267 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditSupplier; +import com.gxwebsoft.credit.param.CreditSupplierImportParam; +import com.gxwebsoft.credit.param.CreditSupplierParam; +import com.gxwebsoft.credit.service.CreditSupplierService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 供应商控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +@Tag(name = "供应商管理") +@RestController +@RequestMapping("/api/credit/credit-supplier") +public class CreditSupplierController extends BaseController { + @Resource + private CreditSupplierService creditSupplierService; + + @Operation(summary = "分页查询供应商") + @GetMapping("/page") + public ApiResult> page(CreditSupplierParam param) { + // 使用关联查询 + return success(creditSupplierService.pageRel(param)); + } + + @Operation(summary = "查询全部供应商") + @GetMapping() + public ApiResult> list(CreditSupplierParam param) { + // 使用关联查询 + return success(creditSupplierService.listRel(param)); + } + + @Operation(summary = "根据id查询供应商") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditSupplierService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:save')") + @OperationLog + @Operation(summary = "添加供应商") + @PostMapping() + public ApiResult save(@RequestBody CreditSupplier creditSupplier) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditSupplier.setUserId(loginUser.getUserId()); + // } + if (creditSupplierService.save(creditSupplier)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:update')") + @OperationLog + @Operation(summary = "修改供应商") + @PutMapping() + public ApiResult update(@RequestBody CreditSupplier creditSupplier) { + if (creditSupplierService.updateById(creditSupplier)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:remove')") + @OperationLog + @Operation(summary = "删除供应商") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditSupplierService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:save')") + @OperationLog + @Operation(summary = "批量添加供应商") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditSupplierService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:update')") + @OperationLog + @Operation(summary = "批量修改供应商") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditSupplierService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditSupplier:remove')") + @OperationLog + @Operation(summary = "批量删除供应商") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditSupplierService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入供应商 + */ + @PreAuthorize("hasAuthority('credit:creditSupplier:save')") + @Operation(summary = "批量导入供应商") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditSupplierImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditSupplierImportParam param = list.get(i); + try { + CreditSupplier item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getSupplier())) { + errorMessages.add("第" + excelRowNumber + "行:供应商不能为空"); + continue; + } + + boolean saved = creditSupplierService.save(item); + if (!saved) { + CreditSupplier existing = creditSupplierService.lambdaQuery() + .eq(CreditSupplier::getSupplier, item.getSupplier()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditSupplierService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载供应商导入模板 + */ + @Operation(summary = "下载供应商导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditSupplierImportParam example = new CreditSupplierImportParam(); + example.setSupplier("示例供应商"); + example.setStatusTxt("合作中"); + example.setPurchaseAmount("120"); + example.setPublicDate("2024-02-01"); + example.setDataSource("公开渠道"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("供应商导入模板", "供应商", CreditSupplierImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_supplier_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditSupplierImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getSupplier()) + && ImportHelper.isBlank(param.getStatusTxt()) + && ImportHelper.isBlank(param.getPurchaseAmount()); + } + + private CreditSupplier convertImportParamToEntity(CreditSupplierImportParam param) { + CreditSupplier entity = new CreditSupplier(); + + entity.setSupplier(param.getSupplier()); + entity.setStatusTxt(param.getStatusTxt()); + entity.setPurchaseAmount(ImportHelper.parseBigDecimal(param.getPurchaseAmount(), "采购金额(万元)")); + entity.setPublicDate(ImportHelper.parseLocalDate(param.getPublicDate(), "公开日期")); + entity.setDataSource(param.getDataSource()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java b/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java new file mode 100644 index 0000000..8fd4a14 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/CreditXgxfController.java @@ -0,0 +1,278 @@ +package com.gxwebsoft.credit.controller; + +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.core.web.ApiResult; +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.CreditXgxf; +import com.gxwebsoft.credit.param.CreditJudicialImportParam; +import com.gxwebsoft.credit.param.CreditXgxfParam; +import com.gxwebsoft.credit.service.CreditXgxfService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 限制高消费控制器 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:55 + */ +@Tag(name = "限制高消费管理") +@RestController +@RequestMapping("/api/credit/credit-xgxf") +public class CreditXgxfController extends BaseController { + @Resource + private CreditXgxfService creditXgxfService; + + @Operation(summary = "分页查询限制高消费") + @GetMapping("/page") + public ApiResult> page(CreditXgxfParam param) { + // 使用关联查询 + return success(creditXgxfService.pageRel(param)); + } + + @Operation(summary = "查询全部限制高消费") + @GetMapping() + public ApiResult> list(CreditXgxfParam param) { + // 使用关联查询 + return success(creditXgxfService.listRel(param)); + } + + @Operation(summary = "根据id查询限制高消费") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(creditXgxfService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:save')") + @OperationLog + @Operation(summary = "添加限制高消费") + @PostMapping() + public ApiResult save(@RequestBody CreditXgxf creditXgxf) { + // 记录当前登录用户id + // User loginUser = getLoginUser(); + // if (loginUser != null) { + // creditXgxf.setUserId(loginUser.getUserId()); + // } + if (creditXgxfService.save(creditXgxf)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:update')") + @OperationLog + @Operation(summary = "修改限制高消费") + @PutMapping() + public ApiResult update(@RequestBody CreditXgxf creditXgxf) { + if (creditXgxfService.updateById(creditXgxf)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:remove')") + @OperationLog + @Operation(summary = "删除限制高消费") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (creditXgxfService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:save')") + @OperationLog + @Operation(summary = "批量添加限制高消费") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (creditXgxfService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:update')") + @OperationLog + @Operation(summary = "批量修改限制高消费") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(creditXgxfService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('credit:creditXgxf:remove')") + @OperationLog + @Operation(summary = "批量删除限制高消费") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (creditXgxfService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + /** + * 批量导入限制高消费司法大数据 + */ + @PreAuthorize("hasAuthority('credit:creditXgxf:save')") + @Operation(summary = "批量导入限制高消费司法大数据") + @PostMapping("/import") + public ApiResult> importBatch(@RequestParam("file") MultipartFile file) { + List errorMessages = new ArrayList<>(); + int successCount = 0; + + try { + ExcelImportSupport.ImportResult importResult = ExcelImportSupport.read( + file, CreditJudicialImportParam.class, this::isEmptyImportRow); + List list = importResult.getData(); + int usedTitleRows = importResult.getTitleRows(); + int usedHeadRows = importResult.getHeadRows(); + + if (CollectionUtils.isEmpty(list)) { + return fail("未读取到数据,请确认模板表头与示例格式一致", null); + } + + User loginUser = getLoginUser(); + Integer currentUserId = loginUser != null ? loginUser.getUserId() : null; + Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null; + + for (int i = 0; i < list.size(); i++) { + CreditJudicialImportParam param = list.get(i); + try { + CreditXgxf item = convertImportParamToEntity(param); + + if (item.getUserId() == null && currentUserId != null) { + item.setUserId(currentUserId); + } + if (item.getTenantId() == null && currentTenantId != null) { + item.setTenantId(currentTenantId); + } + if (item.getStatus() == null) { + item.setStatus(0); + } + if (item.getRecommend() == null) { + item.setRecommend(0); + } + if (item.getDeleted() == null) { + item.setDeleted(0); + } + + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + if (ImportHelper.isBlank(item.getCaseNumber())) { + errorMessages.add("第" + excelRowNumber + "行:案号不能为空"); + continue; + } + + boolean saved = creditXgxfService.save(item); + if (!saved) { + CreditXgxf existing = creditXgxfService.lambdaQuery() + .eq(CreditXgxf::getCaseNumber, item.getCaseNumber()) + .one(); + if (existing != null) { + item.setId(existing.getId()); + if (creditXgxfService.updateById(item)) { + successCount++; + continue; + } + } + } else { + successCount++; + continue; + } + errorMessages.add("第" + excelRowNumber + "行:保存失败"); + } catch (Exception e) { + int excelRowNumber = i + 1 + usedTitleRows + usedHeadRows; + errorMessages.add("第" + excelRowNumber + "行:" + e.getMessage()); + e.printStackTrace(); + } + } + + if (errorMessages.isEmpty()) { + return success("成功导入" + successCount + "条数据", null); + } else { + return success("导入完成,成功" + successCount + "条,失败" + errorMessages.size() + "条", errorMessages); + } + } catch (Exception e) { + e.printStackTrace(); + return fail("导入失败:" + e.getMessage(), null); + } + } + + /** + * 下载限制高消费导入模板 + */ + @Operation(summary = "下载限制高消费导入模板") + @GetMapping("/import/template") + public void downloadTemplate(HttpServletResponse response) throws IOException { + List templateList = new ArrayList<>(); + + CreditJudicialImportParam example = new CreditJudicialImportParam(); + example.setDataType("限制高消费"); + example.setPlaintiffAppellant("原告示例"); + example.setAppellee("被告示例"); + example.setOtherPartiesThirdParty("第三人示例"); + example.setOccurrenceTime("2024-01-01"); + example.setCaseNumber("(2024)示例案号"); + example.setCauseOfAction("案由示例"); + example.setInvolvedAmount("100000"); + example.setCourtName("示例法院"); + example.setDataStatus("已公开"); + example.setComments("备注信息"); + templateList.add(example); + + Workbook workbook = ExcelImportSupport.buildTemplate("限制高消费导入模板", "限制高消费", CreditJudicialImportParam.class, templateList); + + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setHeader("Content-Disposition", "attachment; filename=credit_xgxf_import_template.xlsx"); + + workbook.write(response.getOutputStream()); + workbook.close(); + } + + private boolean isEmptyImportRow(CreditJudicialImportParam param) { + if (param == null) { + return true; + } + return ImportHelper.isBlank(param.getCaseNumber()) + && ImportHelper.isBlank(param.getPlaintiffAppellant()) + && ImportHelper.isBlank(param.getAppellee()) + && ImportHelper.isBlank(param.getCauseOfAction()); + } + + private CreditXgxf convertImportParamToEntity(CreditJudicialImportParam param) { + CreditXgxf entity = new CreditXgxf(); + + entity.setDataType(param.getDataType()); + entity.setPlaintiffAppellant(param.getPlaintiffAppellant()); + entity.setAppellee(param.getAppellee()); + entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty()); + entity.setOccurrenceTime(ImportHelper.parseLocalDate(param.getOccurrenceTime(), "发生时间")); + entity.setCaseNumber(param.getCaseNumber()); + entity.setCauseOfAction(param.getCauseOfAction()); + entity.setInvolvedAmount(ImportHelper.parseBigDecimal(param.getInvolvedAmount(), "涉案金额")); + entity.setCourtName(param.getCourtName()); + entity.setDataStatus(param.getDataStatus()); + entity.setComments(param.getComments()); + + return entity; + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/ExcelImportSupport.java b/src/main/java/com/gxwebsoft/credit/controller/ExcelImportSupport.java new file mode 100644 index 0000000..59cc28d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/ExcelImportSupport.java @@ -0,0 +1,81 @@ +package com.gxwebsoft.credit.controller; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.util.CollectionUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.function.Predicate; + +/** + * Excel 导入导出通用支持 + */ +public class ExcelImportSupport { + + public static class ImportResult { + private final List data; + private final int titleRows; + private final int headRows; + + public ImportResult(List data, int titleRows, int headRows) { + this.data = data; + this.titleRows = titleRows; + this.headRows = headRows; + } + + public List getData() { + return data; + } + + public int getTitleRows() { + return titleRows; + } + + public int getHeadRows() { + return headRows; + } + } + + public static ImportResult read(MultipartFile file, Class clazz, Predicate emptyRowPredicate) throws Exception { + 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(importSheet(file, clazz, config[0], config[1]), emptyRowPredicate); + if (!CollectionUtils.isEmpty(list)) { + usedTitleRows = config[0]; + usedHeadRows = config[1]; + break; + } + } + return new ImportResult<>(list, usedTitleRows, usedHeadRows); + } + + private static List importSheet(MultipartFile file, Class clazz, int titleRows, int headRows) throws Exception { + ImportParams importParams = new ImportParams(); + importParams.setTitleRows(titleRows); + importParams.setHeadRows(headRows); + importParams.setStartSheetIndex(0); + importParams.setSheetNum(1); + return ExcelImportUtil.importExcel(file.getInputStream(), clazz, importParams); + } + + private static List filterEmptyRows(List rawList, Predicate emptyRowPredicate) { + if (CollectionUtils.isEmpty(rawList)) { + return rawList; + } + rawList.removeIf(emptyRowPredicate); + return rawList; + } + + public static Workbook buildTemplate(String title, String sheetName, Class clazz, List examples) { + ExportParams exportParams = new ExportParams(title, sheetName); + return ExcelExportUtil.exportExcel(exportParams, clazz, examples); + } +} diff --git a/src/main/java/com/gxwebsoft/credit/controller/ImportHelper.java b/src/main/java/com/gxwebsoft/credit/controller/ImportHelper.java new file mode 100644 index 0000000..c3590be --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/controller/ImportHelper.java @@ -0,0 +1,39 @@ +package com.gxwebsoft.credit.controller; + +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + * 导入解析辅助工具 + */ +public final class ImportHelper { + + private ImportHelper() { + } + + public static boolean isBlank(String value) { + return value == null || value.trim().isEmpty(); + } + + public static BigDecimal parseBigDecimal(String value, String fieldLabel) { + if (isBlank(value)) { + return null; + } + try { + return new BigDecimal(value.trim()); + } catch (Exception e) { + throw new IllegalArgumentException(fieldLabel + "格式不正确"); + } + } + + public static LocalDate parseLocalDate(String value, String fieldLabel) { + if (isBlank(value)) { + return null; + } + try { + return LocalDate.parse(value.trim()); + } catch (Exception e) { + throw new IllegalArgumentException(fieldLabel + "日期格式应为yyyy-MM-dd"); + } + } +} diff --git a/src/main/java/com/gxwebsoft/credit/data.sql b/src/main/java/com/gxwebsoft/credit/data.sql new file mode 100644 index 0000000..750527d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/data.sql @@ -0,0 +1,389 @@ +CREATE TABLE credit_risk_relation ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '序号', + `main_body_name` VARCHAR(255) COMMENT '主体名称', + `registration_status` VARCHAR(50) COMMENT '登记状态', + `registered_capital` DECIMAL(18, 2) COMMENT '注册资本', + `province_region` VARCHAR(255) COMMENT '省份地区', + `associated_relation` VARCHAR(255) COMMENT '关联关系', + `risk_relation` VARCHAR(255) COMMENT '风险关系', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `main_body_name` (`main_body_name`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '风险关系表'; + + +CREATE TABLE credit_competitor ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '序号', + `company_name` VARCHAR(255) COMMENT '企业名称', + `legal_representative` VARCHAR(255) COMMENT '法定代表人', + `registered_capital` DECIMAL(18, 2) COMMENT '注册资本', + `establishment_date` DATE COMMENT '成立日期', + `registration_status` VARCHAR(50) COMMENT '登记状态', + `industry` VARCHAR(255) COMMENT '所属行业', + `province` VARCHAR(50) COMMENT '所属省份', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `company_name` (`company_name`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '竞争对手'; + + + +CREATE TABLE credit_customer ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` VARCHAR(255) COMMENT '客户', + `status_txt` VARCHAR(50) COMMENT '状态', + `price` DECIMAL(10, 2) COMMENT '销售金额(万元)', + `public_date` DATE COMMENT '公开日期', + `data_source` VARCHAR(255) COMMENT '数据来源', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `name` (`name`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '客户'; + + +CREATE TABLE credit_judicial_big_data ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMIT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '司法大数据'; + + + + +CREATE TABLE credit_case_filing ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMIT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '立案信息司法大数据'; + + + +CREATE TABLE credit_court_session ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '开庭公告司法大数据'; + + + +CREATE TABLE credit_court_announcement ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '法院公告司法大数据'; + + + + +CREATE TABLE credit_delivery_notice ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '送达公告司法大数据'; + + + +CREATE TABLE credit_judicial_document ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '裁判文书司法大数据'; + + + +CREATE TABLE credit_judgment_debtor ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `case_number` VARCHAR(50) COMMENT '案号', + `name` VARCHAR(250) COMMENT '被执行人名称', + `code` VARCHAR(100) COMMENT '证件号/组织机构代码', + `occurrence_time` DATE COMMENT '立案日期', + `amount` DECIMAL(18, 2) COMMENT '执行标的(元)', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '被执行人'; + + + +CREATE TABLE credit_judgment_debtor ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `case_number` VARCHAR(50) COMMENT '案号', + `name` VARCHAR(250) COMMENT '被执行人名称', + `code` VARCHAR(100) COMMENT '证件号/组织机构代码', + `occurrence_time` DATE COMMENT '立案日期', + `amount` DECIMAL(18, 2) COMMENT '执行标的(元)', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '被执行人'; + + + + +CREATE TABLE credit_breach_of_trust ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '失信被执行人'; + + + + +CREATE TABLE credit_final_version ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '终本案件'; + + + +CREATE TABLE credit_xgxf ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '限制高消费'; + + + +CREATE TABLE credit_gqdj ( + `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', + `data_type` VARCHAR(50) COMMENT '数据类型', + `plaintiff_appellant` VARCHAR(255) COMMENT '原告/上诉人', + `defendant Appellee` VARCHAR(255) COMMENT '被告/被上诉人', + `other_parties_third_party` VARCHAR(255) COMMENT '其他当事人/第三人', + `occurrence_time` DATE COMMENT '发生时间', + `case_number` VARCHAR(50) COMMENT '案号', + `cause_of_action` VARCHAR(255) COMMENT '案由', + `involved_amount` DECIMAL(18, 2) COMMENT '涉案金额', + `court_name` VARCHAR(255) COMMENT '法院', + `data_status` ENUM('正常', '异常') COMMENT '数据状态', + `comments` varchar(300) NOT NULL DEFAULT '' COMMENT '备注', + `recommend` int NOT NULL DEFAULT '0' COMMENT '是否推荐', + `sort_number` int unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)', + `status` int unsigned NOT NULL DEFAULT '0' COMMENT '状态, 0正常, 1冻结', + `deleted` int NOT NULL DEFAULT '0' COMMENT '是否删除, 0否, 1是', + `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID', + `tenant_id` int NOT NULL DEFAULT '1' COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `tenant_id` (`tenant_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COMMENT '股权冻结'; diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java b/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java new file mode 100644 index 0000000..ea42ef7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditBreachOfTrust.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 失信被执行人 + * + * @author 科技小王子 + * @since 2025-12-19 19:46:14 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditBreachOfTrust对象", description = "失信被执行人") +public class CreditBreachOfTrust implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java new file mode 100644 index 0000000..30b2dc5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCaseFiling.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:47:22 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditCaseFiling对象", description = "司法大数据") +public class CreditCaseFiling implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCompetitor.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCompetitor.java new file mode 100644 index 0000000..223055e --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCompetitor.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 竞争对手 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:04 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditCompetitor对象", description = "竞争对手") +public class CreditCompetitor implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "序号") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "企业名称") + private String companyName; + + @Schema(description = "法定代表人") + private String legalRepresentative; + + @Schema(description = "注册资本") + private BigDecimal registeredCapital; + + @Schema(description = "成立日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate establishmentDate; + + @Schema(description = "登记状态") + private String registrationStatus; + + @Schema(description = "所属行业") + private String industry; + + @Schema(description = "所属省份") + private String province; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCourtAnnouncement.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtAnnouncement.java new file mode 100644 index 0000000..81f8096 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtAnnouncement.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 法院公告司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditCourtAnnouncement对象", description = "法院公告司法大数据") +public class CreditCourtAnnouncement implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java new file mode 100644 index 0000000..0ad631d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditCourtSession.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 开庭公告司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:32 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditCourtSession对象", description = "开庭公告司法大数据") +public class CreditCourtSession implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditDeliveryNotice.java b/src/main/java/com/gxwebsoft/credit/entity/CreditDeliveryNotice.java new file mode 100644 index 0000000..6392520 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditDeliveryNotice.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 送达公告司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:51 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditDeliveryNotice对象", description = "送达公告司法大数据") +public class CreditDeliveryNotice implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java b/src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java new file mode 100644 index 0000000..d623556 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java @@ -0,0 +1,107 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 对外投资 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:11 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditExternal对象", description = "对外投资") +public class CreditExternal implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "被投资企业名称") + private String name; + + @Schema(description = "企业状态(如存续、注销等)") + private String statusTxt; + + @Schema(description = "法定代表人姓名") + private String legalRepresentative; + + @Schema(description = "注册资本(金额)") + private BigDecimal registeredCapital; + + @Schema(description = "成立日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate establishmentDate; + + @Schema(description = "持股比例") + private BigDecimal shareholdingRatio; + + @Schema(description = "认缴出资额") + private BigDecimal subscribedInvestmentAmount; + + @Schema(description = "认缴出资日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate subscribedInvestmentDate; + + @Schema(description = "间接持股比例") + private BigDecimal indirectShareholdingRatio; + + @Schema(description = "投资日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate investmentDate; + + @Schema(description = "所属地区") + private String region; + + @Schema(description = "所属行业") + private String industry; + + @Schema(description = "投资数量") + private Integer investmentCount; + + @Schema(description = "关联产品/机构") + private String relatedProductsInstitutions; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditFinalVersion.java b/src/main/java/com/gxwebsoft/credit/entity/CreditFinalVersion.java new file mode 100644 index 0000000..66954cc --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditFinalVersion.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 终本案件 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditFinalVersion对象", description = "终本案件") +public class CreditFinalVersion implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java b/src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java new file mode 100644 index 0000000..9cd8ea5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 股权冻结 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditGqdj对象", description = "股权冻结") +public class CreditGqdj implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditJudgmentDebtor.java b/src/main/java/com/gxwebsoft/credit/entity/CreditJudgmentDebtor.java new file mode 100644 index 0000000..fa15a77 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditJudgmentDebtor.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 被执行人 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:55 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditJudgmentDebtor对象", description = "被执行人") +public class CreditJudgmentDebtor implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "被执行人名称") + private String name; + + @Schema(description = "证件号/组织机构代码") + private String code; + + @Schema(description = "立案日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "执行标的(元)") + private BigDecimal amount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java b/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java new file mode 100644 index 0000000..bbae9e3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditJudicialDocument.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 裁判文书司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:02 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditJudicialDocument对象", description = "裁判文书司法大数据") +public class CreditJudicialDocument implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java b/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java new file mode 100644 index 0000000..2476ca2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditMediation.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 诉前调解司法大数据 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:25 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditMediation对象", description = "诉前调解司法大数据") +public class CreditMediation implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditRiskRelation.java b/src/main/java/com/gxwebsoft/credit/entity/CreditRiskRelation.java new file mode 100644 index 0000000..fe8e5ff --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditRiskRelation.java @@ -0,0 +1,79 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 风险关系表 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:40 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditRiskRelation对象", description = "风险关系表") +public class CreditRiskRelation implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "序号") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "主体名称") + private String mainBodyName; + + @Schema(description = "登记状态") + private String registrationStatus; + + @Schema(description = "注册资本") + private BigDecimal registeredCapital; + + @Schema(description = "省份地区") + private String provinceRegion; + + @Schema(description = "关联关系") + private String associatedRelation; + + @Schema(description = "风险关系") + private String riskRelation; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditSupplier.java b/src/main/java/com/gxwebsoft/credit/entity/CreditSupplier.java new file mode 100644 index 0000000..207be51 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditSupplier.java @@ -0,0 +1,78 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 供应商 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditSupplier对象", description = "供应商") +public class CreditSupplier implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "供应商") + private String supplier; + + @Schema(description = "状态") + private String statusTxt; + + @Schema(description = "采购金额(万元)") + private BigDecimal purchaseAmount; + + @Schema(description = "公开日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate publicDate; + + @Schema(description = "数据来源") + private String dataSource; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java b/src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java new file mode 100644 index 0000000..cee8d47 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java @@ -0,0 +1,95 @@ +package com.gxwebsoft.credit.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * 限制高消费 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:55 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Schema(name = "CreditXgxf对象", description = "限制高消费") +public class CreditXgxf implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + @TableField("defendant Appellee") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @Schema(description = "用户ID") + private Integer userId; + + @Schema(description = "租户id") + private Integer tenantId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditBreachOfTrustMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditBreachOfTrustMapper.java new file mode 100644 index 0000000..70da1c3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditBreachOfTrustMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditBreachOfTrust; +import com.gxwebsoft.credit.param.CreditBreachOfTrustParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 失信被执行人Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:46:14 + */ +public interface CreditBreachOfTrustMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditBreachOfTrustParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditBreachOfTrustParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditCaseFilingMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditCaseFilingMapper.java new file mode 100644 index 0000000..8bfd804 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditCaseFilingMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditCaseFiling; +import com.gxwebsoft.credit.param.CreditCaseFilingParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:47:22 + */ +public interface CreditCaseFilingMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditCaseFilingParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditCaseFilingParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditCompetitorMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditCompetitorMapper.java new file mode 100644 index 0000000..fad9fa7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditCompetitorMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditCompetitor; +import com.gxwebsoft.credit.param.CreditCompetitorParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 竞争对手Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:49:04 + */ +public interface CreditCompetitorMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditCompetitorParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditCompetitorParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtAnnouncementMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtAnnouncementMapper.java new file mode 100644 index 0000000..5c6eb80 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtAnnouncementMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditCourtAnnouncement; +import com.gxwebsoft.credit.param.CreditCourtAnnouncementParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 法院公告司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +public interface CreditCourtAnnouncementMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditCourtAnnouncementParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditCourtAnnouncementParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtSessionMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtSessionMapper.java new file mode 100644 index 0000000..c9dd2e1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditCourtSessionMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditCourtSession; +import com.gxwebsoft.credit.param.CreditCourtSessionParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 开庭公告司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:49:32 + */ +public interface CreditCourtSessionMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditCourtSessionParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditCourtSessionParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditDeliveryNoticeMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditDeliveryNoticeMapper.java new file mode 100644 index 0000000..66ce505 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditDeliveryNoticeMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditDeliveryNotice; +import com.gxwebsoft.credit.param.CreditDeliveryNoticeParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 送达公告司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:49:51 + */ +public interface CreditDeliveryNoticeMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditDeliveryNoticeParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditDeliveryNoticeParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditExternalMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditExternalMapper.java new file mode 100644 index 0000000..de61c9f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditExternalMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditExternal; +import com.gxwebsoft.credit.param.CreditExternalParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 对外投资Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:50:11 + */ +public interface CreditExternalMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditExternalParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditExternalParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditFinalVersionMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditFinalVersionMapper.java new file mode 100644 index 0000000..dd4ef4a --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditFinalVersionMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditFinalVersion; +import com.gxwebsoft.credit.param.CreditFinalVersionParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 终本案件Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +public interface CreditFinalVersionMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditFinalVersionParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditFinalVersionParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditGqdjMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditGqdjMapper.java new file mode 100644 index 0000000..6cc6df7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditGqdjMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditGqdj; +import com.gxwebsoft.credit.param.CreditGqdjParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 股权冻结Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +public interface CreditGqdjMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditGqdjParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditGqdjParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditJudgmentDebtorMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditJudgmentDebtorMapper.java new file mode 100644 index 0000000..13ef10f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditJudgmentDebtorMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditJudgmentDebtor; +import com.gxwebsoft.credit.param.CreditJudgmentDebtorParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 被执行人Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:50:55 + */ +public interface CreditJudgmentDebtorMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditJudgmentDebtorParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditJudgmentDebtorParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditJudicialDocumentMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditJudicialDocumentMapper.java new file mode 100644 index 0000000..46356c6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditJudicialDocumentMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditJudicialDocument; +import com.gxwebsoft.credit.param.CreditJudicialDocumentParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 裁判文书司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:51:02 + */ +public interface CreditJudicialDocumentMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditJudicialDocumentParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditJudicialDocumentParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditMediationMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditMediationMapper.java new file mode 100644 index 0000000..f46225b --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditMediationMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditMediation; +import com.gxwebsoft.credit.param.CreditMediationParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 诉前调解司法大数据Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:51:25 + */ +public interface CreditMediationMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditMediationParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditMediationParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditRiskRelationMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditRiskRelationMapper.java new file mode 100644 index 0000000..077c758 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditRiskRelationMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditRiskRelation; +import com.gxwebsoft.credit.param.CreditRiskRelationParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 风险关系表Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:51:40 + */ +public interface CreditRiskRelationMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditRiskRelationParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditRiskRelationParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditSupplierMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditSupplierMapper.java new file mode 100644 index 0000000..fd6d687 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditSupplierMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditSupplier; +import com.gxwebsoft.credit.param.CreditSupplierParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 供应商Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +public interface CreditSupplierMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditSupplierParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditSupplierParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/CreditXgxfMapper.java b/src/main/java/com/gxwebsoft/credit/mapper/CreditXgxfMapper.java new file mode 100644 index 0000000..c63d8f5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/CreditXgxfMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.credit.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.credit.entity.CreditXgxf; +import com.gxwebsoft.credit.param.CreditXgxfParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 限制高消费Mapper + * + * @author 科技小王子 + * @since 2025-12-19 19:51:55 + */ +public interface CreditXgxfMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") CreditXgxfParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") CreditXgxfParam param); + +} diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml new file mode 100644 index 0000000..fa10f0c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditBreachOfTrustMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_breach_of_trust a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..bcc239d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCaseFilingMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_case_filing a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..28fee3f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCompetitorMapper.xml @@ -0,0 +1,78 @@ + + + + + + + SELECT a.* + FROM credit_competitor a + + + AND a.id = #{param.id} + + + AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%') + + + AND a.legal_representative LIKE CONCAT('%', #{param.legalRepresentative}, '%') + + + AND a.registered_capital = #{param.registeredCapital} + + + AND a.establishment_date LIKE CONCAT('%', #{param.establishmentDate}, '%') + + + AND a.registration_status LIKE CONCAT('%', #{param.registrationStatus}, '%') + + + AND a.industry LIKE CONCAT('%', #{param.industry}, '%') + + + AND a.province LIKE CONCAT('%', #{param.province}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..1f392c9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtAnnouncementMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_court_announcement a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..d1fae79 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditCourtSessionMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_court_session a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..042dba2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditDeliveryNoticeMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_delivery_notice a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..73018b7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditExternalMapper.xml @@ -0,0 +1,99 @@ + + + + + + + SELECT a.* + FROM credit_external a + + + AND a.id = #{param.id} + + + AND a.name LIKE CONCAT('%', #{param.name}, '%') + + + AND a.status_txt LIKE CONCAT('%', #{param.statusTxt}, '%') + + + AND a.legal_representative LIKE CONCAT('%', #{param.legalRepresentative}, '%') + + + AND a.registered_capital = #{param.registeredCapital} + + + AND a.establishment_date LIKE CONCAT('%', #{param.establishmentDate}, '%') + + + AND a.shareholding_ratio = #{param.shareholdingRatio} + + + AND a.subscribed_investment_amount = #{param.subscribedInvestmentAmount} + + + AND a.subscribed_investment_date LIKE CONCAT('%', #{param.subscribedInvestmentDate}, '%') + + + AND a.indirect_shareholding_ratio = #{param.indirectShareholdingRatio} + + + AND a.investment_date LIKE CONCAT('%', #{param.investmentDate}, '%') + + + AND a.region LIKE CONCAT('%', #{param.region}, '%') + + + AND a.industry LIKE CONCAT('%', #{param.industry}, '%') + + + AND a.investment_count = #{param.investmentCount} + + + AND a.related_products_institutions LIKE CONCAT('%', #{param.relatedProductsInstitutions}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..11da37b --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditFinalVersionMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_final_version a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..d213d13 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditGqdjMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_gqdj a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorMapper.xml b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorMapper.xml new file mode 100644 index 0000000..0997a05 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudgmentDebtorMapper.xml @@ -0,0 +1,78 @@ + + + + + + + SELECT a.* + FROM credit_judgment_debtor a + + + AND a.id = #{param.id} + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.name LIKE CONCAT('%', #{param.name}, '%') + + + AND a.code LIKE CONCAT('%', #{param.code}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.amount = #{param.amount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..846f2bd --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditJudicialDocumentMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_judicial_document a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..8710a52 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditMediationMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_mediation a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..665a53b --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditRiskRelationMapper.xml @@ -0,0 +1,75 @@ + + + + + + + SELECT a.* + FROM credit_risk_relation a + + + AND a.id = #{param.id} + + + AND a.main_body_name LIKE CONCAT('%', #{param.mainBodyName}, '%') + + + AND a.registration_status LIKE CONCAT('%', #{param.registrationStatus}, '%') + + + AND a.registered_capital = #{param.registeredCapital} + + + AND a.province_region LIKE CONCAT('%', #{param.provinceRegion}, '%') + + + AND a.associated_relation LIKE CONCAT('%', #{param.associatedRelation}, '%') + + + AND a.risk_relation LIKE CONCAT('%', #{param.riskRelation}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..f3200af --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditSupplierMapper.xml @@ -0,0 +1,72 @@ + + + + + + + SELECT a.* + FROM credit_supplier a + + + AND a.id = #{param.id} + + + AND a.supplier LIKE CONCAT('%', #{param.supplier}, '%') + + + AND a.status_txt LIKE CONCAT('%', #{param.statusTxt}, '%') + + + AND a.purchase_amount = #{param.purchaseAmount} + + + AND a.public_date LIKE CONCAT('%', #{param.publicDate}, '%') + + + AND a.data_source LIKE CONCAT('%', #{param.dataSource}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{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 new file mode 100644 index 0000000..9295d2d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/mapper/xml/CreditXgxfMapper.xml @@ -0,0 +1,87 @@ + + + + + + + SELECT a.* + FROM credit_xgxf a + + + AND a.id = #{param.id} + + + AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%') + + + AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%') + + + AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%') + + + AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%') + + + AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%') + + + AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%') + + + AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%') + + + AND a.involved_amount = #{param.involvedAmount} + + + AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%') + + + AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.recommend = #{param.recommend} + + + AND a.sort_number = #{param.sortNumber} + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id = #{param.userId} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java new file mode 100644 index 0000000..c55a8ad --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditBreachOfTrustParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 失信被执行人查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:46:13 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditBreachOfTrustParam对象", description = "失信被执行人查询参数") +public class CreditBreachOfTrustParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditCaseFilingParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditCaseFilingParam.java new file mode 100644 index 0000000..4d15405 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditCaseFilingParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:47:22 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditCaseFilingParam对象", description = "司法大数据查询参数") +public class CreditCaseFilingParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorImportParam.java new file mode 100644 index 0000000..e8203d3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorImportParam.java @@ -0,0 +1,38 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 竞争对手导入参数 + */ +@Data +public class CreditCompetitorImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "企业名称") + private String companyName; + + @Excel(name = "法定代表人") + private String legalRepresentative; + + @Excel(name = "注册资本") + private String registeredCapital; + + @Excel(name = "成立日期") + private String establishmentDate; + + @Excel(name = "登记状态") + private String registrationStatus; + + @Excel(name = "所属行业") + private String industry; + + @Excel(name = "所属省份") + private String province; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorParam.java new file mode 100644 index 0000000..a3b50a6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditCompetitorParam.java @@ -0,0 +1,75 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 竞争对手查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:04 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditCompetitorParam对象", description = "竞争对手查询参数") +public class CreditCompetitorParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "序号") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "企业名称") + private String companyName; + + @Schema(description = "法定代表人") + private String legalRepresentative; + + @Schema(description = "注册资本") + @QueryField(type = QueryType.EQ) + private BigDecimal registeredCapital; + + @Schema(description = "成立日期") + private String establishmentDate; + + @Schema(description = "登记状态") + private String registrationStatus; + + @Schema(description = "所属行业") + private String industry; + + @Schema(description = "所属省份") + private String province; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditCourtAnnouncementParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditCourtAnnouncementParam.java new file mode 100644 index 0000000..357c31c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditCourtAnnouncementParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 法院公告司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditCourtAnnouncementParam对象", description = "法院公告司法大数据查询参数") +public class CreditCourtAnnouncementParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditCourtSessionParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditCourtSessionParam.java new file mode 100644 index 0000000..276254f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditCourtSessionParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 开庭公告司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:32 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditCourtSessionParam对象", description = "开庭公告司法大数据查询参数") +public class CreditCourtSessionParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditDeliveryNoticeParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditDeliveryNoticeParam.java new file mode 100644 index 0000000..339db1f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditDeliveryNoticeParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 送达公告司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:51 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditDeliveryNoticeParam对象", description = "送达公告司法大数据查询参数") +public class CreditDeliveryNoticeParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditExternalImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditExternalImportParam.java new file mode 100644 index 0000000..aa3fa34 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditExternalImportParam.java @@ -0,0 +1,59 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 对外投资导入参数 + */ +@Data +public class CreditExternalImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "被投资企业名称") + private String name; + + @Excel(name = "企业状态") + private String statusTxt; + + @Excel(name = "法定代表人姓名") + private String legalRepresentative; + + @Excel(name = "注册资本") + private String registeredCapital; + + @Excel(name = "成立日期") + private String establishmentDate; + + @Excel(name = "持股比例") + private String shareholdingRatio; + + @Excel(name = "认缴出资额") + private String subscribedInvestmentAmount; + + @Excel(name = "认缴出资日期") + private String subscribedInvestmentDate; + + @Excel(name = "间接持股比例") + private String indirectShareholdingRatio; + + @Excel(name = "投资日期") + private String investmentDate; + + @Excel(name = "所属地区") + private String region; + + @Excel(name = "所属行业") + private String industry; + + @Excel(name = "投资数量") + private Integer investmentCount; + + @Excel(name = "关联产品/机构") + private String relatedProductsInstitutions; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditExternalParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditExternalParam.java new file mode 100644 index 0000000..74d4662 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditExternalParam.java @@ -0,0 +1,100 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 对外投资查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:11 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditExternalParam对象", description = "对外投资查询参数") +public class CreditExternalParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "被投资企业名称") + private String name; + + @Schema(description = "企业状态(如存续、注销等)") + private String statusTxt; + + @Schema(description = "法定代表人姓名") + private String legalRepresentative; + + @Schema(description = "注册资本(金额)") + @QueryField(type = QueryType.EQ) + private BigDecimal registeredCapital; + + @Schema(description = "成立日期") + private String establishmentDate; + + @Schema(description = "持股比例") + @QueryField(type = QueryType.EQ) + private BigDecimal shareholdingRatio; + + @Schema(description = "认缴出资额") + @QueryField(type = QueryType.EQ) + private BigDecimal subscribedInvestmentAmount; + + @Schema(description = "认缴出资日期") + private String subscribedInvestmentDate; + + @Schema(description = "间接持股比例") + @QueryField(type = QueryType.EQ) + private BigDecimal indirectShareholdingRatio; + + @Schema(description = "投资日期") + private String investmentDate; + + @Schema(description = "所属地区") + private String region; + + @Schema(description = "所属行业") + private String industry; + + @Schema(description = "投资数量") + @QueryField(type = QueryType.EQ) + private Integer investmentCount; + + @Schema(description = "关联产品/机构") + private String relatedProductsInstitutions; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditFinalVersionParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditFinalVersionParam.java new file mode 100644 index 0000000..a65cf97 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditFinalVersionParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 终本案件查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditFinalVersionParam对象", description = "终本案件查询参数") +public class CreditFinalVersionParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditGqdjParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditGqdjParam.java new file mode 100644 index 0000000..13ee8b7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditGqdjParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 股权冻结查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditGqdjParam对象", description = "股权冻结查询参数") +public class CreditGqdjParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorImportParam.java new file mode 100644 index 0000000..3d88a73 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorImportParam.java @@ -0,0 +1,38 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 被执行人导入参数 + */ +@Data +public class CreditJudgmentDebtorImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "案号") + private String caseNumber; + + @Excel(name = "被执行人名称") + private String name; + + @Excel(name = "证件号/组织机构代码") + private String code; + + @Excel(name = "立案日期") + private String occurrenceTime; + + @Excel(name = "执行标的(元)") + private String amount; + + @Excel(name = "法院") + private String courtName; + + @Excel(name = "数据状态") + private String dataStatus; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorParam.java new file mode 100644 index 0000000..83b60e5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditJudgmentDebtorParam.java @@ -0,0 +1,75 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 被执行人查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:54 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditJudgmentDebtorParam对象", description = "被执行人查询参数") +public class CreditJudgmentDebtorParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "被执行人名称") + private String name; + + @Schema(description = "证件号/组织机构代码") + private String code; + + @Schema(description = "立案日期") + private String occurrenceTime; + + @Schema(description = "执行标的(元)") + @QueryField(type = QueryType.EQ) + private BigDecimal amount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditJudicialDocumentParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditJudicialDocumentParam.java new file mode 100644 index 0000000..46b262c --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditJudicialDocumentParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 裁判文书司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:02 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditJudicialDocumentParam对象", description = "裁判文书司法大数据查询参数") +public class CreditJudicialDocumentParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditJudicialImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditJudicialImportParam.java new file mode 100644 index 0000000..732a6b1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditJudicialImportParam.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 司法通用导入参数 + */ +@Data +public class CreditJudicialImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "数据类型") + private String dataType; + + @Excel(name = "原告/上诉人") + private String plaintiffAppellant; + + @Excel(name = "被告/被上诉人") + private String appellee; + + @Excel(name = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Excel(name = "发生时间") + private String occurrenceTime; + + @Excel(name = "案号") + private String caseNumber; + + @Excel(name = "案由") + private String causeOfAction; + + @Excel(name = "涉案金额") + private String involvedAmount; + + @Excel(name = "法院") + private String courtName; + + @Excel(name = "数据状态") + private String dataStatus; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditMediationParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditMediationParam.java new file mode 100644 index 0000000..dc8bfd1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditMediationParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 诉前调解司法大数据查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:24 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditMediationParam对象", description = "诉前调解司法大数据查询参数") +public class CreditMediationParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationImportParam.java new file mode 100644 index 0000000..b2a8ff3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationImportParam.java @@ -0,0 +1,35 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 风险关系导入参数 + */ +@Data +public class CreditRiskRelationImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "主体名称") + private String mainBodyName; + + @Excel(name = "登记状态") + private String registrationStatus; + + @Excel(name = "注册资本") + private String registeredCapital; + + @Excel(name = "省份地区") + private String provinceRegion; + + @Excel(name = "关联关系") + private String associatedRelation; + + @Excel(name = "风险关系") + private String riskRelation; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationParam.java new file mode 100644 index 0000000..ebe8398 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditRiskRelationParam.java @@ -0,0 +1,72 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 风险关系表查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:40 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditRiskRelationParam对象", description = "风险关系表查询参数") +public class CreditRiskRelationParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "序号") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "主体名称") + private String mainBodyName; + + @Schema(description = "登记状态") + private String registrationStatus; + + @Schema(description = "注册资本") + @QueryField(type = QueryType.EQ) + private BigDecimal registeredCapital; + + @Schema(description = "省份地区") + private String provinceRegion; + + @Schema(description = "关联关系") + private String associatedRelation; + + @Schema(description = "风险关系") + private String riskRelation; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditSupplierImportParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditSupplierImportParam.java new file mode 100644 index 0000000..45ff9c0 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditSupplierImportParam.java @@ -0,0 +1,32 @@ +package com.gxwebsoft.credit.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 供应商导入参数 + */ +@Data +public class CreditSupplierImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "供应商") + private String supplier; + + @Excel(name = "状态") + private String statusTxt; + + @Excel(name = "采购金额(万元)") + private String purchaseAmount; + + @Excel(name = "公开日期") + private String publicDate; + + @Excel(name = "数据来源") + private String dataSource; + + @Excel(name = "备注") + private String comments; +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditSupplierParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditSupplierParam.java new file mode 100644 index 0000000..e750326 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditSupplierParam.java @@ -0,0 +1,69 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 供应商查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditSupplierParam对象", description = "供应商查询参数") +public class CreditSupplierParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "供应商") + private String supplier; + + @Schema(description = "状态") + private String statusTxt; + + @Schema(description = "采购金额(万元)") + @QueryField(type = QueryType.EQ) + private BigDecimal purchaseAmount; + + @Schema(description = "公开日期") + private String publicDate; + + @Schema(description = "数据来源") + private String dataSource; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/param/CreditXgxfParam.java b/src/main/java/com/gxwebsoft/credit/param/CreditXgxfParam.java new file mode 100644 index 0000000..d2daaef --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/param/CreditXgxfParam.java @@ -0,0 +1,84 @@ +package com.gxwebsoft.credit.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.gxwebsoft.common.core.annotation.QueryField; +import com.gxwebsoft.common.core.annotation.QueryType; +import com.gxwebsoft.common.core.web.BaseParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 限制高消费查询参数 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:54 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@Schema(name = "CreditXgxfParam对象", description = "限制高消费查询参数") +public class CreditXgxfParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @Schema(description = "ID") + @QueryField(type = QueryType.EQ) + private Integer id; + + @Schema(description = "数据类型") + private String dataType; + + @Schema(description = "原告/上诉人") + private String plaintiffAppellant; + + @Schema(description = "被告/被上诉人") + private String appellee; + + @Schema(description = "其他当事人/第三人") + private String otherPartiesThirdParty; + + @Schema(description = "发生时间") + private String occurrenceTime; + + @Schema(description = "案号") + private String caseNumber; + + @Schema(description = "案由") + private String causeOfAction; + + @Schema(description = "涉案金额") + @QueryField(type = QueryType.EQ) + private BigDecimal involvedAmount; + + @Schema(description = "法院") + private String courtName; + + @Schema(description = "数据状态") + private String dataStatus; + + @Schema(description = "备注") + private String comments; + + @Schema(description = "是否推荐") + @QueryField(type = QueryType.EQ) + private Integer recommend; + + @Schema(description = "排序(数字越小越靠前)") + @QueryField(type = QueryType.EQ) + private Integer sortNumber; + + @Schema(description = "状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @Schema(description = "是否删除, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer deleted; + + @Schema(description = "用户ID") + @QueryField(type = QueryType.EQ) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditBreachOfTrustService.java b/src/main/java/com/gxwebsoft/credit/service/CreditBreachOfTrustService.java new file mode 100644 index 0000000..57d40dc --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditBreachOfTrustService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditBreachOfTrust; +import com.gxwebsoft.credit.param.CreditBreachOfTrustParam; + +import java.util.List; + +/** + * 失信被执行人Service + * + * @author 科技小王子 + * @since 2025-12-19 19:46:14 + */ +public interface CreditBreachOfTrustService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditBreachOfTrustParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditBreachOfTrustParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditBreachOfTrust + */ + CreditBreachOfTrust getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditCaseFilingService.java b/src/main/java/com/gxwebsoft/credit/service/CreditCaseFilingService.java new file mode 100644 index 0000000..23bb227 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditCaseFilingService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCaseFiling; +import com.gxwebsoft.credit.param.CreditCaseFilingParam; + +import java.util.List; + +/** + * 司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:47:22 + */ +public interface CreditCaseFilingService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditCaseFilingParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditCaseFilingParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditCaseFiling + */ + CreditCaseFiling getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditCompetitorService.java b/src/main/java/com/gxwebsoft/credit/service/CreditCompetitorService.java new file mode 100644 index 0000000..b7612a6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditCompetitorService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCompetitor; +import com.gxwebsoft.credit.param.CreditCompetitorParam; + +import java.util.List; + +/** + * 竞争对手Service + * + * @author 科技小王子 + * @since 2025-12-19 19:49:05 + */ +public interface CreditCompetitorService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditCompetitorParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditCompetitorParam param); + + /** + * 根据id查询 + * + * @param id 序号 + * @return CreditCompetitor + */ + CreditCompetitor getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditCourtAnnouncementService.java b/src/main/java/com/gxwebsoft/credit/service/CreditCourtAnnouncementService.java new file mode 100644 index 0000000..a693994 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditCourtAnnouncementService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCourtAnnouncement; +import com.gxwebsoft.credit.param.CreditCourtAnnouncementParam; + +import java.util.List; + +/** + * 法院公告司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +public interface CreditCourtAnnouncementService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditCourtAnnouncementParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditCourtAnnouncementParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditCourtAnnouncement + */ + CreditCourtAnnouncement getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditCourtSessionService.java b/src/main/java/com/gxwebsoft/credit/service/CreditCourtSessionService.java new file mode 100644 index 0000000..6df519f --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditCourtSessionService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCourtSession; +import com.gxwebsoft.credit.param.CreditCourtSessionParam; + +import java.util.List; + +/** + * 开庭公告司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:49:32 + */ +public interface CreditCourtSessionService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditCourtSessionParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditCourtSessionParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditCourtSession + */ + CreditCourtSession getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditDeliveryNoticeService.java b/src/main/java/com/gxwebsoft/credit/service/CreditDeliveryNoticeService.java new file mode 100644 index 0000000..2398954 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditDeliveryNoticeService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditDeliveryNotice; +import com.gxwebsoft.credit.param.CreditDeliveryNoticeParam; + +import java.util.List; + +/** + * 送达公告司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:49:51 + */ +public interface CreditDeliveryNoticeService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditDeliveryNoticeParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditDeliveryNoticeParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditDeliveryNotice + */ + CreditDeliveryNotice getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditExternalService.java b/src/main/java/com/gxwebsoft/credit/service/CreditExternalService.java new file mode 100644 index 0000000..c78c895 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditExternalService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditExternal; +import com.gxwebsoft.credit.param.CreditExternalParam; + +import java.util.List; + +/** + * 对外投资Service + * + * @author 科技小王子 + * @since 2025-12-19 19:50:11 + */ +public interface CreditExternalService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditExternalParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditExternalParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditExternal + */ + CreditExternal getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditFinalVersionService.java b/src/main/java/com/gxwebsoft/credit/service/CreditFinalVersionService.java new file mode 100644 index 0000000..b68bb42 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditFinalVersionService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditFinalVersion; +import com.gxwebsoft.credit.param.CreditFinalVersionParam; + +import java.util.List; + +/** + * 终本案件Service + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +public interface CreditFinalVersionService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditFinalVersionParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditFinalVersionParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditFinalVersion + */ + CreditFinalVersion getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditGqdjService.java b/src/main/java/com/gxwebsoft/credit/service/CreditGqdjService.java new file mode 100644 index 0000000..18c7f15 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditGqdjService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditGqdj; +import com.gxwebsoft.credit.param.CreditGqdjParam; + +import java.util.List; + +/** + * 股权冻结Service + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +public interface CreditGqdjService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditGqdjParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditGqdjParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditGqdj + */ + CreditGqdj getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditJudgmentDebtorService.java b/src/main/java/com/gxwebsoft/credit/service/CreditJudgmentDebtorService.java new file mode 100644 index 0000000..f46a36d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditJudgmentDebtorService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditJudgmentDebtor; +import com.gxwebsoft.credit.param.CreditJudgmentDebtorParam; + +import java.util.List; + +/** + * 被执行人Service + * + * @author 科技小王子 + * @since 2025-12-19 19:50:55 + */ +public interface CreditJudgmentDebtorService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditJudgmentDebtorParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditJudgmentDebtorParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditJudgmentDebtor + */ + CreditJudgmentDebtor getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditJudicialDocumentService.java b/src/main/java/com/gxwebsoft/credit/service/CreditJudicialDocumentService.java new file mode 100644 index 0000000..56ce04d --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditJudicialDocumentService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditJudicialDocument; +import com.gxwebsoft.credit.param.CreditJudicialDocumentParam; + +import java.util.List; + +/** + * 裁判文书司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:51:02 + */ +public interface CreditJudicialDocumentService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditJudicialDocumentParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditJudicialDocumentParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditJudicialDocument + */ + CreditJudicialDocument getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditMediationService.java b/src/main/java/com/gxwebsoft/credit/service/CreditMediationService.java new file mode 100644 index 0000000..4870dd8 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditMediationService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditMediation; +import com.gxwebsoft.credit.param.CreditMediationParam; + +import java.util.List; + +/** + * 诉前调解司法大数据Service + * + * @author 科技小王子 + * @since 2025-12-19 19:51:25 + */ +public interface CreditMediationService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditMediationParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditMediationParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditMediation + */ + CreditMediation getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditRiskRelationService.java b/src/main/java/com/gxwebsoft/credit/service/CreditRiskRelationService.java new file mode 100644 index 0000000..141ff83 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditRiskRelationService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditRiskRelation; +import com.gxwebsoft.credit.param.CreditRiskRelationParam; + +import java.util.List; + +/** + * 风险关系表Service + * + * @author 科技小王子 + * @since 2025-12-19 19:51:40 + */ +public interface CreditRiskRelationService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditRiskRelationParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditRiskRelationParam param); + + /** + * 根据id查询 + * + * @param id 序号 + * @return CreditRiskRelation + */ + CreditRiskRelation getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditSupplierService.java b/src/main/java/com/gxwebsoft/credit/service/CreditSupplierService.java new file mode 100644 index 0000000..469fd34 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditSupplierService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditSupplier; +import com.gxwebsoft.credit.param.CreditSupplierParam; + +import java.util.List; + +/** + * 供应商Service + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +public interface CreditSupplierService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditSupplierParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditSupplierParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditSupplier + */ + CreditSupplier getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/CreditXgxfService.java b/src/main/java/com/gxwebsoft/credit/service/CreditXgxfService.java new file mode 100644 index 0000000..7871e79 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/CreditXgxfService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.credit.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditXgxf; +import com.gxwebsoft.credit.param.CreditXgxfParam; + +import java.util.List; + +/** + * 限制高消费Service + * + * @author 科技小王子 + * @since 2025-12-19 19:51:55 + */ +public interface CreditXgxfService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(CreditXgxfParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(CreditXgxfParam param); + + /** + * 根据id查询 + * + * @param id ID + * @return CreditXgxf + */ + CreditXgxf getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditBreachOfTrustServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditBreachOfTrustServiceImpl.java new file mode 100644 index 0000000..0398416 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditBreachOfTrustServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditBreachOfTrust; +import com.gxwebsoft.credit.mapper.CreditBreachOfTrustMapper; +import com.gxwebsoft.credit.param.CreditBreachOfTrustParam; +import com.gxwebsoft.credit.service.CreditBreachOfTrustService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 失信被执行人Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:46:14 + */ +@Service +public class CreditBreachOfTrustServiceImpl extends ServiceImpl implements CreditBreachOfTrustService { + + @Override + public PageResult pageRel(CreditBreachOfTrustParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditBreachOfTrustParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditBreachOfTrust getByIdRel(Integer id) { + CreditBreachOfTrustParam param = new CreditBreachOfTrustParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditCaseFilingServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCaseFilingServiceImpl.java new file mode 100644 index 0000000..3f1f4e4 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCaseFilingServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCaseFiling; +import com.gxwebsoft.credit.mapper.CreditCaseFilingMapper; +import com.gxwebsoft.credit.param.CreditCaseFilingParam; +import com.gxwebsoft.credit.service.CreditCaseFilingService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:47:22 + */ +@Service +public class CreditCaseFilingServiceImpl extends ServiceImpl implements CreditCaseFilingService { + + @Override + public PageResult pageRel(CreditCaseFilingParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditCaseFilingParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditCaseFiling getByIdRel(Integer id) { + CreditCaseFilingParam param = new CreditCaseFilingParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditCompetitorServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCompetitorServiceImpl.java new file mode 100644 index 0000000..4204d3e --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCompetitorServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCompetitor; +import com.gxwebsoft.credit.mapper.CreditCompetitorMapper; +import com.gxwebsoft.credit.param.CreditCompetitorParam; +import com.gxwebsoft.credit.service.CreditCompetitorService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 竞争对手Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:05 + */ +@Service +public class CreditCompetitorServiceImpl extends ServiceImpl implements CreditCompetitorService { + + @Override + public PageResult pageRel(CreditCompetitorParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditCompetitorParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditCompetitor getByIdRel(Integer id) { + CreditCompetitorParam param = new CreditCompetitorParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtAnnouncementServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtAnnouncementServiceImpl.java new file mode 100644 index 0000000..d9e6ecf --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtAnnouncementServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCourtAnnouncement; +import com.gxwebsoft.credit.mapper.CreditCourtAnnouncementMapper; +import com.gxwebsoft.credit.param.CreditCourtAnnouncementParam; +import com.gxwebsoft.credit.service.CreditCourtAnnouncementService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 法院公告司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:13 + */ +@Service +public class CreditCourtAnnouncementServiceImpl extends ServiceImpl implements CreditCourtAnnouncementService { + + @Override + public PageResult pageRel(CreditCourtAnnouncementParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditCourtAnnouncementParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditCourtAnnouncement getByIdRel(Integer id) { + CreditCourtAnnouncementParam param = new CreditCourtAnnouncementParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtSessionServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtSessionServiceImpl.java new file mode 100644 index 0000000..c875735 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditCourtSessionServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditCourtSession; +import com.gxwebsoft.credit.mapper.CreditCourtSessionMapper; +import com.gxwebsoft.credit.param.CreditCourtSessionParam; +import com.gxwebsoft.credit.service.CreditCourtSessionService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 开庭公告司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:33 + */ +@Service +public class CreditCourtSessionServiceImpl extends ServiceImpl implements CreditCourtSessionService { + + @Override + public PageResult pageRel(CreditCourtSessionParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditCourtSessionParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditCourtSession getByIdRel(Integer id) { + CreditCourtSessionParam param = new CreditCourtSessionParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditDeliveryNoticeServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditDeliveryNoticeServiceImpl.java new file mode 100644 index 0000000..becedc3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditDeliveryNoticeServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditDeliveryNotice; +import com.gxwebsoft.credit.mapper.CreditDeliveryNoticeMapper; +import com.gxwebsoft.credit.param.CreditDeliveryNoticeParam; +import com.gxwebsoft.credit.service.CreditDeliveryNoticeService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 送达公告司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:49:51 + */ +@Service +public class CreditDeliveryNoticeServiceImpl extends ServiceImpl implements CreditDeliveryNoticeService { + + @Override + public PageResult pageRel(CreditDeliveryNoticeParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditDeliveryNoticeParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditDeliveryNotice getByIdRel(Integer id) { + CreditDeliveryNoticeParam param = new CreditDeliveryNoticeParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditExternalServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditExternalServiceImpl.java new file mode 100644 index 0000000..2b45a20 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditExternalServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditExternal; +import com.gxwebsoft.credit.mapper.CreditExternalMapper; +import com.gxwebsoft.credit.param.CreditExternalParam; +import com.gxwebsoft.credit.service.CreditExternalService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 对外投资Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:11 + */ +@Service +public class CreditExternalServiceImpl extends ServiceImpl implements CreditExternalService { + + @Override + public PageResult pageRel(CreditExternalParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditExternalParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditExternal getByIdRel(Integer id) { + CreditExternalParam param = new CreditExternalParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditFinalVersionServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditFinalVersionServiceImpl.java new file mode 100644 index 0000000..c40ec14 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditFinalVersionServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditFinalVersion; +import com.gxwebsoft.credit.mapper.CreditFinalVersionMapper; +import com.gxwebsoft.credit.param.CreditFinalVersionParam; +import com.gxwebsoft.credit.service.CreditFinalVersionService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 终本案件Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:19 + */ +@Service +public class CreditFinalVersionServiceImpl extends ServiceImpl implements CreditFinalVersionService { + + @Override + public PageResult pageRel(CreditFinalVersionParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditFinalVersionParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditFinalVersion getByIdRel(Integer id) { + CreditFinalVersionParam param = new CreditFinalVersionParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditGqdjServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditGqdjServiceImpl.java new file mode 100644 index 0000000..acc1353 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditGqdjServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditGqdj; +import com.gxwebsoft.credit.mapper.CreditGqdjMapper; +import com.gxwebsoft.credit.param.CreditGqdjParam; +import com.gxwebsoft.credit.service.CreditGqdjService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 股权冻结Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:37 + */ +@Service +public class CreditGqdjServiceImpl extends ServiceImpl implements CreditGqdjService { + + @Override + public PageResult pageRel(CreditGqdjParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditGqdjParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditGqdj getByIdRel(Integer id) { + CreditGqdjParam param = new CreditGqdjParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudgmentDebtorServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudgmentDebtorServiceImpl.java new file mode 100644 index 0000000..9291270 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudgmentDebtorServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditJudgmentDebtor; +import com.gxwebsoft.credit.mapper.CreditJudgmentDebtorMapper; +import com.gxwebsoft.credit.param.CreditJudgmentDebtorParam; +import com.gxwebsoft.credit.service.CreditJudgmentDebtorService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 被执行人Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:50:55 + */ +@Service +public class CreditJudgmentDebtorServiceImpl extends ServiceImpl implements CreditJudgmentDebtorService { + + @Override + public PageResult pageRel(CreditJudgmentDebtorParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditJudgmentDebtorParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditJudgmentDebtor getByIdRel(Integer id) { + CreditJudgmentDebtorParam param = new CreditJudgmentDebtorParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudicialDocumentServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudicialDocumentServiceImpl.java new file mode 100644 index 0000000..a83095a --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditJudicialDocumentServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditJudicialDocument; +import com.gxwebsoft.credit.mapper.CreditJudicialDocumentMapper; +import com.gxwebsoft.credit.param.CreditJudicialDocumentParam; +import com.gxwebsoft.credit.service.CreditJudicialDocumentService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 裁判文书司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:02 + */ +@Service +public class CreditJudicialDocumentServiceImpl extends ServiceImpl implements CreditJudicialDocumentService { + + @Override + public PageResult pageRel(CreditJudicialDocumentParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditJudicialDocumentParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditJudicialDocument getByIdRel(Integer id) { + CreditJudicialDocumentParam param = new CreditJudicialDocumentParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditMediationServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditMediationServiceImpl.java new file mode 100644 index 0000000..9ec551a --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditMediationServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditMediation; +import com.gxwebsoft.credit.mapper.CreditMediationMapper; +import com.gxwebsoft.credit.param.CreditMediationParam; +import com.gxwebsoft.credit.service.CreditMediationService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 诉前调解司法大数据Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:25 + */ +@Service +public class CreditMediationServiceImpl extends ServiceImpl implements CreditMediationService { + + @Override + public PageResult pageRel(CreditMediationParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditMediationParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditMediation getByIdRel(Integer id) { + CreditMediationParam param = new CreditMediationParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditRiskRelationServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditRiskRelationServiceImpl.java new file mode 100644 index 0000000..f000de1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditRiskRelationServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditRiskRelation; +import com.gxwebsoft.credit.mapper.CreditRiskRelationMapper; +import com.gxwebsoft.credit.param.CreditRiskRelationParam; +import com.gxwebsoft.credit.service.CreditRiskRelationService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 风险关系表Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:40 + */ +@Service +public class CreditRiskRelationServiceImpl extends ServiceImpl implements CreditRiskRelationService { + + @Override + public PageResult pageRel(CreditRiskRelationParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditRiskRelationParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditRiskRelation getByIdRel(Integer id) { + CreditRiskRelationParam param = new CreditRiskRelationParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditSupplierServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditSupplierServiceImpl.java new file mode 100644 index 0000000..56a9c06 --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditSupplierServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditSupplier; +import com.gxwebsoft.credit.mapper.CreditSupplierMapper; +import com.gxwebsoft.credit.param.CreditSupplierParam; +import com.gxwebsoft.credit.service.CreditSupplierService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 供应商Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:47 + */ +@Service +public class CreditSupplierServiceImpl extends ServiceImpl implements CreditSupplierService { + + @Override + public PageResult pageRel(CreditSupplierParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditSupplierParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditSupplier getByIdRel(Integer id) { + CreditSupplierParam param = new CreditSupplierParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/credit/service/impl/CreditXgxfServiceImpl.java b/src/main/java/com/gxwebsoft/credit/service/impl/CreditXgxfServiceImpl.java new file mode 100644 index 0000000..d8ffa3a --- /dev/null +++ b/src/main/java/com/gxwebsoft/credit/service/impl/CreditXgxfServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.credit.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.credit.entity.CreditXgxf; +import com.gxwebsoft.credit.mapper.CreditXgxfMapper; +import com.gxwebsoft.credit.param.CreditXgxfParam; +import com.gxwebsoft.credit.service.CreditXgxfService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 限制高消费Service实现 + * + * @author 科技小王子 + * @since 2025-12-19 19:51:55 + */ +@Service +public class CreditXgxfServiceImpl extends ServiceImpl implements CreditXgxfService { + + @Override + public PageResult pageRel(CreditXgxfParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(CreditXgxfParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("sort_number asc, create_time desc"); + return page.sortRecords(list); + } + + @Override + public CreditXgxf getByIdRel(Integer id) { + CreditXgxfParam param = new CreditXgxfParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 663edc6..2ff0825 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -32,7 +32,7 @@ socketio: # MQTT配置 mqtt: enabled: false # 添加开关来禁用MQTT服务 - host: tcp://1.14.159.185:1883 + host: tcp://132.232.214.96:1883 username: swdev password: Sw20250523 client-id-prefix: hjm_car_ diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 1ecfc14..7c17894 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -32,7 +32,7 @@ socketio: # MQTT配置 mqtt: - enabled: false # 启用MQTT服务 + enabled: true # 启用MQTT服务 host: tcp://132.232.214.96:1883 username: swdev password: Sw20250523