feat(credit): 添加失信被执行人和司法大数据管理功能
- 新增失信被执行人实体类、控制器、Mapper及Service实现 - 新增司法大数据实体类、控制器、Mapper及Service实现 - 实现分页查询、列表查询、详情查询接口 - 支持新增、修改、删除及批量操作接口 - 支持Excel模板下载与数据导入功能 - 配置MQTT生产环境启用开关及连接地址调整 - 移除旧审计报告相关控制器、枚举及DTO定义
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
#### 外部服务
|
||||
- **MQTT服务**: 连接成功 ✅
|
||||
- 服务器: tcp://1.14.159.185:1883
|
||||
- 服务器: tcp://132.232.214.96:1883
|
||||
- 客户端ID: hjm_car_1753549632706
|
||||
- 主题订阅: /SW_GPS/#
|
||||
- **Redis**: 连接配置正常 ✅
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.gxwebsoft.ai.constants;
|
||||
|
||||
public class KnowledgeBaseConstants {
|
||||
|
||||
public static final String[] KEY_WORDS = {
|
||||
"",
|
||||
"审计依据 法律法规 审计业务约定书 经济责任审计管理办法 中共中央办公厅 国务院办公厅 党政主要领导干部审计规定 国家法规 公司管理制度 年度工作目标 党政主要领导干部经济责任审计规定",
|
||||
"审计目标 经济责任审计目标 资产负债损益真实性 合法性 效益性 经济指标完成情况 重大决策执行 遵守财经法规 国有资产保值增值 经济责任评价 任职期间履职评价 责任界定 业绩评价",
|
||||
"审计对象 审计范围 被审计领导干部 [职务] [姓名] 任职期间 [开始日期]至[结束日期] 职务任期 重大问题追溯 重要事项延伸 审计时限 下属子公司 代管企业",
|
||||
"被审计单位基本情况 单位概况 组织机构 人员结构 财务会计政策 合并口径财务数据 资产总额 负债总额 营业收入 利润 内部控制制度 子公司 代管企业 职能部门设置 合并财务报表",
|
||||
"审计内容 审计重点 贯彻执行经济方针 重大决策执行 发展战略 年度目标完成 法人治理结构 内部控制 财务真实性 风险管控 党风廉政建设 以往审计整改 三重一大经济决策 资产管理 采购管理 债权债务",
|
||||
"审计风险 证据不充分 评价不客观 内部控制失效 法律法规变化 风险应对策略 审计证据充分性 评价客观性 内部控制审查 法规政策跟踪 重要性水平",
|
||||
"审计方法 穿行测试 趋势分析 比率分析 访谈法 数据分析 分析性程序 检查 监盘 观察 询问 函证 计算 重新执行",
|
||||
"审计步骤 时间安排 准备阶段 实施阶段 报告阶段 归档阶段 审计人员安排 资料收集 实质性程序 审计报告编写 交换意见 审计归档 进点会 进度表",
|
||||
"审计组织实施 审计组人员分工 职责分配 审计工作计划 前期调研 审前培训 实地审计 质量控制 内部培训 沟通协调 分级复核 集体讨论 重大事项汇报 里程碑事件清单 审计工作组 项目负责人 主审"
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -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<String, Object> 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<String> ret = new LinkedHashSet<>();
|
||||
String workspaceId = config.getWorkspaceId();
|
||||
List<String> 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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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<String, String> requiredVars = new HashMap<>();
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID");
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码");
|
||||
requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID");
|
||||
|
||||
List<String> missingVars = new ArrayList<>();
|
||||
for (Map.Entry<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> uploadHeadersMap = (Map<String, String>) 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<String, String> requiredVars = new HashMap<>();
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID");
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码");
|
||||
requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID");
|
||||
|
||||
List<String> missingVars = new ArrayList<>();
|
||||
for (Map.Entry<String, String> 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<String, String> 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<String, String> 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<String, String> requiredVars = new HashMap<>();
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID");
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码");
|
||||
requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID");
|
||||
|
||||
List<String> missingVars = new ArrayList<>();
|
||||
for (Map.Entry<String, String> 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<String, String> requiredVars = new HashMap<>();
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_ID", "阿里云访问密钥ID");
|
||||
requiredVars.put("ALIBABA_CLOUD_ACCESS_KEY_SECRET", "阿里云访问密钥密码");
|
||||
requiredVars.put("WORKSPACE_ID", "阿里云百炼业务空间ID");
|
||||
|
||||
List<String> missingVars = new ArrayList<>();
|
||||
for (Map.Entry<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> uploadHeadersMap = (Map<String, String>) 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("知识库更新失败。");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<PageResult<CreditBreachOfTrust>> page(CreditBreachOfTrustParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditBreachOfTrustService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部失信被执行人")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditBreachOfTrust>> list(CreditBreachOfTrustParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditBreachOfTrustService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询失信被执行人")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditBreachOfTrust> 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<CreditBreachOfTrust> list) {
|
||||
if (creditBreachOfTrustService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditBreachOfTrust:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改失信被执行人")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditBreachOfTrust> 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<Integer> ids) {
|
||||
if (creditBreachOfTrustService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入失信被执行人
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditBreachOfTrust:save')")
|
||||
@Operation(summary = "批量导入失信被执行人")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditCaseFiling>> page(CreditCaseFilingParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCaseFilingService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditCaseFiling>> list(CreditCaseFilingParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCaseFilingService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditCaseFiling> 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<CreditCaseFiling> list) {
|
||||
if (creditCaseFilingService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditCaseFiling:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditCaseFiling> 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<Integer> ids) {
|
||||
if (creditCaseFilingService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditCaseFiling:save')")
|
||||
@Operation(summary = "批量导入司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditCompetitor>> page(CreditCompetitorParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCompetitorService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部竞争对手")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditCompetitor>> list(CreditCompetitorParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCompetitorService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询竞争对手")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditCompetitor> 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<CreditCompetitor> list) {
|
||||
if (creditCompetitorService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditCompetitor:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改竞争对手")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditCompetitor> 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<Integer> ids) {
|
||||
if (creditCompetitorService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入竞争对手
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditCompetitor:save')")
|
||||
@Operation(summary = "批量导入竞争对手")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditCompetitorImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditCompetitorImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditCompetitorImportParam> 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<CreditCompetitorImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditCourtAnnouncement>> page(CreditCourtAnnouncementParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCourtAnnouncementService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部法院公告司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditCourtAnnouncement>> list(CreditCourtAnnouncementParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCourtAnnouncementService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询法院公告司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditCourtAnnouncement> 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<CreditCourtAnnouncement> list) {
|
||||
if (creditCourtAnnouncementService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改法院公告司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditCourtAnnouncement> 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<Integer> ids) {
|
||||
if (creditCourtAnnouncementService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入法院公告司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditCourtAnnouncement:save')")
|
||||
@Operation(summary = "批量导入法院公告司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditCourtSession>> page(CreditCourtSessionParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCourtSessionService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部开庭公告司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditCourtSession>> list(CreditCourtSessionParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditCourtSessionService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询开庭公告司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditCourtSession> 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<CreditCourtSession> list) {
|
||||
if (creditCourtSessionService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditCourtSession:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改开庭公告司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditCourtSession> 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<Integer> ids) {
|
||||
if (creditCourtSessionService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入开庭公告司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditCourtSession:save')")
|
||||
@Operation(summary = "批量导入开庭公告司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditDeliveryNotice>> page(CreditDeliveryNoticeParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditDeliveryNoticeService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部送达公告司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditDeliveryNotice>> list(CreditDeliveryNoticeParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditDeliveryNoticeService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询送达公告司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditDeliveryNotice> 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<CreditDeliveryNotice> list) {
|
||||
if (creditDeliveryNoticeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditDeliveryNotice:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改送达公告司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditDeliveryNotice> 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<Integer> ids) {
|
||||
if (creditDeliveryNoticeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入送达公告司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditDeliveryNotice:save')")
|
||||
@Operation(summary = "批量导入送达公告司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditExternal>> page(CreditExternalParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditExternalService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部对外投资")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditExternal>> list(CreditExternalParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditExternalService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询对外投资")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditExternal> 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<CreditExternal> list) {
|
||||
if (creditExternalService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditExternal:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改对外投资")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditExternal> 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<Integer> ids) {
|
||||
if (creditExternalService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入对外投资
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditExternal:save')")
|
||||
@Operation(summary = "批量导入对外投资")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditExternalImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditExternalImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditExternalImportParam> 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<CreditExternalImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditFinalVersion>> page(CreditFinalVersionParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditFinalVersionService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部终本案件")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditFinalVersion>> list(CreditFinalVersionParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditFinalVersionService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询终本案件")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditFinalVersion> 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<CreditFinalVersion> list) {
|
||||
if (creditFinalVersionService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditFinalVersion:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改终本案件")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditFinalVersion> 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<Integer> ids) {
|
||||
if (creditFinalVersionService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入终本案件
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditFinalVersion:save')")
|
||||
@Operation(summary = "批量导入终本案件")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditGqdj>> page(CreditGqdjParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditGqdjService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部股权冻结")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditGqdj>> list(CreditGqdjParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditGqdjService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询股权冻结")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditGqdj> 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<CreditGqdj> list) {
|
||||
if (creditGqdjService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditGqdj:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改股权冻结")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditGqdj> 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<Integer> ids) {
|
||||
if (creditGqdjService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入股权冻结司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditGqdj:save')")
|
||||
@Operation(summary = "批量导入股权冻结司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditJudgmentDebtor>> page(CreditJudgmentDebtorParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditJudgmentDebtorService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部被执行人")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditJudgmentDebtor>> list(CreditJudgmentDebtorParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditJudgmentDebtorService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询被执行人")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditJudgmentDebtor> 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<CreditJudgmentDebtor> list) {
|
||||
if (creditJudgmentDebtorService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改被执行人")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditJudgmentDebtor> 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<Integer> ids) {
|
||||
if (creditJudgmentDebtorService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入被执行人
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditJudgmentDebtor:save')")
|
||||
@Operation(summary = "批量导入被执行人")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudgmentDebtorImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudgmentDebtorImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudgmentDebtorImportParam> 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<CreditJudgmentDebtorImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditJudicialDocument>> page(CreditJudicialDocumentParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditJudicialDocumentService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部裁判文书司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditJudicialDocument>> list(CreditJudicialDocumentParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditJudicialDocumentService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询裁判文书司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditJudicialDocument> 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<CreditJudicialDocument> list) {
|
||||
if (creditJudicialDocumentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditJudicialDocument:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改裁判文书司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditJudicialDocument> 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<Integer> ids) {
|
||||
if (creditJudicialDocumentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入裁判文书司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditJudicialDocument:save')")
|
||||
@Operation(summary = "批量导入裁判文书司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditMediation>> page(CreditMediationParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditMediationService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部诉前调解司法大数据")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditMediation>> list(CreditMediationParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditMediationService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询诉前调解司法大数据")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditMediation> 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<CreditMediation> list) {
|
||||
if (creditMediationService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditMediation:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改诉前调解司法大数据")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditMediation> 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<Integer> ids) {
|
||||
if (creditMediationService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入诉前调解司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditMediation:save')")
|
||||
@Operation(summary = "批量导入诉前调解司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditRiskRelation>> page(CreditRiskRelationParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditRiskRelationService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部风险关系表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditRiskRelation>> list(CreditRiskRelationParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditRiskRelationService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询风险关系表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditRiskRelation> 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<CreditRiskRelation> list) {
|
||||
if (creditRiskRelationService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditRiskRelation:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改风险关系表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditRiskRelation> 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<Integer> ids) {
|
||||
if (creditRiskRelationService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入风险关系表
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditRiskRelation:save')")
|
||||
@Operation(summary = "批量导入风险关系表")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditRiskRelationImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditRiskRelationImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditRiskRelationImportParam> 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<CreditRiskRelationImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditSupplier>> page(CreditSupplierParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditSupplierService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部供应商")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditSupplier>> list(CreditSupplierParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditSupplierService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询供应商")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditSupplier> 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<CreditSupplier> list) {
|
||||
if (creditSupplierService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditSupplier:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改供应商")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditSupplier> 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<Integer> ids) {
|
||||
if (creditSupplierService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入供应商
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditSupplier:save')")
|
||||
@Operation(summary = "批量导入供应商")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditSupplierImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditSupplierImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditSupplierImportParam> 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<CreditSupplierImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<CreditXgxf>> page(CreditXgxfParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditXgxfService.pageRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询全部限制高消费")
|
||||
@GetMapping()
|
||||
public ApiResult<List<CreditXgxf>> list(CreditXgxfParam param) {
|
||||
// 使用关联查询
|
||||
return success(creditXgxfService.listRel(param));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询限制高消费")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<CreditXgxf> 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<CreditXgxf> list) {
|
||||
if (creditXgxfService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('credit:creditXgxf:update')")
|
||||
@OperationLog
|
||||
@Operation(summary = "批量修改限制高消费")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<CreditXgxf> 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<Integer> ids) {
|
||||
if (creditXgxfService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入限制高消费司法大数据
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('credit:creditXgxf:save')")
|
||||
@Operation(summary = "批量导入限制高消费司法大数据")
|
||||
@PostMapping("/import")
|
||||
public ApiResult<List<String>> importBatch(@RequestParam("file") MultipartFile file) {
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
int successCount = 0;
|
||||
|
||||
try {
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudicialImportParam> 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<CreditJudicialImportParam> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<T> {
|
||||
private final List<T> data;
|
||||
private final int titleRows;
|
||||
private final int headRows;
|
||||
|
||||
public ImportResult(List<T> data, int titleRows, int headRows) {
|
||||
this.data = data;
|
||||
this.titleRows = titleRows;
|
||||
this.headRows = headRows;
|
||||
}
|
||||
|
||||
public List<T> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public int getTitleRows() {
|
||||
return titleRows;
|
||||
}
|
||||
|
||||
public int getHeadRows() {
|
||||
return headRows;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> ImportResult<T> read(MultipartFile file, Class<T> clazz, Predicate<T> emptyRowPredicate) throws Exception {
|
||||
List<T> 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 <T> List<T> importSheet(MultipartFile file, Class<T> 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 <T> List<T> filterEmptyRows(List<T> rawList, Predicate<T> emptyRowPredicate) {
|
||||
if (CollectionUtils.isEmpty(rawList)) {
|
||||
return rawList;
|
||||
}
|
||||
rawList.removeIf(emptyRowPredicate);
|
||||
return rawList;
|
||||
}
|
||||
|
||||
public static <T> Workbook buildTemplate(String title, String sheetName, Class<T> clazz, List<T> examples) {
|
||||
ExportParams exportParams = new ExportParams(title, sheetName);
|
||||
return ExcelExportUtil.exportExcel(exportParams, clazz, examples);
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
389
src/main/java/com/gxwebsoft/credit/data.sql
Normal file
389
src/main/java/com/gxwebsoft/credit/data.sql
Normal file
@@ -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 '股权冻结';
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
107
src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java
Normal file
107
src/main/java/com/gxwebsoft/credit/entity/CreditExternal.java
Normal file
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
95
src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java
Normal file
95
src/main/java/com/gxwebsoft/credit/entity/CreditGqdj.java
Normal file
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
95
src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java
Normal file
95
src/main/java/com/gxwebsoft/credit/entity/CreditXgxf.java
Normal file
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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<CreditBreachOfTrust> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditBreachOfTrust>
|
||||
*/
|
||||
List<CreditBreachOfTrust> selectPageRel(@Param("page") IPage<CreditBreachOfTrust> page,
|
||||
@Param("param") CreditBreachOfTrustParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditBreachOfTrust> selectListRel(@Param("param") CreditBreachOfTrustParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditCaseFiling> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditCaseFiling>
|
||||
*/
|
||||
List<CreditCaseFiling> selectPageRel(@Param("page") IPage<CreditCaseFiling> page,
|
||||
@Param("param") CreditCaseFilingParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditCaseFiling> selectListRel(@Param("param") CreditCaseFilingParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditCompetitor> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditCompetitor>
|
||||
*/
|
||||
List<CreditCompetitor> selectPageRel(@Param("page") IPage<CreditCompetitor> page,
|
||||
@Param("param") CreditCompetitorParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditCompetitor> selectListRel(@Param("param") CreditCompetitorParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditCourtAnnouncement> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditCourtAnnouncement>
|
||||
*/
|
||||
List<CreditCourtAnnouncement> selectPageRel(@Param("page") IPage<CreditCourtAnnouncement> page,
|
||||
@Param("param") CreditCourtAnnouncementParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditCourtAnnouncement> selectListRel(@Param("param") CreditCourtAnnouncementParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditCourtSession> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditCourtSession>
|
||||
*/
|
||||
List<CreditCourtSession> selectPageRel(@Param("page") IPage<CreditCourtSession> page,
|
||||
@Param("param") CreditCourtSessionParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditCourtSession> selectListRel(@Param("param") CreditCourtSessionParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditDeliveryNotice> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditDeliveryNotice>
|
||||
*/
|
||||
List<CreditDeliveryNotice> selectPageRel(@Param("page") IPage<CreditDeliveryNotice> page,
|
||||
@Param("param") CreditDeliveryNoticeParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditDeliveryNotice> selectListRel(@Param("param") CreditDeliveryNoticeParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditExternal> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditExternal>
|
||||
*/
|
||||
List<CreditExternal> selectPageRel(@Param("page") IPage<CreditExternal> page,
|
||||
@Param("param") CreditExternalParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditExternal> selectListRel(@Param("param") CreditExternalParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditFinalVersion> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditFinalVersion>
|
||||
*/
|
||||
List<CreditFinalVersion> selectPageRel(@Param("page") IPage<CreditFinalVersion> page,
|
||||
@Param("param") CreditFinalVersionParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditFinalVersion> selectListRel(@Param("param") CreditFinalVersionParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditGqdj> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditGqdj>
|
||||
*/
|
||||
List<CreditGqdj> selectPageRel(@Param("page") IPage<CreditGqdj> page,
|
||||
@Param("param") CreditGqdjParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditGqdj> selectListRel(@Param("param") CreditGqdjParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditJudgmentDebtor> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditJudgmentDebtor>
|
||||
*/
|
||||
List<CreditJudgmentDebtor> selectPageRel(@Param("page") IPage<CreditJudgmentDebtor> page,
|
||||
@Param("param") CreditJudgmentDebtorParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditJudgmentDebtor> selectListRel(@Param("param") CreditJudgmentDebtorParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditJudicialDocument> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditJudicialDocument>
|
||||
*/
|
||||
List<CreditJudicialDocument> selectPageRel(@Param("page") IPage<CreditJudicialDocument> page,
|
||||
@Param("param") CreditJudicialDocumentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditJudicialDocument> selectListRel(@Param("param") CreditJudicialDocumentParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditMediation> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditMediation>
|
||||
*/
|
||||
List<CreditMediation> selectPageRel(@Param("page") IPage<CreditMediation> page,
|
||||
@Param("param") CreditMediationParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditMediation> selectListRel(@Param("param") CreditMediationParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditRiskRelation> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditRiskRelation>
|
||||
*/
|
||||
List<CreditRiskRelation> selectPageRel(@Param("page") IPage<CreditRiskRelation> page,
|
||||
@Param("param") CreditRiskRelationParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditRiskRelation> selectListRel(@Param("param") CreditRiskRelationParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditSupplier> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditSupplier>
|
||||
*/
|
||||
List<CreditSupplier> selectPageRel(@Param("page") IPage<CreditSupplier> page,
|
||||
@Param("param") CreditSupplierParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditSupplier> selectListRel(@Param("param") CreditSupplierParam param);
|
||||
|
||||
}
|
||||
@@ -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<CreditXgxf> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<CreditXgxf>
|
||||
*/
|
||||
List<CreditXgxf> selectPageRel(@Param("page") IPage<CreditXgxf> page,
|
||||
@Param("param") CreditXgxfParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<CreditXgxf> selectListRel(@Param("param") CreditXgxfParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditBreachOfTrustMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_breach_of_trust a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditBreachOfTrust">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditBreachOfTrust">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditCaseFilingMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_case_filing a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditCaseFiling">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditCaseFiling">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditCompetitorMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_competitor a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.companyName != null">
|
||||
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
|
||||
</if>
|
||||
<if test="param.legalRepresentative != null">
|
||||
AND a.legal_representative LIKE CONCAT('%', #{param.legalRepresentative}, '%')
|
||||
</if>
|
||||
<if test="param.registeredCapital != null">
|
||||
AND a.registered_capital = #{param.registeredCapital}
|
||||
</if>
|
||||
<if test="param.establishmentDate != null">
|
||||
AND a.establishment_date LIKE CONCAT('%', #{param.establishmentDate}, '%')
|
||||
</if>
|
||||
<if test="param.registrationStatus != null">
|
||||
AND a.registration_status LIKE CONCAT('%', #{param.registrationStatus}, '%')
|
||||
</if>
|
||||
<if test="param.industry != null">
|
||||
AND a.industry LIKE CONCAT('%', #{param.industry}, '%')
|
||||
</if>
|
||||
<if test="param.province != null">
|
||||
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditCompetitor">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditCompetitor">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditCourtAnnouncementMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_court_announcement a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditCourtAnnouncement">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditCourtAnnouncement">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditCourtSessionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_court_session a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditCourtSession">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditCourtSession">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditDeliveryNoticeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_delivery_notice a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditDeliveryNotice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditDeliveryNotice">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditExternalMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_external a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.statusTxt != null">
|
||||
AND a.status_txt LIKE CONCAT('%', #{param.statusTxt}, '%')
|
||||
</if>
|
||||
<if test="param.legalRepresentative != null">
|
||||
AND a.legal_representative LIKE CONCAT('%', #{param.legalRepresentative}, '%')
|
||||
</if>
|
||||
<if test="param.registeredCapital != null">
|
||||
AND a.registered_capital = #{param.registeredCapital}
|
||||
</if>
|
||||
<if test="param.establishmentDate != null">
|
||||
AND a.establishment_date LIKE CONCAT('%', #{param.establishmentDate}, '%')
|
||||
</if>
|
||||
<if test="param.shareholdingRatio != null">
|
||||
AND a.shareholding_ratio = #{param.shareholdingRatio}
|
||||
</if>
|
||||
<if test="param.subscribedInvestmentAmount != null">
|
||||
AND a.subscribed_investment_amount = #{param.subscribedInvestmentAmount}
|
||||
</if>
|
||||
<if test="param.subscribedInvestmentDate != null">
|
||||
AND a.subscribed_investment_date LIKE CONCAT('%', #{param.subscribedInvestmentDate}, '%')
|
||||
</if>
|
||||
<if test="param.indirectShareholdingRatio != null">
|
||||
AND a.indirect_shareholding_ratio = #{param.indirectShareholdingRatio}
|
||||
</if>
|
||||
<if test="param.investmentDate != null">
|
||||
AND a.investment_date LIKE CONCAT('%', #{param.investmentDate}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
<if test="param.industry != null">
|
||||
AND a.industry LIKE CONCAT('%', #{param.industry}, '%')
|
||||
</if>
|
||||
<if test="param.investmentCount != null">
|
||||
AND a.investment_count = #{param.investmentCount}
|
||||
</if>
|
||||
<if test="param.relatedProductsInstitutions != null">
|
||||
AND a.related_products_institutions LIKE CONCAT('%', #{param.relatedProductsInstitutions}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditExternal">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditExternal">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditFinalVersionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_final_version a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditFinalVersion">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditFinalVersion">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditGqdjMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_gqdj a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditGqdj">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditGqdj">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditJudgmentDebtorMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_judgment_debtor a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.code != null">
|
||||
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.amount != null">
|
||||
AND a.amount = #{param.amount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditJudgmentDebtor">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditJudgmentDebtor">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditJudicialDocumentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_judicial_document a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditJudicialDocument">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditJudicialDocument">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditMediationMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_mediation a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditMediation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditMediation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditRiskRelationMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_risk_relation a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.mainBodyName != null">
|
||||
AND a.main_body_name LIKE CONCAT('%', #{param.mainBodyName}, '%')
|
||||
</if>
|
||||
<if test="param.registrationStatus != null">
|
||||
AND a.registration_status LIKE CONCAT('%', #{param.registrationStatus}, '%')
|
||||
</if>
|
||||
<if test="param.registeredCapital != null">
|
||||
AND a.registered_capital = #{param.registeredCapital}
|
||||
</if>
|
||||
<if test="param.provinceRegion != null">
|
||||
AND a.province_region LIKE CONCAT('%', #{param.provinceRegion}, '%')
|
||||
</if>
|
||||
<if test="param.associatedRelation != null">
|
||||
AND a.associated_relation LIKE CONCAT('%', #{param.associatedRelation}, '%')
|
||||
</if>
|
||||
<if test="param.riskRelation != null">
|
||||
AND a.risk_relation LIKE CONCAT('%', #{param.riskRelation}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditRiskRelation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditRiskRelation">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditSupplierMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_supplier a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.supplier != null">
|
||||
AND a.supplier LIKE CONCAT('%', #{param.supplier}, '%')
|
||||
</if>
|
||||
<if test="param.statusTxt != null">
|
||||
AND a.status_txt LIKE CONCAT('%', #{param.statusTxt}, '%')
|
||||
</if>
|
||||
<if test="param.purchaseAmount != null">
|
||||
AND a.purchase_amount = #{param.purchaseAmount}
|
||||
</if>
|
||||
<if test="param.publicDate != null">
|
||||
AND a.public_date LIKE CONCAT('%', #{param.publicDate}, '%')
|
||||
</if>
|
||||
<if test="param.dataSource != null">
|
||||
AND a.data_source LIKE CONCAT('%', #{param.dataSource}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditSupplier">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditSupplier">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.credit.mapper.CreditXgxfMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM credit_xgxf a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.dataType != null">
|
||||
AND a.data_type LIKE CONCAT('%', #{param.dataType}, '%')
|
||||
</if>
|
||||
<if test="param.plaintiffAppellant != null">
|
||||
AND a.plaintiff_appellant LIKE CONCAT('%', #{param.plaintiffAppellant}, '%')
|
||||
</if>
|
||||
<if test="param.defendant appellee != null">
|
||||
AND a.defendant Appellee LIKE CONCAT('%', #{param.defendant appellee}, '%')
|
||||
</if>
|
||||
<if test="param.otherPartiesThirdParty != null">
|
||||
AND a.other_parties_third_party LIKE CONCAT('%', #{param.otherPartiesThirdParty}, '%')
|
||||
</if>
|
||||
<if test="param.occurrenceTime != null">
|
||||
AND a.occurrence_time LIKE CONCAT('%', #{param.occurrenceTime}, '%')
|
||||
</if>
|
||||
<if test="param.caseNumber != null">
|
||||
AND a.case_number LIKE CONCAT('%', #{param.caseNumber}, '%')
|
||||
</if>
|
||||
<if test="param.causeOfAction != null">
|
||||
AND a.cause_of_action LIKE CONCAT('%', #{param.causeOfAction}, '%')
|
||||
</if>
|
||||
<if test="param.involvedAmount != null">
|
||||
AND a.involved_amount = #{param.involvedAmount}
|
||||
</if>
|
||||
<if test="param.courtName != null">
|
||||
AND a.court_name LIKE CONCAT('%', #{param.courtName}, '%')
|
||||
</if>
|
||||
<if test="param.dataStatus != null">
|
||||
AND a.data_status LIKE CONCAT('%', #{param.dataStatus}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.recommend != null">
|
||||
AND a.recommend = #{param.recommend}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.credit.entity.CreditXgxf">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.credit.entity.CreditXgxf">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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<CreditBreachOfTrust> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CreditBreachOfTrust>
|
||||
*/
|
||||
PageResult<CreditBreachOfTrust> pageRel(CreditBreachOfTrustParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CreditBreachOfTrust>
|
||||
*/
|
||||
List<CreditBreachOfTrust> listRel(CreditBreachOfTrustParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return CreditBreachOfTrust
|
||||
*/
|
||||
CreditBreachOfTrust getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -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<CreditCaseFiling> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<CreditCaseFiling>
|
||||
*/
|
||||
PageResult<CreditCaseFiling> pageRel(CreditCaseFilingParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<CreditCaseFiling>
|
||||
*/
|
||||
List<CreditCaseFiling> listRel(CreditCaseFilingParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return CreditCaseFiling
|
||||
*/
|
||||
CreditCaseFiling getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user