20260325稳定版

This commit is contained in:
2026-03-25 15:47:06 +08:00
parent 7119dc76a9
commit c457b45fc0
30 changed files with 1860 additions and 50 deletions
@@ -56,6 +56,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/api/shop/payment/mp-alipay/getPhoneNumber",
"/api/shop/test/**",
"/api/shop/wx-login/**",
"/api/shop/getOpenId",
"/api/shop/getOpenId/**",
"/api/apps/hualala/**",
"/api/apps/hualala-cart/**",
"/api/apps/test-data/**",
@@ -1,31 +1,24 @@
package com.gxwebsoft.law.controller;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.sql.StringEscape;
import com.gxwebsoft.common.core.utils.JSONUtil;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.law.config.WebSocketServer;
import com.gxwebsoft.law.entity.ChatMessage;
import com.gxwebsoft.law.entity.ChatResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -38,36 +31,35 @@ public class AiController extends BaseController {
@PostMapping("/message")
public ApiResult<?> message(@RequestBody ChatMessage message) throws IOException {
Map<String, Object> params = new HashMap<>();
params.put("query", message.getQuery());
params.put("user", getLoginUserId());
params.put("response_mode", "streaming");
String token = "Bearer app-UxV82WXIRrScpf53exkJ7dIw";
if (message.getType() != null) {
token = "Bearer app-7AFseF5UTEJpZGkW93S0wybh";
}
if (message.getInputs() != null) {
Map<String, Object> inputs = new HashMap<>();
inputs.put("request_type", message.getRequestType());
inputs.put("request_json", message.getInputs());
params.put("inputs", inputs);
} else {
params.put("inputs", new HashMap<>());
}
Map<String, String> paramsJsonStr = new HashMap<>();
paramsJsonStr.put("query", message.getQuery());
paramsJsonStr.put("opsType", "0");
Map<String, String> formData = new HashMap<>();
formData.put("user", message.getUser());
formData.put("responseMode", "streaming");
formData.put("paramsJsonStr", JSONUtil.toJSONString(paramsJsonStr));
formData.put("authCode", "1fbfa21a-a3df-445e-9ca5-2c1a9eead7f4");
// 使用 Java 自带的 HttpURLConnection 发送流式请求
try {
URL url = new URL("http://workflow.gxshucheng.com:8010/v1/chat-messages");
URL url = new URL("https://ai-console.gxshucheng.com/ai-console-api/run/v1");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", token);
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
connection.setDoOutput(true);
connection.setConnectTimeout(600000);
connection.setReadTimeout(600000);
// 写入请求体
try (OutputStream os = connection.getOutputStream()) {
os.write(JSONUtil.toJSONString(params).getBytes(StandardCharsets.UTF_8));
try (OutputStream os = connection.getOutputStream();
PrintWriter writer = new PrintWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) {
for (Map.Entry<String, String> entry : formData.entrySet()) {
writeFormField(writer, entry.getKey(), entry.getValue());
}
// 添加文件上传部分(可选)
// writeFilePart(writer, "file", "test.txt", "text/plain", "This is the file content.");
writer.append("--").append(boundary).append("--").append("\r\n");
writer.flush();
}
StringBuilder responseStr = new StringBuilder();
@@ -75,7 +67,7 @@ public class AiController extends BaseController {
try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
String line;
while ((line = br.readLine()) != null) {
System.out.println("Received chunk: " + line); // 打印接收到的每一部分数据
System.out.println(LocalDateTimeUtil.format(LocalDateTimeUtil.now(), "yyyy-MM-dd HH:mm:ss") + " Received chunk: " + line); // 打印接收到的每一部分数据
// 这里可以对每一部分数据进行处理,例如解析或发送给前端
if (!line.isEmpty()) {
String[] dataList = line.split("data: ");
@@ -91,13 +83,14 @@ public class AiController extends BaseController {
answerData.put("taskId", task_id);
webSocketServer.sendMessage(message.getUser(), JSONUtil.toJSONString(answerData));
}
System.out.println(answer);
System.out.println("answer: " + answer);
responseStr.append(answer);
}else if (data.get("event") != null && data.get("event").equals("message_end")) {
}else if (data.get("event") != null && data.get("event").equals("node_finished")) {
String task_id = (String) data.get("task_id");
HashMap<String, String> answerData = new HashMap<>();
answerData.put("answer", "__END__");
answerData.put("taskId", task_id);
webSocketServer.sendMessage(message.getUser(), JSONUtil.toJSONString(answerData));
}
}
@@ -117,22 +110,35 @@ public class AiController extends BaseController {
return success("Stream processing completed");
}
private static final String boundary = "---" + System.currentTimeMillis() + "---";
private static void writeFormField(PrintWriter writer, String fieldName, String value) {
writer.append("--").append(boundary).append("\r\n");
writer.append("Content-Disposition: form-data; name=\"").append(fieldName).append("\"\r\n");
writer.append("\r\n");
writer.append(value).append("\r\n");
}
@PostMapping("/messageStop")
public ApiResult<?> stop(@RequestBody Map<String, Object> data) {
if (data.get("taskId") == null) return success();
String taskId = data.get("taskId").toString();
Map<String, Integer> postData = new HashMap<>();
Map<String, Object> postData = new HashMap<>();
postData.put("user", getLoginUserId());
String token = "Bearer app-UxV82WXIRrScpf53exkJ7dIw";
if (data.get("type") != null) {
token = "Bearer app-7AFseF5UTEJpZGkW93S0wybh";
}
String res = HttpRequest.post("http://workflow.gxshucheng.com:8010/v1/chat-messages/" + taskId + "/stop")
.header("Authorization", token)
postData.put("taskId", taskId);
postData.put("authCode", "1fbfa21a-a3df-445e-9ca5-2c1a9eead7f4");
// String token = "Bearer app-UxV82WXIRrScpf53exkJ7dIw";
// if (data.get("type") != null) {
// token = "Bearer app-7AFseF5UTEJpZGkW93S0wybh";
// }
System.out.println("stop payload:" + postData);
String res = HttpRequest.post("https://ai-console.gxshucheng.com/ai-console-api/stop/v1")
// .header("Authorization", token)
.header("Content-Type", "application/json")
.body(JSONObject.toJSONString(postData))
.execute().body();
System.out.println("stop res:" + res);
return success();
}
}
@@ -78,7 +78,7 @@ public class LawLegalAidController extends BaseController {
lawLegalAid.setUserId(loginUser.getUserId());
}
if (lawLegalAidService.save(lawLegalAid)) {
return success("添加成功");
return success("添加成功", lawLegalAid);
}
return fail("添加失败");
}
@@ -0,0 +1,115 @@
package com.gxwebsoft.law.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.law.service.LawLegalMediateService;
import com.gxwebsoft.law.entity.LawLegalMediate;
import com.gxwebsoft.law.param.LawLegalMediateParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 调解申请控制器
*
* @author LX
* @since 2025-10-09 18:44:33
*/
@Api(tags = "调解申请管理")
@RestController
@RequestMapping("/api/law/law-legal-mediate")
public class LawLegalMediateController extends BaseController {
@Resource
private LawLegalMediateService lawLegalMediateService;
@ApiOperation("分页查询调解申请")
@GetMapping("/page")
public ApiResult<PageResult<LawLegalMediate>> page(LawLegalMediateParam param) {
// 使用关联查询
return success(lawLegalMediateService.pageRel(param));
}
@ApiOperation("查询全部调解申请")
@GetMapping()
public ApiResult<List<LawLegalMediate>> list(LawLegalMediateParam param) {
// 使用关联查询
return success(lawLegalMediateService.listRel(param));
}
// @PreAuthorize("hasAuthority('law:lawLegalMediate:list')")
@ApiOperation("根据id查询调解申请")
@GetMapping("/{id}")
public ApiResult<LawLegalMediate> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(lawLegalMediateService.getByIdRel(id));
}
@ApiOperation("添加调解申请")
@PostMapping()
public ApiResult<?> save(@RequestBody LawLegalMediate lawLegalMediate) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
lawLegalMediate.setUserId(loginUser.getUserId());
}
if (lawLegalMediateService.save(lawLegalMediate)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改调解申请")
@PutMapping()
public ApiResult<?> update(@RequestBody LawLegalMediate lawLegalMediate) {
if (lawLegalMediateService.updateById(lawLegalMediate)) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("删除调解申请")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (lawLegalMediateService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("批量添加调解申请")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<LawLegalMediate> list) {
if (lawLegalMediateService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("批量修改调解申请")
@PutMapping("/batch")
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalMediate> batchParam) {
if (batchParam.update(lawLegalMediateService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("批量删除调解申请")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (lawLegalMediateService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}
@@ -0,0 +1,245 @@
package com.gxwebsoft.law.controller;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ZipUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.law.service.LawLegalReviewService;
import com.gxwebsoft.law.entity.LawLegalReview;
import com.gxwebsoft.law.param.LawLegalReviewParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.apache.poi.xwpf.usermodel.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.CopyOption;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 行政复议申请控制器
*
* @author LX
* @since 2025-10-09 18:00:50
*/
@Api(tags = "行政复议申请管理")
@RestController
@RequestMapping("/api/law/law-legal-review")
public class LawLegalReviewController extends BaseController {
@Resource
private LawLegalReviewService lawLegalReviewService;
@Value("${config.upload-path}")
private String uploadPath;
@Value("${config.server-url}")
private String serverUrl;
@ApiOperation("分页查询行政复议申请")
@GetMapping("/page")
public ApiResult<PageResult<LawLegalReview>> page(LawLegalReviewParam param) {
// 使用关联查询
return success(lawLegalReviewService.pageRel(param));
}
@ApiOperation("查询全部行政复议申请")
@GetMapping()
public ApiResult<List<LawLegalReview>> list(LawLegalReviewParam param) {
// 使用关联查询
return success(lawLegalReviewService.listRel(param));
}
// @PreAuthorize("hasAuthority('law:lawLegalReview:list')")
@ApiOperation("根据id查询行政复议申请")
@GetMapping("/{id}")
public ApiResult<LawLegalReview> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(lawLegalReviewService.getByIdRel(id));
}
@ApiOperation("添加行政复议申请")
@PostMapping()
public ApiResult<?> save(@RequestBody LawLegalReview lawLegalReview) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
lawLegalReview.setUserId(loginUser.getUserId());
}
if (lawLegalReviewService.save(lawLegalReview)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改行政复议申请")
@PutMapping()
public ApiResult<?> update(@RequestBody LawLegalReview lawLegalReview) {
if (lawLegalReviewService.updateById(lawLegalReview)) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("删除行政复议申请")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (lawLegalReviewService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("批量添加行政复议申请")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<LawLegalReview> list) {
if (lawLegalReviewService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("批量修改行政复议申请")
@PutMapping("/batch")
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalReview> batchParam) {
if (batchParam.update(lawLegalReviewService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("批量删除行政复议申请")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (lawLegalReviewService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("导出")
@PostMapping("/export")
public ApiResult<?> export(@RequestBody LawLegalReview lawLegalReviewData) throws IOException {
List<LawLegalReview> list = new ArrayList<>();
if (lawLegalReviewData.getIdList() != null) {
list = lawLegalReviewService.listByIds(lawLegalReviewData.getIdList());
} else {
list = lawLegalReviewService.list();
}
XWPFDocument doc = new XWPFDocument(Files.newInputStream(Paths.get(uploadPath + "/file/行政复议申请书.docx")));
List<String> pathList = new ArrayList<>();
for (LawLegalReview lawLegalReview : list) {
String dir = uploadPath + "file/doc/行政复议申请书/" + lawLegalReview.getName() + "-" + lawLegalReview.getId();
if (!FileUtil.exist(dir)) {
FileUtil.mkdir(dir);
}
String outputPath = dir + "/行政复议申请书.docx";
pathList.add(outputPath);
FileOutputStream fos = new FileOutputStream(outputPath);
String nameFull = "";
String name = "";
if (lawLegalReview.getName() != null && !lawLegalReview.getName().isEmpty()) {
nameFull = lawLegalReview.getName();
name = lawLegalReview.getName();
}
if (lawLegalReview.getGender() != null)
nameFull += lawLegalReview.getGender().equals(0) ? "、男" : "、女";
if (lawLegalReview.getNation() != null && !lawLegalReview.getNation().isEmpty())
nameFull += "、" + lawLegalReview.getNation();
if (lawLegalReview.getBirthday() != null && !lawLegalReview.getBirthday().isEmpty())
nameFull += "、" + lawLegalReview.getBirthday();
if (lawLegalReview.getIdCard() != null && !lawLegalReview.getIdCard().isEmpty())
nameFull += "、" + lawLegalReview.getIdCard();
if (lawLegalReview.getLiveAddress() != null && !lawLegalReview.getLiveAddress().isEmpty())
nameFull += "、" + lawLegalReview.getLiveAddress();
JSONArray jsonArray = new JSONArray();
if (lawLegalReview.getFiles() != null) {
jsonArray = JSON.parseArray(lawLegalReview.getFiles());
CopyOption[] copyOptions = new CopyOption[]{StandardCopyOption.REPLACE_EXISTING};
if (!jsonArray.isEmpty()) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject fileData = jsonArray.getObject(i, JSONObject.class);
String filename = fileData.getString("title");
JSONArray fileList = fileData.getJSONArray("fileList");
for (int j = 0; j < fileList.size(); j++) {
List<String> extList = StrUtil.split(fileList.getString(j), ".");
String ext = extList.get(extList.size() - 1);
String filePath = dir + "/" + filename + "-文件" + (j + 1) + "." + ext;
HttpUtil.downloadFile(fileList.getString(j), filePath);
}
}
}
}
for (XWPFParagraph paragraph : doc.getParagraphs()) {
List<XWPFRun> runs = paragraph.getRuns();
for (XWPFRun run : runs) {
String text = run.getText(0);
if (text != null) {
if (text.contains("nameFull")) {
text = text.replace("nameFull", nameFull);
} else if (text.contains("legalPerson")) {
text = text.replace("legalPerson", lawLegalReview.getLegalPerson() == null ? "" : lawLegalReview.getLegalPerson());
} else if (text.contains("position")) {
text = text.replace("position", lawLegalReview.getPosition() == null ? "" : lawLegalReview.getPosition());
} else if (text.contains("proxyName")) {
text = text.replace("proxyName", lawLegalReview.getProxyName() == null ? "" : lawLegalReview.getProxyName());
} else if (text.contains("proxyPhone")) {
text = text.replace("proxyPhone", lawLegalReview.getProxyPhone() == null ? "" : lawLegalReview.getProxyPhone());
} else if (text.contains("respondent0")) {
text = text.replace("respondent0", lawLegalReview.getRespondent() == null ? "" : lawLegalReview.getRespondent());
} else if (text.contains("respondentLegalPerson")) {
text = text.replace("respondentLegalPerson", lawLegalReview.getRespondentLegalPerson() == null ? "" : lawLegalReview.getRespondentLegalPerson());
} else if (text.contains("respondentPosition")) {
text = text.replace("respondentPosition", lawLegalReview.getRespondentPosition() == null ? "" : lawLegalReview.getRespondentPosition());
} else if (text.contains("respondentAddress")) {
text = text.replace("respondentAddress", lawLegalReview.getRespondentAddress() == null ? "" : lawLegalReview.getRespondentAddress());
} else if (text.contains("requestContent")) {
text = text.replace("requestContent", lawLegalReview.getRequestContent() == null ? "" : lawLegalReview.getRequestContent());
} else if (text.contains("requestReason")) {
text = text.replace("requestReason", lawLegalReview.getRequestReason() == null ? "" : lawLegalReview.getRequestReason());
} else if (text.contains("num")) {
text = text.replace("num", String.valueOf(jsonArray.size()));
} else if (text.contains("name")) {
text = text.replace("name", name);
} else if (text.contains("date")) {
text = text.replace("date", LocalDateTimeUtil.format(lawLegalReview.getCreateTime(), "yyyy年MM月dd日"));
}
// System.out.println("text1:" + text);
run.setText(text, 0);
}
}
}
doc.write(fos);
fos.flush();
fos.close();
}
ZipUtil.zip(uploadPath + "file/doc/行政复议申请书");
for (String path : pathList) {
FileUtil.del(path);
}
return success("导出成功", serverUrl + "/file/doc/行政复议申请书.zip");
}
}
@@ -0,0 +1,115 @@
package com.gxwebsoft.law.controller;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.law.service.LawPoorRequestService;
import com.gxwebsoft.law.entity.LawPoorRequest;
import com.gxwebsoft.law.param.LawPoorRequestParam;
import com.gxwebsoft.common.core.web.ApiResult;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 控制器
*
* @author LX
* @since 2025-10-20 15:47:20
*/
@Api(tags = "管理")
@RestController
@RequestMapping("/api/law/law-poor-request")
public class LawPoorRequestController extends BaseController {
@Resource
private LawPoorRequestService lawPoorRequestService;
@ApiOperation("分页查询")
@GetMapping("/page")
public ApiResult<PageResult<LawPoorRequest>> page(LawPoorRequestParam param) {
// 使用关联查询
return success(lawPoorRequestService.pageRel(param));
}
@ApiOperation("查询全部")
@GetMapping()
public ApiResult<List<LawPoorRequest>> list(LawPoorRequestParam param) {
// 使用关联查询
return success(lawPoorRequestService.listRel(param));
}
@PreAuthorize("hasAuthority('law:lawPoorRequest:list')")
@ApiOperation("根据id查询")
@GetMapping("/{id}")
public ApiResult<LawPoorRequest> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(lawPoorRequestService.getByIdRel(id));
}
@ApiOperation("添加")
@PostMapping()
public ApiResult<?> save(@RequestBody LawPoorRequest lawPoorRequest) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
lawPoorRequest.setUserId(loginUser.getUserId());
}
if (lawPoorRequestService.save(lawPoorRequest)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改")
@PutMapping()
public ApiResult<?> update(@RequestBody LawPoorRequest lawPoorRequest) {
if (lawPoorRequestService.updateById(lawPoorRequest)) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("删除")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (lawPoorRequestService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("批量添加")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<LawPoorRequest> list) {
if (lawPoorRequestService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("批量修改")
@PutMapping("/batch")
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawPoorRequest> batchParam) {
if (batchParam.update(lawPoorRequestService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("批量删除")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (lawPoorRequestService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}
@@ -1,10 +1,8 @@
package com.gxwebsoft.law.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -75,4 +73,6 @@ public class LawLegalAid implements Serializable {
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
@TableField(exist = false)
private LawPoorRequest poorRequest;
}
@@ -0,0 +1,112 @@
package com.gxwebsoft.law.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 调解申请
*
* @author LX
* @since 2025-10-09 18:44:33
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "LawLegalMediate对象", description = "调解申请")
@TableName("law_legal_mediate")
public class LawLegalMediate implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer userId;
private String name;
private Integer gender;
private Integer age;
private String phone;
private String birthday;
private String idCard;
@ApiModelProperty(value = "住所地址")
private String liveAddress;
@ApiModelProperty(value = "户籍地址")
private String householdAddress;
@ApiModelProperty(value = "说明")
private String content;
@ApiModelProperty(value = "申请事项")
private String requestContent;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
private String nation;
@ApiModelProperty(value = "工作单位")
private String companyName;
private String email;
@ApiModelProperty(value = "代理人姓名")
private String proxyName;
@ApiModelProperty(value = "代理人联系电话")
private String proxyPhone;
@ApiModelProperty(value = "关系")
private String proxyRelation;
@ApiModelProperty(value = "代理人身份证")
private String proxyIdCard;
@ApiModelProperty(value = "被申请人")
private String respondent;
@ApiModelProperty(value = "被申请人身份证")
private String respondentIdCard;
@ApiModelProperty(value = "被申请人性别")
private Integer respondentGender;
@ApiModelProperty(value = "被申请人年龄")
private Integer respondentAge;
@ApiModelProperty(value = "被申请人民族")
private String respondentNation;
@ApiModelProperty(value = "被申请人职位")
private String respondentPosition;
@ApiModelProperty(value = "被申请人地址")
private String respondentAddress;
@ApiModelProperty(value = "被申请人手机号")
private String respondentPhone;
}
@@ -0,0 +1,121 @@
package com.gxwebsoft.law.entity;
import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 行政复议申请
*
* @author LX
* @since 2025-10-09 18:00:50
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "LawLegalReview对象", description = "行政复议申请")
@TableName("law_legal_review")
public class LawLegalReview implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer userId;
private String name;
private Integer gender;
private String phone;
private String birthday;
private String idCard;
@ApiModelProperty(value = "住所地址")
private String liveAddress;
@ApiModelProperty(value = "户籍地址")
private String householdAddress;
@ApiModelProperty(value = "说明")
private String content;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
private String nation;
@ApiModelProperty(value = "工作单位")
private String companyName;
private String email;
@ApiModelProperty(value = "代理人姓名")
private String proxyName;
@ApiModelProperty(value = "代理人联系电话")
private String proxyPhone;
@ApiModelProperty(value = "关系")
private String proxyRelation;
@ApiModelProperty(value = "代理人身份证")
private String proxyIdCard;
@ApiModelProperty(value = "法人/负责人")
private String legalPerson;
@ApiModelProperty(value = "职位")
private String position;
@ApiModelProperty(value = "被申请人")
private String respondent;
@ApiModelProperty(value = "被申请人法人/负责人")
private String respondentLegalPerson;
@ApiModelProperty(value = "被申请人职位")
private String respondentPosition;
@ApiModelProperty(value = "被申请人地址")
private String respondentAddress;
@ApiModelProperty(value = "行政复议请求")
private String requestContent;
@ApiModelProperty(value = "行政复议理由")
private String requestReason;
@ApiModelProperty(value = "政府部门")
private String govName;
@ApiModelProperty(value = "材料")
private String files;
@ApiModelProperty(value = "申请人身份证明材料")
private String personFile;
@ApiModelProperty(value = "代理材料")
private String proxyFile;
@TableField(exist = false)
private List<Integer> idList;
}
@@ -0,0 +1,82 @@
package com.gxwebsoft.law.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
*
* @author LX
* @since 2025-10-20 15:47:20
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "LawPoorRequest对象", description = "")
@TableName("law_poor_request")
public class LawPoorRequest implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer aidId;
@ApiModelProperty(value = "人员列表")
private String peopleList;
@ApiModelProperty(value = "总收入")
private BigDecimal totalIncome;
@ApiModelProperty(value = "人均月收入")
private BigDecimal avgIncome;
@ApiModelProperty(value = "房产几套")
private Integer houseNum;
@ApiModelProperty(value = "房产面积")
private BigDecimal houseArea;
@ApiModelProperty(value = "房产位置")
private String houseAddress;
@ApiModelProperty(value = "汽车品牌型号")
private String car;
@ApiModelProperty(value = "现金等资产")
private BigDecimal cash;
@ApiModelProperty(value = "其他资产说明")
private String otherProperty;
@ApiModelProperty(value = "重大支出")
private String outcome;
private String name;
private String phone;
private Integer userId;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.law.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.law.entity.LawLegalMediate;
import com.gxwebsoft.law.param.LawLegalMediateParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 调解申请Mapper
*
* @author LX
* @since 2025-10-09 18:44:33
*/
public interface LawLegalMediateMapper extends BaseMapper<LawLegalMediate> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<LawLegalMediate>
*/
List<LawLegalMediate> selectPageRel(@Param("page") IPage<LawLegalMediate> page,
@Param("param") LawLegalMediateParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<LawLegalMediate> selectListRel(@Param("param") LawLegalMediateParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.law.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.law.entity.LawLegalReview;
import com.gxwebsoft.law.param.LawLegalReviewParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 行政复议申请Mapper
*
* @author LX
* @since 2025-10-09 18:00:50
*/
public interface LawLegalReviewMapper extends BaseMapper<LawLegalReview> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<LawLegalReview>
*/
List<LawLegalReview> selectPageRel(@Param("page") IPage<LawLegalReview> page,
@Param("param") LawLegalReviewParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<LawLegalReview> selectListRel(@Param("param") LawLegalReviewParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.law.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.law.entity.LawPoorRequest;
import com.gxwebsoft.law.param.LawPoorRequestParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Mapper
*
* @author LX
* @since 2025-10-20 15:47:20
*/
public interface LawPoorRequestMapper extends BaseMapper<LawPoorRequest> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<LawPoorRequest>
*/
List<LawPoorRequest> selectPageRel(@Param("page") IPage<LawPoorRequest> page,
@Param("param") LawPoorRequestParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<LawPoorRequest> selectListRel(@Param("param") LawPoorRequestParam param);
}
@@ -10,6 +10,9 @@
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.aidId != null">
AND a.aid_id = #{param.aidId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
@@ -0,0 +1,117 @@
<?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.law.mapper.LawLegalMediateMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM law_legal_mediate a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.gender != null">
AND a.gender = #{param.gender}
</if>
<if test="param.age != null">
AND a.age = #{param.age}
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.birthday != null">
AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%')
</if>
<if test="param.idCard != null">
AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%')
</if>
<if test="param.liveAddress != null">
AND a.live_address LIKE CONCAT('%', #{param.liveAddress}, '%')
</if>
<if test="param.householdAddress != null">
AND a.household_address LIKE CONCAT('%', #{param.householdAddress}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.requestContent != null">
AND a.request_content LIKE CONCAT('%', #{param.requestContent}, '%')
</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.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.nation != null">
AND a.nation LIKE CONCAT('%', #{param.nation}, '%')
</if>
<if test="param.companyName != null">
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
</if>
<if test="param.email != null">
AND a.email LIKE CONCAT('%', #{param.email}, '%')
</if>
<if test="param.proxyName != null">
AND a.proxy_name LIKE CONCAT('%', #{param.proxyName}, '%')
</if>
<if test="param.proxyPhone != null">
AND a.proxy_phone LIKE CONCAT('%', #{param.proxyPhone}, '%')
</if>
<if test="param.proxyRelation != null">
AND a.proxy_relation LIKE CONCAT('%', #{param.proxyRelation}, '%')
</if>
<if test="param.proxyIdCard != null">
AND a.proxy_id_card LIKE CONCAT('%', #{param.proxyIdCard}, '%')
</if>
<if test="param.respondent != null">
AND a.respondent LIKE CONCAT('%', #{param.respondent}, '%')
</if>
<if test="param.respondentIdCard != null">
AND a.respondent_id_card LIKE CONCAT('%', #{param.respondentIdCard}, '%')
</if>
<if test="param.respondentGender != null">
AND a.respondent_gender = #{param.respondentGender}
</if>
<if test="param.respondentAge != null">
AND a.respondent_age = #{param.respondentAge}
</if>
<if test="param.respondentNation != null">
AND a.respondent_nation LIKE CONCAT('%', #{param.respondentNation}, '%')
</if>
<if test="param.respondentPosition != null">
AND a.respondent_position LIKE CONCAT('%', #{param.respondentPosition}, '%')
</if>
<if test="param.respondentAddress != null">
AND a.respondent_address LIKE CONCAT('%', #{param.respondentAddress}, '%')
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalMediate">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalMediate">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,126 @@
<?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.law.mapper.LawLegalReviewMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM law_legal_review a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.gender != null">
AND a.gender = #{param.gender}
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.birthday != null">
AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%')
</if>
<if test="param.idCard != null">
AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%')
</if>
<if test="param.liveAddress != null">
AND a.live_address LIKE CONCAT('%', #{param.liveAddress}, '%')
</if>
<if test="param.householdAddress != null">
AND a.household_address LIKE CONCAT('%', #{param.householdAddress}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</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.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.nation != null">
AND a.nation LIKE CONCAT('%', #{param.nation}, '%')
</if>
<if test="param.companyName != null">
AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%')
</if>
<if test="param.email != null">
AND a.email LIKE CONCAT('%', #{param.email}, '%')
</if>
<if test="param.proxyName != null">
AND a.proxy_name LIKE CONCAT('%', #{param.proxyName}, '%')
</if>
<if test="param.proxyPhone != null">
AND a.proxy_phone LIKE CONCAT('%', #{param.proxyPhone}, '%')
</if>
<if test="param.proxyRelation != null">
AND a.proxy_relation LIKE CONCAT('%', #{param.proxyRelation}, '%')
</if>
<if test="param.proxyIdCard != null">
AND a.proxy_id_card LIKE CONCAT('%', #{param.proxyIdCard}, '%')
</if>
<if test="param.legalPerson != null">
AND a.legal_person LIKE CONCAT('%', #{param.legalPerson}, '%')
</if>
<if test="param.position != null">
AND a.position LIKE CONCAT('%', #{param.position}, '%')
</if>
<if test="param.respondent != null">
AND a.respondent LIKE CONCAT('%', #{param.respondent}, '%')
</if>
<if test="param.respondentLegalPerson != null">
AND a.respondent_legal_person LIKE CONCAT('%', #{param.respondentLegalPerson}, '%')
</if>
<if test="param.respondentPosition != null">
AND a.respondent_position LIKE CONCAT('%', #{param.respondentPosition}, '%')
</if>
<if test="param.respondentAddress != null">
AND a.respondent_address LIKE CONCAT('%', #{param.respondentAddress}, '%')
</if>
<if test="param.requestContent != null">
AND a.request_content LIKE CONCAT('%', #{param.requestContent}, '%')
</if>
<if test="param.requestReason != null">
AND a.request_reason LIKE CONCAT('%', #{param.requestReason}, '%')
</if>
<if test="param.govName != null">
AND a.gov_name LIKE CONCAT('%', #{param.govName}, '%')
</if>
<if test="param.files != null">
AND a.files LIKE CONCAT('%', #{param.files}, '%')
</if>
<if test="param.personFile != null">
AND a.person_file LIKE CONCAT('%', #{param.personFile}, '%')
</if>
<if test="param.proxyFile != null">
AND a.proxy_file LIKE CONCAT('%', #{param.proxyFile}, '%')
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalReview">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalReview">
<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.law.mapper.LawPoorRequestMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM law_poor_request a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.peopleList != null">
AND a.people_list LIKE CONCAT('%', #{param.peopleList}, '%')
</if>
<if test="param.totalIncome != null">
AND a.total_income = #{param.totalIncome}
</if>
<if test="param.avgIncome != null">
AND a.avg_income = #{param.avgIncome}
</if>
<if test="param.houseNum != null">
AND a.house_num = #{param.houseNum}
</if>
<if test="param.houseArea != null">
AND a.house_area = #{param.houseArea}
</if>
<if test="param.houseAddress != null">
AND a.house_address LIKE CONCAT('%', #{param.houseAddress}, '%')
</if>
<if test="param.car != null">
AND a.car LIKE CONCAT('%', #{param.car}, '%')
</if>
<if test="param.cash != null">
AND a.cash = #{param.cash}
</if>
<if test="param.otherProperty != null">
AND a.other_property LIKE CONCAT('%', #{param.otherProperty}, '%')
</if>
<if test="param.outcome != null">
AND a.outcome LIKE CONCAT('%', #{param.outcome}, '%')
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
</if>
<if test="param.phone != null">
AND a.phone LIKE CONCAT('%', #{param.phone}, '%')
</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.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawPoorRequest">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawPoorRequest">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -26,6 +26,8 @@ public class LawLegalAidParam extends BaseParam {
@QueryField(type = QueryType.EQ)
private Integer id;
private Integer aidId;
@QueryField(type = QueryType.EQ)
private Integer userId;
@@ -0,0 +1,104 @@
package com.gxwebsoft.law.param;
import java.math.BigDecimal;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 调解申请查询参数
*
* @author LX
* @since 2025-10-09 18:44:33
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "LawLegalMediateParam对象", description = "调解申请查询参数")
public class LawLegalMediateParam extends BaseParam {
private static final long serialVersionUID = 1L;
@QueryField(type = QueryType.EQ)
private Integer id;
@QueryField(type = QueryType.EQ)
private Integer userId;
private String name;
@QueryField(type = QueryType.EQ)
private Integer gender;
@QueryField(type = QueryType.EQ)
private Integer age;
private String phone;
private String birthday;
private String idCard;
@ApiModelProperty(value = "住所地址")
private String liveAddress;
@ApiModelProperty(value = "户籍地址")
private String householdAddress;
@ApiModelProperty(value = "说明")
private String content;
@ApiModelProperty(value = "申请事项")
private String requestContent;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
private String nation;
@ApiModelProperty(value = "工作单位")
private String companyName;
private String email;
@ApiModelProperty(value = "代理人姓名")
private String proxyName;
@ApiModelProperty(value = "代理人联系电话")
private String proxyPhone;
@ApiModelProperty(value = "关系")
private String proxyRelation;
@ApiModelProperty(value = "代理人身份证")
private String proxyIdCard;
@ApiModelProperty(value = "被申请人")
private String respondent;
@ApiModelProperty(value = "被申请人身份证")
private String respondentIdCard;
@ApiModelProperty(value = "被申请人性别")
@QueryField(type = QueryType.EQ)
private Integer respondentGender;
@ApiModelProperty(value = "被申请人年龄")
@QueryField(type = QueryType.EQ)
private Integer respondentAge;
@ApiModelProperty(value = "被申请人民族")
private String respondentNation;
@ApiModelProperty(value = "被申请人职位")
private String respondentPosition;
@ApiModelProperty(value = "被申请人地址")
private String respondentAddress;
}
@@ -0,0 +1,111 @@
package com.gxwebsoft.law.param;
import java.math.BigDecimal;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 行政复议申请查询参数
*
* @author LX
* @since 2025-10-09 18:00:49
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "LawLegalReviewParam对象", description = "行政复议申请查询参数")
public class LawLegalReviewParam extends BaseParam {
private static final long serialVersionUID = 1L;
@QueryField(type = QueryType.EQ)
private Integer id;
@QueryField(type = QueryType.EQ)
private Integer userId;
private String name;
@QueryField(type = QueryType.EQ)
private Integer gender;
private String phone;
private String birthday;
private String idCard;
@ApiModelProperty(value = "住所地址")
private String liveAddress;
@ApiModelProperty(value = "户籍地址")
private String householdAddress;
@ApiModelProperty(value = "说明")
private String content;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
private String nation;
@ApiModelProperty(value = "工作单位")
private String companyName;
private String email;
@ApiModelProperty(value = "代理人姓名")
private String proxyName;
@ApiModelProperty(value = "代理人联系电话")
private String proxyPhone;
@ApiModelProperty(value = "关系")
private String proxyRelation;
@ApiModelProperty(value = "代理人身份证")
private String proxyIdCard;
@ApiModelProperty(value = "法人/负责人")
private String legalPerson;
@ApiModelProperty(value = "职位")
private String position;
@ApiModelProperty(value = "被申请人")
private String respondent;
@ApiModelProperty(value = "被申请人法人/负责人")
private String respondentLegalPerson;
@ApiModelProperty(value = "被申请人职位")
private String respondentPosition;
@ApiModelProperty(value = "被申请人地址")
private String respondentAddress;
@ApiModelProperty(value = "行政复议请求")
private String requestContent;
@ApiModelProperty(value = "行政复议理由")
private String requestReason;
@ApiModelProperty(value = "政府部门")
private String govName;
@ApiModelProperty(value = "材料")
private String files;
@ApiModelProperty(value = "申请人身份证明材料")
private String personFile;
@ApiModelProperty(value = "代理材料")
private String proxyFile;
}
@@ -0,0 +1,75 @@
package com.gxwebsoft.law.param;
import java.math.BigDecimal;
import com.gxwebsoft.common.core.annotation.QueryField;
import com.gxwebsoft.common.core.annotation.QueryType;
import com.gxwebsoft.common.core.web.BaseParam;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 查询参数
*
* @author LX
* @since 2025-10-20 15:47:20
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "LawPoorRequestParam对象", description = "查询参数")
public class LawPoorRequestParam extends BaseParam {
private static final long serialVersionUID = 1L;
@QueryField(type = QueryType.EQ)
private Integer id;
@QueryField(type = QueryType.EQ)
private Integer aidId;
@ApiModelProperty(value = "人员列表")
private String peopleList;
@ApiModelProperty(value = "总收入")
@QueryField(type = QueryType.EQ)
private BigDecimal totalIncome;
@ApiModelProperty(value = "人均月收入")
@QueryField(type = QueryType.EQ)
private BigDecimal avgIncome;
@ApiModelProperty(value = "房产几套")
@QueryField(type = QueryType.EQ)
private Integer houseNum;
@ApiModelProperty(value = "房产面积")
@QueryField(type = QueryType.EQ)
private BigDecimal houseArea;
@ApiModelProperty(value = "房产位置")
private String houseAddress;
@ApiModelProperty(value = "汽车品牌型号")
private String car;
@ApiModelProperty(value = "现金等资产")
@QueryField(type = QueryType.EQ)
private BigDecimal cash;
@ApiModelProperty(value = "其他资产说明")
private String otherProperty;
@ApiModelProperty(value = "重大支出")
private String outcome;
private String name;
private String phone;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
}
@@ -0,0 +1,42 @@
package com.gxwebsoft.law.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.law.entity.LawLegalMediate;
import com.gxwebsoft.law.param.LawLegalMediateParam;
import java.util.List;
/**
* 调解申请Service
*
* @author LX
* @since 2025-10-09 18:44:33
*/
public interface LawLegalMediateService extends IService<LawLegalMediate> {
/**
* 分页关联查询
*
* @param param 查询参数
* @return PageResult<LawLegalMediate>
*/
PageResult<LawLegalMediate> pageRel(LawLegalMediateParam param);
/**
* 关联查询全部
*
* @param param 查询参数
* @return List<LawLegalMediate>
*/
List<LawLegalMediate> listRel(LawLegalMediateParam param);
/**
* 根据id查询
*
* @param id
* @return LawLegalMediate
*/
LawLegalMediate getByIdRel(Integer id);
}
@@ -0,0 +1,42 @@
package com.gxwebsoft.law.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.law.entity.LawLegalReview;
import com.gxwebsoft.law.param.LawLegalReviewParam;
import java.util.List;
/**
* 行政复议申请Service
*
* @author LX
* @since 2025-10-09 18:00:50
*/
public interface LawLegalReviewService extends IService<LawLegalReview> {
/**
* 分页关联查询
*
* @param param 查询参数
* @return PageResult<LawLegalReview>
*/
PageResult<LawLegalReview> pageRel(LawLegalReviewParam param);
/**
* 关联查询全部
*
* @param param 查询参数
* @return List<LawLegalReview>
*/
List<LawLegalReview> listRel(LawLegalReviewParam param);
/**
* 根据id查询
*
* @param id
* @return LawLegalReview
*/
LawLegalReview getByIdRel(Integer id);
}
@@ -0,0 +1,43 @@
package com.gxwebsoft.law.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.law.entity.LawPoorRequest;
import com.gxwebsoft.law.param.LawPoorRequestParam;
import java.util.List;
/**
* Service
*
* @author LX
* @since 2025-10-20 15:47:20
*/
public interface LawPoorRequestService extends IService<LawPoorRequest> {
/**
* 分页关联查询
*
* @param param 查询参数
* @return PageResult<LawPoorRequest>
*/
PageResult<LawPoorRequest> pageRel(LawPoorRequestParam param);
/**
* 关联查询全部
*
* @param param 查询参数
* @return List<LawPoorRequest>
*/
List<LawPoorRequest> listRel(LawPoorRequestParam param);
/**
* 根据id查询
*
* @param id
* @return LawPoorRequest
*/
LawPoorRequest getByIdRel(Integer id);
LawPoorRequest getByAidId(Integer aidId);
}
@@ -7,8 +7,10 @@ import com.gxwebsoft.law.entity.LawLegalAid;
import com.gxwebsoft.law.param.LawLegalAidParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.law.service.LawPoorRequestService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
@@ -19,12 +21,17 @@ import java.util.List;
*/
@Service
public class LawLegalAidServiceImpl extends ServiceImpl<LawLegalAidMapper, LawLegalAid> implements LawLegalAidService {
@Resource
private LawPoorRequestService lawPoorRequestService;
@Override
public PageResult<LawLegalAid> pageRel(LawLegalAidParam param) {
PageParam<LawLegalAid, LawLegalAidParam> page = new PageParam<>(param);
page.setDefaultOrder("sort_number asc, create_time desc");
List<LawLegalAid> list = baseMapper.selectPageRel(page, param);
for (LawLegalAid lawLegalAid : list) {
lawLegalAid.setPoorRequest(lawPoorRequestService.getByAidId(lawLegalAid.getId()));
}
return new PageResult<>(list, page.getTotal());
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.law.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.law.mapper.LawLegalMediateMapper;
import com.gxwebsoft.law.service.LawLegalMediateService;
import com.gxwebsoft.law.entity.LawLegalMediate;
import com.gxwebsoft.law.param.LawLegalMediateParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 调解申请Service实现
*
* @author LX
* @since 2025-10-09 18:44:33
*/
@Service
public class LawLegalMediateServiceImpl extends ServiceImpl<LawLegalMediateMapper, LawLegalMediate> implements LawLegalMediateService {
@Override
public PageResult<LawLegalMediate> pageRel(LawLegalMediateParam param) {
PageParam<LawLegalMediate, LawLegalMediateParam> page = new PageParam<>(param);
page.setDefaultOrder("sort_number asc, create_time desc");
List<LawLegalMediate> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@Override
public List<LawLegalMediate> listRel(LawLegalMediateParam param) {
List<LawLegalMediate> list = baseMapper.selectListRel(param);
// 排序
PageParam<LawLegalMediate, LawLegalMediateParam> page = new PageParam<>();
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}
@Override
public LawLegalMediate getByIdRel(Integer id) {
LawLegalMediateParam param = new LawLegalMediateParam();
param.setId(id);
return param.getOne(baseMapper.selectListRel(param));
}
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.law.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.law.mapper.LawLegalReviewMapper;
import com.gxwebsoft.law.service.LawLegalReviewService;
import com.gxwebsoft.law.entity.LawLegalReview;
import com.gxwebsoft.law.param.LawLegalReviewParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 行政复议申请Service实现
*
* @author LX
* @since 2025-10-09 18:00:50
*/
@Service
public class LawLegalReviewServiceImpl extends ServiceImpl<LawLegalReviewMapper, LawLegalReview> implements LawLegalReviewService {
@Override
public PageResult<LawLegalReview> pageRel(LawLegalReviewParam param) {
PageParam<LawLegalReview, LawLegalReviewParam> page = new PageParam<>(param);
page.setDefaultOrder("sort_number asc, create_time desc");
List<LawLegalReview> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@Override
public List<LawLegalReview> listRel(LawLegalReviewParam param) {
List<LawLegalReview> list = baseMapper.selectListRel(param);
// 排序
PageParam<LawLegalReview, LawLegalReviewParam> page = new PageParam<>();
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}
@Override
public LawLegalReview getByIdRel(Integer id) {
LawLegalReviewParam param = new LawLegalReviewParam();
param.setId(id);
return param.getOne(baseMapper.selectListRel(param));
}
}
@@ -0,0 +1,57 @@
package com.gxwebsoft.law.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.law.mapper.LawPoorRequestMapper;
import com.gxwebsoft.law.service.LawPoorRequestService;
import com.gxwebsoft.law.entity.LawPoorRequest;
import com.gxwebsoft.law.param.LawPoorRequestParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service实现
*
* @author LX
* @since 2025-10-20 15:47:20
*/
@Service
public class LawPoorRequestServiceImpl extends ServiceImpl<LawPoorRequestMapper, LawPoorRequest> implements LawPoorRequestService {
@Override
public PageResult<LawPoorRequest> pageRel(LawPoorRequestParam param) {
PageParam<LawPoorRequest, LawPoorRequestParam> page = new PageParam<>(param);
page.setDefaultOrder("sort_number asc, create_time desc");
List<LawPoorRequest> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@Override
public List<LawPoorRequest> listRel(LawPoorRequestParam param) {
List<LawPoorRequest> list = baseMapper.selectListRel(param);
// 排序
PageParam<LawPoorRequest, LawPoorRequestParam> page = new PageParam<>();
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}
@Override
public LawPoorRequest getByIdRel(Integer id) {
LawPoorRequestParam param = new LawPoorRequestParam();
param.setId(id);
return param.getOne(baseMapper.selectListRel(param));
}
@Override
public LawPoorRequest getByAidId(Integer aidId) {
return getOne(
new LambdaQueryWrapper<LawPoorRequest>()
.eq(LawPoorRequest::getAidId, aidId)
.last("limit 1")
);
}
}
+3 -3
View File
@@ -3,9 +3,9 @@
# 数据源配置
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/law?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: root
password: root
url: jdbc:mysql://1.14.159.185:3318/law?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: law
password: HAXx4Ar2aNPCnBKi
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
@@ -45,8 +45,8 @@ public class LawGenerator {
private static final String MODULE_NAME = "law";
// 需要生成的表
private static final String[] TABLE_NAMES = new String[]{
"law_notary_config",
"law_notary_list",
"law_poor_request",
// "law_notary_list",
};
// 需要去除的表前缀