业务功能代码
parent
9b0783822c
commit
869cd744db
|
|
@ -23,6 +23,23 @@
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--文件转pdf工具类-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aspose</groupId>
|
||||||
|
<artifactId>aspose-words</artifactId>
|
||||||
|
<version>15.8.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aspose</groupId>
|
||||||
|
<artifactId>aspose-cells</artifactId>
|
||||||
|
<version>8.5.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aspose</groupId>
|
||||||
|
<artifactId>aspose-slides</artifactId>
|
||||||
|
<version>15.9.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- <!– mp支持的数据库均支持 只需要增加对应的jdbc依赖即可 –>-->
|
<!-- <!– mp支持的数据库均支持 只需要增加对应的jdbc依赖即可 –>-->
|
||||||
<!-- <!– Oracle –>-->
|
<!-- <!– Oracle –>-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,212 @@
|
||||||
|
package org.dromara.util;
|
||||||
|
|
||||||
|
import com.aspose.cells.Workbook;
|
||||||
|
import com.aspose.slides.Presentation;
|
||||||
|
import com.aspose.slides.SaveFormat;
|
||||||
|
import com.aspose.words.Document;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件转pdf工具类 linux 服务器需要安装字体不然是乱码
|
||||||
|
*
|
||||||
|
* @author liuhaomin
|
||||||
|
* @date 2020/6/30
|
||||||
|
*/
|
||||||
|
public class FileToPdfUtils {
|
||||||
|
/**
|
||||||
|
* 文件转换
|
||||||
|
*
|
||||||
|
* @param source:源文件地址 如:C://test/test.doc,target:转换后文件路径 如 C://test/pdf
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String officeToPdf(String source, String target) {
|
||||||
|
File file = new File(source);
|
||||||
|
// 文件名字
|
||||||
|
String fileName = file.getName();
|
||||||
|
//office文档转pdf
|
||||||
|
String fileExt = source.substring(source.lastIndexOf(".") + 1);
|
||||||
|
if ("doc".equals(fileExt) || "docx".equals(fileExt)) {
|
||||||
|
doc2pdf(source, target, fileExt);
|
||||||
|
}
|
||||||
|
if ("xls".equals(fileExt) || "xlsx".equals(fileExt)) {
|
||||||
|
excel2pdf(source, target, fileExt);
|
||||||
|
}
|
||||||
|
if ("ppt".equals(fileExt) || "pptx".equals(fileExt)) {
|
||||||
|
ppt2pdf(source, target, fileExt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("doc,docx,xls,xlsx,ppt,pptx".indexOf(fileExt) > 0) {
|
||||||
|
return target + File.separator + (fileName.replace(fileExt, "pdf"));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 验证ExcelLicense
|
||||||
|
* @params:
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:40
|
||||||
|
*/
|
||||||
|
public static boolean getExcelLicense() {
|
||||||
|
boolean result = false;
|
||||||
|
try {
|
||||||
|
// license.xml应放在..\WebRoot\WEB-INF\classes路径下
|
||||||
|
InputStream is = FileToPdfUtils.class.getClassLoader().getResourceAsStream("license.xml");
|
||||||
|
com.aspose.cells.License aposeLic = new com.aspose.cells.License();
|
||||||
|
aposeLic.setLicense(is);
|
||||||
|
result = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 验证PPTtlLicense
|
||||||
|
* @params:
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:40
|
||||||
|
*/
|
||||||
|
public static boolean getPPTLicense() {
|
||||||
|
boolean result = false;
|
||||||
|
try {
|
||||||
|
// license.xml应放在..\WebRoot\WEB-INF\classes路径下
|
||||||
|
InputStream is = FileToPdfUtils.class.getClassLoader().getResourceAsStream("license.xml");
|
||||||
|
com.aspose.slides.License aposeLic = new com.aspose.slides.License();
|
||||||
|
aposeLic.setLicense(is);
|
||||||
|
result = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 验证License
|
||||||
|
* @params:
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:40
|
||||||
|
*/
|
||||||
|
public static boolean getDocLicense() {
|
||||||
|
boolean result = false;
|
||||||
|
try {
|
||||||
|
// license.xml应放在..\WebRoot\WEB-INF\classes路径下
|
||||||
|
InputStream is = FileToPdfUtils.class.getClassLoader().getResourceAsStream("license.xml");
|
||||||
|
com.aspose.words.License aposeLic = new com.aspose.words.License();
|
||||||
|
aposeLic.setLicense(is);
|
||||||
|
result = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: excel转pdf
|
||||||
|
* @params: source:源文件地址,target:转换后文件路径,fileExt:后缀
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:41
|
||||||
|
*/
|
||||||
|
public static void excel2pdf(String source, String target, String fileExt) {
|
||||||
|
// 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||||
|
if (!getExcelLicense()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// 原始excel路径
|
||||||
|
Workbook wb = new Workbook(source);
|
||||||
|
//验证路径
|
||||||
|
try {
|
||||||
|
if (!(new File(target).isDirectory())) {
|
||||||
|
new File(target).mkdirs();
|
||||||
|
}
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 文件名字
|
||||||
|
String fileName = new File(source).getName();
|
||||||
|
// 输出路径
|
||||||
|
File pdfFile = new File(target + File.separator + (fileName.replace(fileExt, "pdf")));
|
||||||
|
FileOutputStream fileOS = new FileOutputStream(pdfFile);
|
||||||
|
wb.save(fileOS, com.aspose.cells.SaveFormat.PDF);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: ppt转pdf
|
||||||
|
* @params: source:源文件地址,target:转换后文件路径,fileExt:后缀
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:46
|
||||||
|
*/
|
||||||
|
public static void ppt2pdf(String source, String target, String fileExt) {
|
||||||
|
// 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||||
|
if (!getPPTLicense()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//验证路径
|
||||||
|
try {
|
||||||
|
if (!(new File(target).isDirectory())) {
|
||||||
|
new File(target).mkdirs();
|
||||||
|
}
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 文件名字
|
||||||
|
String fileName = new File(source).getName();
|
||||||
|
//新建一个空白pdf文档
|
||||||
|
File file = new File(target + File.separator + (fileName.replace(fileExt, "pdf")));
|
||||||
|
//输入pdf路径
|
||||||
|
Presentation pres = new Presentation(source);
|
||||||
|
FileOutputStream fileOS = new FileOutputStream(file);
|
||||||
|
pres.save(fileOS, SaveFormat.Pdf);
|
||||||
|
fileOS.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: doc转pdf
|
||||||
|
* @params: source:源文件地址,target:转换后文件路径,fileExt:后缀
|
||||||
|
* @return:
|
||||||
|
* @author: com.liuhm
|
||||||
|
* @Date: 2019/10/10 13:46
|
||||||
|
*/
|
||||||
|
public static void doc2pdf(String source, String target, String fileExt) {
|
||||||
|
// 验证License 若不验证则转化出的pdf文档会有水印产生
|
||||||
|
if (!getDocLicense()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//新建一个空白pdf文档
|
||||||
|
try {
|
||||||
|
if (!(new File(target).isDirectory())) {
|
||||||
|
new File(target).mkdirs();
|
||||||
|
}
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 文件名字
|
||||||
|
|
||||||
|
String fileName = new File(source).getName();
|
||||||
|
// 输出路径
|
||||||
|
File file = new File(target + File.separator + (fileName.replace(fileExt, "pdf")));
|
||||||
|
FileOutputStream os = new FileOutputStream(file);
|
||||||
|
Document doc = new Document(source);
|
||||||
|
doc.save(os, com.aspose.words.SaveFormat.PDF);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
package org.dromara.web.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import jakarta.servlet.ServletOutputStream;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.dromara.common.core.config.RuoYiConfig;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.core.utils.file.FileUtils;
|
||||||
|
import org.dromara.util.FileToPdfUtils;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
*/
|
||||||
|
@SaIgnore
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
public class ShowFileController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统基础配置
|
||||||
|
*/
|
||||||
|
private final RuoYiConfig ruoyiConfig;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件预览
|
||||||
|
* @param filePath
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@GetMapping("/showFile")
|
||||||
|
@ResponseBody
|
||||||
|
public void showFile(String filePath, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
|
//源文件路径
|
||||||
|
String sourcePath = filePath;
|
||||||
|
//pdf文件路径
|
||||||
|
String pdfPath = "D:/ruoyi/uploadPath/pdf/";;
|
||||||
|
//获取文件后缀判断是否转换pdf
|
||||||
|
int index = filePath.lastIndexOf(".");
|
||||||
|
String fileType = filePath.substring(index + 1);
|
||||||
|
String toPdfSuffix = "doc,docx,xls,xlsx,ppt,pptx";
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
String filename = filePath.substring(filePath.lastIndexOf("/")+1, index);
|
||||||
|
String pdffilepath = pdfPath + filename + ".pdf";
|
||||||
|
File pdfFile = new File(pdffilepath);
|
||||||
|
if (pdfFile.exists()){
|
||||||
|
InputStream is = new FileInputStream(pdfFile);
|
||||||
|
showPdf(is, pdffilepath, request, response);
|
||||||
|
}else {
|
||||||
|
// if (toPdfSuffix.indexOf(fileType) >= 0) {
|
||||||
|
// pdfPath = sourcePath.substring(0, index) + ".pdf";
|
||||||
|
|
||||||
|
//源文件转换pdf
|
||||||
|
FileToPdfUtils.officeToPdf(sourcePath, pdfPath);
|
||||||
|
File newPdfFile = new File(pdffilepath);
|
||||||
|
InputStream is = new FileInputStream(newPdfFile);
|
||||||
|
showPdf(is, pdffilepath, request, response);
|
||||||
|
// } else {
|
||||||
|
// //不用转换,直接预览
|
||||||
|
// File newPdfFile = new File(filePath);
|
||||||
|
// InputStream is = new FileInputStream(newPdfFile);
|
||||||
|
// showPdf(is, filePath, request, response);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// finally {
|
||||||
|
// //最后删除生成的pdf文件
|
||||||
|
// FileUtils.deleteFile(pdfPath);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件预览
|
||||||
|
* @param is
|
||||||
|
* @param fileKey
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public void showPdf(InputStream is, String fileKey, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
|
//根据文件名获取 MIME 类型
|
||||||
|
int idx = fileKey.lastIndexOf(".");
|
||||||
|
String suffix = fileKey.substring(idx);
|
||||||
|
String[] fileKeys = fileKey.split("/");
|
||||||
|
String fileName = fileKeys[fileKeys.length - 1];
|
||||||
|
// String contentType = FileContentType.SUFFIX_TYPE.get(suffix);
|
||||||
|
String contentType = URLConnection.guessContentTypeFromName(fileKey);
|
||||||
|
//inline表示直接预览
|
||||||
|
String userAgent = request.getHeader("USER-AGENT");
|
||||||
|
String contentDisposition = "";
|
||||||
|
if(StringUtils.contains(userAgent, "MSIE")||StringUtils.contains(userAgent, "Trident") || StringUtils.contains(userAgent,"Edge")){
|
||||||
|
//IE 浏览器
|
||||||
|
contentDisposition = "inline;filename=" + URLEncoder.encode(fileName,"UTF8");
|
||||||
|
}else {
|
||||||
|
//其他浏览器
|
||||||
|
contentDisposition = "inline;filename=" + new String(fileName.getBytes("UTF-8"),"ISO8859-1");
|
||||||
|
}
|
||||||
|
// 设置头
|
||||||
|
response.setHeader("Content-Disposition",contentDisposition);
|
||||||
|
response.setContentType(contentType);
|
||||||
|
// 获取绑定了客户端的流
|
||||||
|
ServletOutputStream output = response.getOutputStream();
|
||||||
|
// 把输入流中的数据写入到输出流中
|
||||||
|
IOUtils.copy(is,output);
|
||||||
|
is.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -49,9 +49,9 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue-plus-abm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://192.168.0.49:3306/xxbsdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: 1234
|
password: root
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: org.postgresql.Driver
|
# driverClassName: org.postgresql.Driver
|
||||||
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://192.168.0.49:3306/xxbsdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
# # 从库数据源
|
# # 从库数据源
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ springdoc:
|
||||||
# 标题
|
# 标题
|
||||||
title: '标题:${ruoyi.name}多租户管理系统_接口文档'
|
title: '标题:${ruoyi.name}多租户管理系统_接口文档'
|
||||||
# 描述
|
# 描述
|
||||||
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
|
description: '.'
|
||||||
# 版本
|
# 版本
|
||||||
version: '版本号: ${ruoyi.version}'
|
version: '版本号: ${ruoyi.version}'
|
||||||
# 作者信息
|
# 作者信息
|
||||||
|
|
@ -225,10 +225,11 @@ springdoc:
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
# 过滤开关
|
# 过滤开关
|
||||||
enabled: true
|
enabled: false
|
||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
excludeUrls:
|
excludeUrls:
|
||||||
- /system/notice
|
- /system/notice
|
||||||
|
- /biz
|
||||||
- /warm-flow/save-xml
|
- /warm-flow/save-xml
|
||||||
|
|
||||||
# 全局线程池相关配置
|
# 全局线程池相关配置
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<License>
|
||||||
|
<Data>
|
||||||
|
<Products>
|
||||||
|
<Product>Aspose.Total for Java</Product>
|
||||||
|
<Product>Aspose.Words for Java</Product>
|
||||||
|
</Products>
|
||||||
|
<EditionType>Enterprise</EditionType>
|
||||||
|
<SubscriptionExpiry>20991231</SubscriptionExpiry>
|
||||||
|
<LicenseExpiry>20991231</LicenseExpiry>
|
||||||
|
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
|
||||||
|
</Data>
|
||||||
|
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
|
||||||
|
</License>
|
||||||
|
|
@ -22,12 +22,12 @@ public class DeptDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父部门ID
|
* 父部门ID
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class PostDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位编码
|
* 岗位编码
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,62 @@ public class TaskAssigneeDTO implements Serializable {
|
||||||
createTimeMapper.apply(item)
|
createTimeMapper.apply(item)
|
||||||
)).collect(Collectors.toList());
|
)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 将源列表转换为 TaskHandler 列表
|
||||||
|
*
|
||||||
|
* @param <T> 通用类型
|
||||||
|
* @param sourceList 待转换的源列表
|
||||||
|
* @param storageId 提取 storageId 的函数
|
||||||
|
* @param handlerCode 提取 handlerCode 的函数
|
||||||
|
* @param handlerName 提取 handlerName 的函数
|
||||||
|
* @param groupName 提取 groupName 的函数
|
||||||
|
* @param createTimeMapper 提取 createTime 的函数
|
||||||
|
* @return 转换后的 TaskHandler 列表
|
||||||
|
*/
|
||||||
|
public static <T> List<TaskHandler> convertToHandlerList2(
|
||||||
|
List<T> sourceList,
|
||||||
|
Function<T, Long> storageId,
|
||||||
|
Function<T, String> handlerCode,
|
||||||
|
Function<T, String> handlerName,
|
||||||
|
Function<T, String> groupName,
|
||||||
|
Function<T, Date> createTimeMapper) {
|
||||||
|
return sourceList.stream()
|
||||||
|
.map(item -> new TaskHandler(
|
||||||
|
String.valueOf(storageId.apply(item)),
|
||||||
|
handlerCode.apply(item),
|
||||||
|
handlerName.apply(item),
|
||||||
|
groupName != null ? String.valueOf(groupName.apply(item)) : null,
|
||||||
|
createTimeMapper.apply(item)
|
||||||
|
)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 将源列表转换为 TaskHandler 列表
|
||||||
|
*
|
||||||
|
* @param <T> 通用类型
|
||||||
|
* @param sourceList 待转换的源列表
|
||||||
|
* @param storageId 提取 storageId 的函数
|
||||||
|
* @param handlerCode 提取 handlerCode 的函数
|
||||||
|
* @param handlerName 提取 handlerName 的函数
|
||||||
|
* @param groupName 提取 groupName 的函数
|
||||||
|
* @param createTimeMapper 提取 createTime 的函数
|
||||||
|
* @return 转换后的 TaskHandler 列表
|
||||||
|
*/
|
||||||
|
public static <T> List<TaskHandler> convertToHandlerList3(
|
||||||
|
List<T> sourceList,
|
||||||
|
Function<T, String> storageId,
|
||||||
|
Function<T, String> handlerCode,
|
||||||
|
Function<T, String> handlerName,
|
||||||
|
Function<T, String> groupName,
|
||||||
|
Function<T, Date> createTimeMapper) {
|
||||||
|
return sourceList.stream()
|
||||||
|
.map(item -> new TaskHandler(
|
||||||
|
String.valueOf(storageId.apply(item)),
|
||||||
|
handlerCode.apply(item),
|
||||||
|
handlerName.apply(item),
|
||||||
|
groupName != null ? String.valueOf(groupName.apply(item)) : null,
|
||||||
|
createTimeMapper.apply(item)
|
||||||
|
)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public class UserDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class LoginUser implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门类别编码
|
* 部门类别编码
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public interface DeptService {
|
||||||
* @param deptId 部门ID,用于指定需要查询的部门
|
* @param deptId 部门ID,用于指定需要查询的部门
|
||||||
* @return 返回该部门的负责人ID
|
* @return 返回该部门的负责人ID
|
||||||
*/
|
*/
|
||||||
Long selectDeptLeaderById(Long deptId);
|
Long selectDeptLeaderById(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门
|
* 查询部门
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public interface UserService {
|
||||||
* @param deptIds 部门ids
|
* @param deptIds 部门ids
|
||||||
* @return 用户
|
* @return 用户
|
||||||
*/
|
*/
|
||||||
List<UserDTO> selectUsersByDeptIds(List<Long> deptIds);
|
List<UserDTO> selectUsersByDeptIds(List<String> deptIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询用户
|
* 通过岗位ID查询用户
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,383 @@
|
||||||
|
package org.dromara.common.core.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class Helper {
|
||||||
|
|
||||||
|
public static String ManagerDeptID(Long deptid, String managerDeptid){
|
||||||
|
if (managerDeptid!=null && !managerDeptid.trim().equals("")){
|
||||||
|
return Helper.NStr(managerDeptid.trim());
|
||||||
|
} else
|
||||||
|
return Helper.NStr(deptid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去除组织机构后面0 返回组织机构前缀
|
||||||
|
* @param deptid 组织机构代码
|
||||||
|
* @return 返回组织机构前缀
|
||||||
|
*/
|
||||||
|
public static String PrefixDeptid(String deptid){
|
||||||
|
if (deptid==null || deptid.equals("null")) return "";
|
||||||
|
|
||||||
|
while(deptid.substring(deptid.length()-2).equals("00")){
|
||||||
|
deptid = deptid.substring(0, deptid.length()-2);
|
||||||
|
}
|
||||||
|
return deptid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isEmpty(Object obj){
|
||||||
|
String str = NStr(obj, "");
|
||||||
|
if("".equals(str)) {
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String NStr(Object obj){
|
||||||
|
return NStr(obj, "");
|
||||||
|
}
|
||||||
|
public static String NStr(Object obj, String default_value){
|
||||||
|
try{
|
||||||
|
return obj == null || obj == "null" || obj == "undefined" || "undefined".equals(obj) || obj == "" ? default_value : obj.toString();
|
||||||
|
}catch (Exception ex){
|
||||||
|
return default_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static int FInt(Object obj){
|
||||||
|
return FInt(obj, 0);
|
||||||
|
}
|
||||||
|
public static int FInt(Object obj, int default_value){
|
||||||
|
try{
|
||||||
|
if (obj==null) return default_value;
|
||||||
|
return Convert.toInt(obj);
|
||||||
|
}catch (Exception e){
|
||||||
|
return default_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Double FDouble(Object obj){
|
||||||
|
return FDouble(obj,0.00);
|
||||||
|
}
|
||||||
|
public static Double FDouble(Object obj, Double doub){
|
||||||
|
try{
|
||||||
|
return Convert.toDouble(obj);
|
||||||
|
}catch (Exception e){
|
||||||
|
return doub;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Long FLong(Object obj){
|
||||||
|
return FLong(obj, 0L);
|
||||||
|
}
|
||||||
|
public static Long FLong(Object obj, Long default_value){
|
||||||
|
try{
|
||||||
|
if (obj==null) return default_value;
|
||||||
|
return Convert.toLong(obj);
|
||||||
|
}catch (Exception e){
|
||||||
|
return default_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*校验邮箱格式
|
||||||
|
*/
|
||||||
|
public static boolean checkEmail(String value){
|
||||||
|
boolean flag=false;
|
||||||
|
Pattern p1 = null;
|
||||||
|
Matcher m = null;
|
||||||
|
p1 = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");
|
||||||
|
m = p1.matcher(value);
|
||||||
|
flag = m.matches();
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param checkType 校验类型:0校验手机号码,1校验座机号码,2两者都校验满足其一就可
|
||||||
|
* @param phoneNum
|
||||||
|
* */
|
||||||
|
public static boolean validPhoneNum(String checkType,String phoneNum){
|
||||||
|
boolean flag=false;
|
||||||
|
Pattern p1 = null;
|
||||||
|
Pattern p2 = null;
|
||||||
|
Matcher m = null;
|
||||||
|
p1 = Pattern.compile("^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\\d{8})?$");
|
||||||
|
p2 = Pattern.compile("^(0[0-9]{2,3}\\-)?([1-9][0-9]{6,7})$");
|
||||||
|
if("0".equals(checkType)){
|
||||||
|
System.out.println(phoneNum.length());
|
||||||
|
if(phoneNum.length()!=11){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
m = p1.matcher(phoneNum);
|
||||||
|
flag = m.matches();
|
||||||
|
}
|
||||||
|
}else if("1".equals(checkType)){
|
||||||
|
if(phoneNum.length()<11||phoneNum.length()>=16){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
m = p2.matcher(phoneNum);
|
||||||
|
flag = m.matches();
|
||||||
|
}
|
||||||
|
}else if("2".equals(checkType)){
|
||||||
|
if(!((phoneNum.length() == 11 && p1.matcher(phoneNum).matches())||(phoneNum.length()<16&&p2.matcher(phoneNum).matches()))){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 功能:身份证的有效验证
|
||||||
|
*/
|
||||||
|
public static boolean IDCardValidate(String IDStr) {
|
||||||
|
IDStr = IDStr.trim().toUpperCase();
|
||||||
|
String errorInfo = "";// 记录错误信息
|
||||||
|
String[] ValCodeArr = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" };
|
||||||
|
String[] Wi = { "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" };
|
||||||
|
String Ai = "";
|
||||||
|
// ================ 号码的长度 15位或18位 ================
|
||||||
|
if (IDStr.length() != 15 && IDStr.length() != 18) {
|
||||||
|
//身份证号码长度应该为15位或18位
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// =======================(end)========================
|
||||||
|
|
||||||
|
// ================ 数字 除最后以为都为数字 ================
|
||||||
|
if (IDStr.length() == 18) {
|
||||||
|
Ai = IDStr.substring(0, 17);
|
||||||
|
} else if (IDStr.length() == 15) {
|
||||||
|
Ai = IDStr.substring(0, 6) + "19" + IDStr.substring(6, 15);
|
||||||
|
}
|
||||||
|
if (isNumeric(Ai) == false) {
|
||||||
|
//身份证15位号码都应为数字 ; 18位号码除最后一位外,都应为数字。
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// =======================(end)========================
|
||||||
|
|
||||||
|
// ================ 出生年月是否有效 ================
|
||||||
|
String strYear = Ai.substring(6, 10);// 年份
|
||||||
|
String strMonth = Ai.substring(10, 12);// 月份
|
||||||
|
String strDay = Ai.substring(12, 14);// 月份
|
||||||
|
if (isDataFormat(strYear + "-" + strMonth + "-" + strDay) == false) {
|
||||||
|
//身份证生日无效。
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
GregorianCalendar gc = new GregorianCalendar();
|
||||||
|
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
try {
|
||||||
|
if ((gc.get(Calendar.YEAR) - Integer.parseInt(strYear)) > 150
|
||||||
|
|| (gc.getTime().getTime() - s.parse(strYear + "-" + strMonth + "-" + strDay).getTime()) < 0) {
|
||||||
|
//身份证生日不在有效范围。
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}catch (Exception ex){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (Integer.parseInt(strMonth) > 12 || Integer.parseInt(strMonth) == 0) {
|
||||||
|
//身份证月份无效
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (Integer.parseInt(strDay) > 31 || Integer.parseInt(strDay) == 0) {
|
||||||
|
//身份证日期无效
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// =====================(end)=====================
|
||||||
|
|
||||||
|
// ================ 地区码时候有效 ================
|
||||||
|
Hashtable h = GetAreaCode();
|
||||||
|
if (h.get(Ai.substring(0, 2)) == null) {
|
||||||
|
//身份证地区编码错误。
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// ==============================================
|
||||||
|
|
||||||
|
// ================ 判断最后一位的值 ================
|
||||||
|
int TotalmulAiWi = 0;
|
||||||
|
for (int i = 0; i < 17; i++) {
|
||||||
|
TotalmulAiWi = TotalmulAiWi + Integer.parseInt(String.valueOf(Ai.charAt(i))) * Integer.parseInt(Wi[i]);
|
||||||
|
}
|
||||||
|
int modValue = TotalmulAiWi % 11;
|
||||||
|
String strVerifyCode = ValCodeArr[modValue];
|
||||||
|
Ai = Ai + strVerifyCode;
|
||||||
|
|
||||||
|
if (IDStr.length() == 18) {
|
||||||
|
if (Ai.equals(IDStr) == false) {
|
||||||
|
//身份证无效,不是合法的身份证号码
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// =====================(end)=====================
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能:设置地区编码
|
||||||
|
*/
|
||||||
|
private static Hashtable GetAreaCode() {
|
||||||
|
Hashtable hashtable = new Hashtable();
|
||||||
|
hashtable.put("11", "北京");
|
||||||
|
hashtable.put("12", "天津");
|
||||||
|
hashtable.put("13", "河北");
|
||||||
|
hashtable.put("14", "山西");
|
||||||
|
hashtable.put("15", "内蒙古");
|
||||||
|
hashtable.put("21", "辽宁");
|
||||||
|
hashtable.put("22", "吉林");
|
||||||
|
hashtable.put("23", "黑龙江");
|
||||||
|
hashtable.put("31", "上海");
|
||||||
|
hashtable.put("32", "江苏");
|
||||||
|
hashtable.put("33", "浙江");
|
||||||
|
hashtable.put("34", "安徽");
|
||||||
|
hashtable.put("35", "福建");
|
||||||
|
hashtable.put("36", "江西");
|
||||||
|
hashtable.put("37", "山东");
|
||||||
|
hashtable.put("41", "河南");
|
||||||
|
hashtable.put("42", "湖北");
|
||||||
|
hashtable.put("43", "湖南");
|
||||||
|
hashtable.put("44", "广东");
|
||||||
|
hashtable.put("45", "广西");
|
||||||
|
hashtable.put("46", "海南");
|
||||||
|
hashtable.put("50", "重庆");
|
||||||
|
hashtable.put("51", "四川");
|
||||||
|
hashtable.put("52", "贵州");
|
||||||
|
hashtable.put("53", "云南");
|
||||||
|
hashtable.put("54", "西藏");
|
||||||
|
hashtable.put("61", "陕西");
|
||||||
|
hashtable.put("62", "甘肃");
|
||||||
|
hashtable.put("63", "青海");
|
||||||
|
hashtable.put("64", "宁夏");
|
||||||
|
hashtable.put("65", "新疆");
|
||||||
|
hashtable.put("71", "台湾");
|
||||||
|
hashtable.put("81", "香港");
|
||||||
|
hashtable.put("82", "澳门");
|
||||||
|
hashtable.put("91", "国外");
|
||||||
|
return hashtable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证日期字符串是否是YYYY-MM-DD格式
|
||||||
|
*/
|
||||||
|
public static boolean isDataFormat(String str) {
|
||||||
|
boolean flag = false;
|
||||||
|
// String
|
||||||
|
// regxStr="[1-9][0-9]{3}-[0-1][0-2]-((0[1-9])|([12][0-9])|(3[01]))";
|
||||||
|
String regxStr = "^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1-2][0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$";
|
||||||
|
Pattern pattern1 = Pattern.compile(regxStr);
|
||||||
|
Matcher isNo = pattern1.matcher(str);
|
||||||
|
if (isNo.matches()) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能:判断字符串是否为数字
|
||||||
|
*/
|
||||||
|
private static boolean isNumeric(String str) {
|
||||||
|
Pattern pattern = Pattern.compile("[0-9]*");
|
||||||
|
Matcher isNum = pattern.matcher(str);
|
||||||
|
if (isNum.matches()) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getIP(HttpServletRequest request){
|
||||||
|
String ip = request.getHeader("x-forwarded-for");
|
||||||
|
if (ip!=null && ip.length()!=0 && !"unknown".equalsIgnoreCase(ip))
|
||||||
|
if (ip.indexOf(",")>=0) ip = ip.split(",")[0];
|
||||||
|
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getHeader("Proxy-Client-IP");
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getHeader("HTTP_CLIENT_IP");
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getHeader("X-Real-IP");
|
||||||
|
if (ip==null || ip.length()==0 || "unknown".equalsIgnoreCase(ip))
|
||||||
|
ip = request.getRemoteAddr();
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, String> getBirAgeSex(String certificateNo) {
|
||||||
|
String birthday = "";
|
||||||
|
String age = "";
|
||||||
|
String sexCode = "";
|
||||||
|
|
||||||
|
int year = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
|
char[] number = certificateNo.toCharArray();
|
||||||
|
boolean flag = true;
|
||||||
|
if (number.length == 15) {
|
||||||
|
for (int x = 0; x < number.length; x++) {
|
||||||
|
if (!flag)
|
||||||
|
return new HashMap<String, String>();
|
||||||
|
flag = Character.isDigit(number[x]);
|
||||||
|
}
|
||||||
|
} else if (number.length == 18) {
|
||||||
|
for (int x = 0; x < number.length - 1; x++) {
|
||||||
|
if (!flag)
|
||||||
|
return new HashMap<String, String>();
|
||||||
|
flag = Character.isDigit(number[x]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag && certificateNo.length() == 15) {
|
||||||
|
birthday = "19" + certificateNo.substring(6, 8) + "-" + certificateNo.substring(8, 10) + "-"
|
||||||
|
+ certificateNo.substring(10, 12);
|
||||||
|
sexCode = Integer.parseInt(certificateNo.substring(certificateNo.length() - 3, certificateNo.length()))
|
||||||
|
% 2 == 0 ? "女" : "男";
|
||||||
|
age = (year - Integer.parseInt("19" + certificateNo.substring(6, 8))) + "";
|
||||||
|
} else if (flag && certificateNo.length() == 18) {
|
||||||
|
birthday = certificateNo.substring(6, 10) + "-" + certificateNo.substring(10, 12) + "-"
|
||||||
|
+ certificateNo.substring(12, 14);
|
||||||
|
sexCode = Integer.parseInt(certificateNo.substring(certificateNo.length() - 4, certificateNo.length() - 1))
|
||||||
|
% 2 == 0 ? "女" : "男";
|
||||||
|
age = (year - Integer.parseInt(certificateNo.substring(6, 10))) + "";
|
||||||
|
}
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
map.put("birthday", birthday);
|
||||||
|
map.put("age", age);
|
||||||
|
map.put("sex", sexCode);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据身份证号码获取出生日期
|
||||||
|
* @param idcard 身份证号码
|
||||||
|
* @return 返回出生日期
|
||||||
|
*/
|
||||||
|
public static String getBirthdayByIdcard(String idcard){
|
||||||
|
Map<String, String> map = getBirAgeSex(idcard);
|
||||||
|
return NStr(map.get("birthday"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据身份证号码获取性别
|
||||||
|
* @param idcard 身份证号码
|
||||||
|
* @return 返回性别
|
||||||
|
*/
|
||||||
|
public static String getGenderByIdcard(String idcard){
|
||||||
|
Map<String, String> map = getBirAgeSex(idcard);
|
||||||
|
return NStr(map.get("sex"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String generateOrderSn(Long userId) {
|
||||||
|
String now = DateUtils.dateTimeNow();
|
||||||
|
Random ran = new Random();
|
||||||
|
String orderSn = userId + "_" + now + String.format("%03d", ran.nextInt(999));
|
||||||
|
return orderSn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class BaseEntity implements Serializable {
|
||||||
* 创建部门
|
* 创建部门
|
||||||
*/
|
*/
|
||||||
@TableField(fill = FieldFill.INSERT,exist = false)
|
@TableField(fill = FieldFill.INSERT,exist = false)
|
||||||
private Long createDept;
|
private String createDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建者
|
* 创建者
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,8 @@ public class LoginHelper {
|
||||||
/**
|
/**
|
||||||
* 获取部门ID
|
* 获取部门ID
|
||||||
*/
|
*/
|
||||||
public static Long getDeptId() {
|
public static String getDeptId() {
|
||||||
return Convert.toLong(getExtra(DEPT_KEY));
|
return getExtra(DEPT_KEY).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://192.168.0.49:3306/xxbsdb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: root
|
||||||
hikari:
|
hikari:
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class TestDemo extends TenantEntity {
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class TestTree extends TenantEntity {
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class TestDemoBo extends BaseEntity {
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public class TestDemoImportVo {
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "部门id不能为空")
|
@NotNull(message = "部门id不能为空")
|
||||||
@ExcelProperty(value = "部门id")
|
@ExcelProperty(value = "部门id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public class TestTreeBo extends BaseEntity {
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class TestDemoVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ExcelRequired
|
@ExcelRequired
|
||||||
@ExcelProperty(value = "部门id")
|
@ExcelProperty(value = "部门id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class TestTreeVo implements Serializable {
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "部门id")
|
@ExcelProperty(value = "部门id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ public class DeptExtractionJobExecutor {
|
||||||
// 2. 将组织机构名称格式统一(有的为合肥市公安局,有的为安徽省宿州市公安局)
|
// 2. 将组织机构名称格式统一(有的为合肥市公安局,有的为安徽省宿州市公安局)
|
||||||
if (deptName.startsWith("安徽省") && !deptId.equals("340000000000")){deptName = deptName.substring(3);}
|
if (deptName.startsWith("安徽省") && !deptId.equals("340000000000")){deptName = deptName.substring(3);}
|
||||||
// 将抽取到的组织机构信息放入集合中
|
// 将抽取到的组织机构信息放入集合中
|
||||||
sysDept.setDeptId(Long.valueOf(deptId));
|
sysDept.setDeptId((deptId));
|
||||||
sysDept.setParentId(Long.valueOf(parentId));
|
sysDept.setParentId((parentId));
|
||||||
sysDept.setAncestors(newAncestors);
|
sysDept.setAncestors(newAncestors);
|
||||||
sysDept.setDeptName(deptName);
|
sysDept.setDeptName(deptName);
|
||||||
sysDept.setShortName(shortName);
|
sysDept.setShortName(shortName);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,114 @@
|
||||||
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.biz.domain.vo.BizCategoryVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizCategoryBo;
|
||||||
|
import org.dromara.biz.service.IBizCategoryService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/category")
|
||||||
|
public class BizCategoryController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizCategoryService bizCategoryService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有类别列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:list")
|
||||||
|
@GetMapping("/alllist")
|
||||||
|
public R<List<BizCategoryVo>> alllist(BizCategoryBo bo) {
|
||||||
|
return R.ok(bizCategoryService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询类别列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizCategoryVo> list(BizCategoryBo bo, PageQuery pageQuery) {
|
||||||
|
return bizCategoryService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出类别列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:export")
|
||||||
|
@Log(title = "类别", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizCategoryBo bo, HttpServletResponse response) {
|
||||||
|
List<BizCategoryVo> list = bizCategoryService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "类别", BizCategoryVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取类别详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizCategoryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizCategoryService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增类别
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:add")
|
||||||
|
@Log(title = "类别", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizCategoryBo bo) {
|
||||||
|
return toAjax(bizCategoryService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改类别
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:edit")
|
||||||
|
@Log(title = "类别", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizCategoryBo bo) {
|
||||||
|
return toAjax(bizCategoryService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除类别
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:category:remove")
|
||||||
|
@Log(title = "类别", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizCategoryService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportFileVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportFileBo;
|
||||||
|
import org.dromara.biz.service.IBizReportFileService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/reportFile")
|
||||||
|
public class BizReportFileController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizReportFileService bizReportFileService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息附件列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizReportFileVo> list(BizReportFileBo bo, PageQuery pageQuery) {
|
||||||
|
return bizReportFileService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报送信息附件列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:export")
|
||||||
|
@Log(title = "报送信息附件", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizReportFileBo bo, HttpServletResponse response) {
|
||||||
|
List<BizReportFileVo> list = bizReportFileService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "报送信息附件", BizReportFileVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报送信息附件详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizReportFileVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizReportFileService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息附件
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:add")
|
||||||
|
@Log(title = "报送信息附件", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizReportFileBo bo) {
|
||||||
|
return toAjax(bizReportFileService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息附件
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:edit")
|
||||||
|
@Log(title = "报送信息附件", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizReportFileBo bo) {
|
||||||
|
return toAjax(bizReportFileService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报送信息附件
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportFile:remove")
|
||||||
|
@Log(title = "报送信息附件", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizReportFileService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
||||||
|
import org.dromara.biz.service.IBizReportInfoService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/reportInfo")
|
||||||
|
public class BizReportInfoController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizReportInfoService bizReportInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizReportInfoVo> list(BizReportInfoBo bo, PageQuery pageQuery) {
|
||||||
|
return bizReportInfoService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报送信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:export")
|
||||||
|
@Log(title = "报送信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizReportInfoBo bo, HttpServletResponse response) {
|
||||||
|
List<BizReportInfoVo> list = bizReportInfoService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "报送信息", BizReportInfoVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报送信息详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizReportInfoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizReportInfoService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:add")
|
||||||
|
@Log(title = "报送信息", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@ResponseBody
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizReportInfoBo bo) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
|
bo.setReportDeptId(user.getDeptId());
|
||||||
|
bo.setReportDeptName(user.getDeptName());
|
||||||
|
bo.setReportUserId(user.getUserId());
|
||||||
|
bo.setReportUserName(user.getNickname());
|
||||||
|
bo.setReportTime(new Date());
|
||||||
|
return toAjax(bizReportInfoService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:edit")
|
||||||
|
@Log(title = "报送信息", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizReportInfoBo bo) {
|
||||||
|
return toAjax(bizReportInfoService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报送信息
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportInfo:remove")
|
||||||
|
@Log(title = "报送信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizReportInfoService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
|
import org.dromara.biz.service.IBizReportReceiverService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/reportReceiver")
|
||||||
|
public class BizReportReceiverController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizReportReceiverService bizReportReceiverService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录接收单位列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizReportReceiverVo> list(BizReportReceiverBo bo, PageQuery pageQuery) {
|
||||||
|
return bizReportReceiverService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报送记录接收单位列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:export")
|
||||||
|
@Log(title = "报送记录接收单位", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizReportReceiverBo bo, HttpServletResponse response) {
|
||||||
|
List<BizReportReceiverVo> list = bizReportReceiverService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "报送记录接收单位", BizReportReceiverVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报送记录接收单位详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizReportReceiverVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizReportReceiverService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录接收单位
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:add")
|
||||||
|
@Log(title = "报送记录接收单位", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizReportReceiverBo bo) {
|
||||||
|
return toAjax(bizReportReceiverService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录接收单位
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:edit")
|
||||||
|
@Log(title = "报送记录接收单位", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizReportReceiverBo bo) {
|
||||||
|
return toAjax(bizReportReceiverService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录签收
|
||||||
|
*/
|
||||||
|
@Log(title = "报送记录签收", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/sign")
|
||||||
|
public R<Void> sign(@Validated(EditGroup.class) @RequestBody BizReportReceiverBo bo) {
|
||||||
|
bo.setIsSign(1L);
|
||||||
|
bo.setSignUserId(LoginHelper.getUserId());
|
||||||
|
bo.setSignUserName(LoginHelper.getLoginUser().getNickname());
|
||||||
|
bo.setSignTime(new Date());
|
||||||
|
return toAjax(bizReportReceiverService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReceiver:remove")
|
||||||
|
@Log(title = "报送记录接收单位", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizReportReceiverService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReplyVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReplyBo;
|
||||||
|
import org.dromara.biz.service.IBizReportReplyService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/reportReply")
|
||||||
|
public class BizReportReplyController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizReportReplyService bizReportReplyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录反馈列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizReportReplyVo> list(BizReportReplyBo bo, PageQuery pageQuery) {
|
||||||
|
return bizReportReplyService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报送记录反馈列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:export")
|
||||||
|
@Log(title = "报送记录反馈", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizReportReplyBo bo, HttpServletResponse response) {
|
||||||
|
List<BizReportReplyVo> list = bizReportReplyService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "报送记录反馈", BizReportReplyVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报送记录反馈详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizReportReplyVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizReportReplyService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录反馈
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:add")
|
||||||
|
@Log(title = "报送记录反馈", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizReportReplyBo bo) {
|
||||||
|
return toAjax(bizReportReplyService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录反馈
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:edit")
|
||||||
|
@Log(title = "报送记录反馈", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizReportReplyBo bo) {
|
||||||
|
return toAjax(bizReportReplyService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报送记录反馈
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportReply:remove")
|
||||||
|
@Log(title = "报送记录反馈", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizReportReplyService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package org.dromara.biz.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别对象 biz_category
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_category")
|
||||||
|
public class BizCategory extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别(xxcl/xxbs)
|
||||||
|
*/
|
||||||
|
private String cate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表
|
||||||
|
*/
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型
|
||||||
|
*/
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以签收
|
||||||
|
*/
|
||||||
|
private String canSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以反馈
|
||||||
|
*/
|
||||||
|
private String canFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以回复
|
||||||
|
*/
|
||||||
|
private String canReply;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以分享转发
|
||||||
|
*/
|
||||||
|
private String canShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板地址
|
||||||
|
*/
|
||||||
|
private String templateUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package org.dromara.biz.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件对象 biz_report_file
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_report_file")
|
||||||
|
public class BizReportFile extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
package org.dromara.biz.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息对象 biz_report_info
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_report_info")
|
||||||
|
public class BizReportInfo extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别ID
|
||||||
|
*/
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抄送
|
||||||
|
*/
|
||||||
|
private String chao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领导批示
|
||||||
|
*/
|
||||||
|
private String ldps;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期号
|
||||||
|
*/
|
||||||
|
private String qh;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表类型
|
||||||
|
*/
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型ID
|
||||||
|
*/
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统ID
|
||||||
|
*/
|
||||||
|
private Long oldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报时间
|
||||||
|
*/
|
||||||
|
private Date reportTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统用户ID
|
||||||
|
*/
|
||||||
|
private String oldUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户ID
|
||||||
|
*/
|
||||||
|
private Long reportUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户名称
|
||||||
|
*/
|
||||||
|
private String reportUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位ID
|
||||||
|
*/
|
||||||
|
private String reportDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位名称
|
||||||
|
*/
|
||||||
|
private String reportDeptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户ID
|
||||||
|
*/
|
||||||
|
private Long updateUserId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位对象 biz_report_receiver
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_report_receiver")
|
||||||
|
public class BizReportReceiver extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否签收
|
||||||
|
*/
|
||||||
|
private Long isSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收时间
|
||||||
|
*/
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户ID
|
||||||
|
*/
|
||||||
|
private Long signUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户名称
|
||||||
|
*/
|
||||||
|
private String signUserName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package org.dromara.biz.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈对象 biz_report_reply
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_report_reply")
|
||||||
|
public class BizReportReply extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1回复 2反馈
|
||||||
|
*/
|
||||||
|
private String mode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizCategory;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别业务对象 biz_category
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizCategory.class, reverseConvertGenerate = false)
|
||||||
|
public class BizCategoryBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "类别名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别(xxcl/xxbs)
|
||||||
|
*/
|
||||||
|
private String cate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表
|
||||||
|
*/
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型
|
||||||
|
*/
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以签收
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否可以签收不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String canSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以反馈
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否可以反馈不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String canFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以回复
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否可以回复不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String canReply;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以分享转发
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否可以分享转发不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String canShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板地址
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "模板地址不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String templateUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件业务对象 biz_report_file
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizReportFile.class, reverseConvertGenerate = false)
|
||||||
|
public class BizReportFileBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.biz.domain.BizReportInfo;
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息业务对象 biz_report_info
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizReportInfo.class, reverseConvertGenerate = false)
|
||||||
|
public class BizReportInfoBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别ID
|
||||||
|
*/
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抄送
|
||||||
|
*/
|
||||||
|
private String chao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领导批示
|
||||||
|
*/
|
||||||
|
private String ldps;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期号
|
||||||
|
*/
|
||||||
|
private String qh;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表类型
|
||||||
|
*/
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型ID
|
||||||
|
*/
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统ID
|
||||||
|
*/
|
||||||
|
private Long oldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档地址
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报时间
|
||||||
|
*/
|
||||||
|
private Date reportTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统用户ID
|
||||||
|
*/
|
||||||
|
private String oldUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户ID
|
||||||
|
*/
|
||||||
|
private Long reportUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户名称
|
||||||
|
*/
|
||||||
|
private String reportUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位ID
|
||||||
|
*/
|
||||||
|
private String reportDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位名称
|
||||||
|
*/
|
||||||
|
private String reportDeptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户ID
|
||||||
|
*/
|
||||||
|
private Long updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件列表
|
||||||
|
*/
|
||||||
|
private List<BizReportFile> files;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收单位
|
||||||
|
*/
|
||||||
|
private List<BizReportReceiver> receiverDepts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收单位ID 新增修改用
|
||||||
|
*/
|
||||||
|
private String[] receiverDeptIds;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位业务对象 biz_report_receiver
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizReportReceiver.class, reverseConvertGenerate = false)
|
||||||
|
public class BizReportReceiverBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否签收
|
||||||
|
*/
|
||||||
|
private Long isSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收时间
|
||||||
|
*/
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户ID
|
||||||
|
*/
|
||||||
|
private Long signUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户名称
|
||||||
|
*/
|
||||||
|
private String signUserName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportReply;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈业务对象 biz_report_reply
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizReportReply.class, reverseConvertGenerate = false)
|
||||||
|
public class BizReportReplyBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1回复 2反馈
|
||||||
|
*/
|
||||||
|
private String mode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizCategory;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别视图对象 biz_category
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizCategory.class)
|
||||||
|
public class BizCategoryVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类别名称")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别(xxcl/xxbs)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类别", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "x=xcl/xxbs")
|
||||||
|
private String cate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统表")
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统类型")
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以签收
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否可以签收", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||||
|
private String canSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以反馈
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否可以反馈", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||||
|
private String canFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以回复
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否可以回复", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||||
|
private String canReply;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否可以分享转发
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否可以分享转发", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||||
|
private String canShare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "模板地址")
|
||||||
|
private String templateUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "sys_data_state")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件视图对象 biz_report_file
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizReportFile.class)
|
||||||
|
public class BizReportFileVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报送信息ID")
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件地址")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,184 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.biz.domain.BizReportInfo;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息视图对象 biz_report_info
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizReportInfo.class)
|
||||||
|
public class BizReportInfoVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类别ID")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类别名称")
|
||||||
|
private String categoryTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抄送
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "抄送")
|
||||||
|
private String chao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领导批示
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "领导批示")
|
||||||
|
private String ldps;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 期号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "期号")
|
||||||
|
private String qh;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统表类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统表类型")
|
||||||
|
private String oldTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统类型ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统类型ID")
|
||||||
|
private String oldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统ID")
|
||||||
|
private Long oldId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文档地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文档地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报内容
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报时间")
|
||||||
|
private Date reportTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 旧系统用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "旧系统用户ID")
|
||||||
|
private String oldUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报用户ID")
|
||||||
|
private Long reportUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报用户名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报用户名称")
|
||||||
|
private String reportUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报单位ID")
|
||||||
|
private String reportDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报单位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报单位名称")
|
||||||
|
private String reportDeptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上报状态", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "biz_report_status")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "更新用户ID")
|
||||||
|
private Long updateUserId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件列表
|
||||||
|
*/
|
||||||
|
private List<BizReportFile> files;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收单位
|
||||||
|
*/
|
||||||
|
private List<BizReportReceiver> receiverDepts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收单位ID 新增修改用
|
||||||
|
*/
|
||||||
|
private String[] receiverDeptIds;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位视图对象 biz_report_receiver
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizReportReceiver.class)
|
||||||
|
public class BizReportReceiverVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报送信息ID")
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "部门ID")
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "部门名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否签收
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否签收")
|
||||||
|
private Long isSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "签收时间")
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "签收用户ID")
|
||||||
|
private Long signUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收用户名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "签收用户名称")
|
||||||
|
private String signUserName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportReply;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈视图对象 biz_report_reply
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizReportReply.class)
|
||||||
|
public class BizReportReplyVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报送信息ID")
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1回复 2反馈
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类型 1回复 2反馈")
|
||||||
|
private String mode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件地址
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件地址")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "附件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizCategory;
|
||||||
|
import org.dromara.biz.domain.vo.BizCategoryVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface BizCategoryMapper extends BaseMapperPlus<BizCategory, BizCategoryVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportFileVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface BizReportFileMapper extends BaseMapperPlus<BizReportFile, BizReportFileVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.dromara.biz.domain.BizReportInfo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface BizReportInfoMapper extends BaseMapperPlus<BizReportInfo, BizReportInfoVo> {
|
||||||
|
|
||||||
|
@Select("select i.*, c.title as categoryTitle from biz_report_info i left join biz_category c on i.category_id = c.id where i.id = ${id}")
|
||||||
|
BizReportInfoVo selectBizReportInfoVoById(@Param("id") Long id);
|
||||||
|
|
||||||
|
@Select("select i.*, c.title as categoryTitle from biz_report_info i left join biz_category c on i.category_id = c.id ${ew.getCustomSqlSegment}")
|
||||||
|
List<BizReportInfoVo> selectBizReportInfoVoList(@Param("ew") Wrapper<BizReportInfo> queryWrapper);
|
||||||
|
|
||||||
|
@Select("select i.*, c.title as categoryTitle from biz_report_info i left join biz_category c on i.category_id = c.id ${ew.getCustomSqlSegment}")
|
||||||
|
Page<BizReportInfoVo> selectBizReportInfoVoPage(@Param("page") Page<BizReportInfo> page, @Param("ew") Wrapper<BizReportInfo> queryWrapper);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface BizReportReceiverMapper extends BaseMapperPlus<BizReportReceiver, BizReportReceiverVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportReply;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReplyVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface BizReportReplyMapper extends BaseMapperPlus<BizReportReply, BizReportReplyVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.vo.BizCategoryVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizCategoryBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别Service接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface IBizCategoryService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询类别
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 类别
|
||||||
|
*/
|
||||||
|
BizCategoryVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询类别列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 类别分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizCategoryVo> queryPageList(BizCategoryBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的类别列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 类别列表
|
||||||
|
*/
|
||||||
|
List<BizCategoryVo> queryList(BizCategoryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增类别
|
||||||
|
*
|
||||||
|
* @param bo 类别
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizCategoryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改类别
|
||||||
|
*
|
||||||
|
* @param bo 类别
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizCategoryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除类别信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.vo.BizReportFileVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportFileBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件Service接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface IBizReportFileService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息附件
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送信息附件
|
||||||
|
*/
|
||||||
|
BizReportFileVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送信息附件列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送信息附件分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizReportFileVo> queryPageList(BizReportFileBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送信息附件列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送信息附件列表
|
||||||
|
*/
|
||||||
|
List<BizReportFileVo> queryList(BizReportFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息附件
|
||||||
|
*
|
||||||
|
* @param bo 报送信息附件
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizReportFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息附件
|
||||||
|
*
|
||||||
|
* @param bo 报送信息附件
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizReportFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送信息附件信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息Service接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface IBizReportInfoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送信息
|
||||||
|
*/
|
||||||
|
BizReportInfoVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送信息分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizReportInfoVo> queryPageList(BizReportInfoBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送信息列表
|
||||||
|
*/
|
||||||
|
List<BizReportInfoVo> queryList(BizReportInfoBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizReportInfoBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizReportInfoBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位Service接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface IBizReportReceiverService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送记录接收单位
|
||||||
|
*/
|
||||||
|
BizReportReceiverVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送记录接收单位列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送记录接收单位分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizReportReceiverVo> queryPageList(BizReportReceiverBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送记录接收单位列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送记录接收单位列表
|
||||||
|
*/
|
||||||
|
List<BizReportReceiverVo> queryList(BizReportReceiverBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param bo 报送记录接收单位
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizReportReceiverBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param bo 报送记录接收单位
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizReportReceiverBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送记录接收单位信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReplyVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReplyBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈Service接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
public interface IBizReportReplyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录反馈
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送记录反馈
|
||||||
|
*/
|
||||||
|
BizReportReplyVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送记录反馈列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送记录反馈分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizReportReplyVo> queryPageList(BizReportReplyBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送记录反馈列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送记录反馈列表
|
||||||
|
*/
|
||||||
|
List<BizReportReplyVo> queryList(BizReportReplyBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录反馈
|
||||||
|
*
|
||||||
|
* @param bo 报送记录反馈
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizReportReplyBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录反馈
|
||||||
|
*
|
||||||
|
* @param bo 报送记录反馈
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizReportReplyBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送记录反馈信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizCategoryBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizCategoryVo;
|
||||||
|
import org.dromara.biz.domain.BizCategory;
|
||||||
|
import org.dromara.biz.mapper.BizCategoryMapper;
|
||||||
|
import org.dromara.biz.service.IBizCategoryService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-24
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizCategoryServiceImpl implements IBizCategoryService {
|
||||||
|
|
||||||
|
private final BizCategoryMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询类别
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 类别
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizCategoryVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询类别列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 类别分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizCategoryVo> queryPageList(BizCategoryBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizCategory> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizCategoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的类别列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 类别列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizCategoryVo> queryList(BizCategoryBo bo) {
|
||||||
|
LambdaQueryWrapper<BizCategory> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizCategory> buildQueryWrapper(BizCategoryBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizCategory> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BizCategory::getId);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), BizCategory::getTitle, bo.getTitle());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCate()), BizCategory::getCate, bo.getCate());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOldTable()), BizCategory::getOldTable, bo.getOldTable());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOldType()), BizCategory::getOldType, bo.getOldType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCanSign()), BizCategory::getCanSign, bo.getCanSign());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCanFeedback()), BizCategory::getCanFeedback, bo.getCanFeedback());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCanReply()), BizCategory::getCanReply, bo.getCanReply());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCanShare()), BizCategory::getCanShare, bo.getCanShare());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTemplateUrl()), BizCategory::getTemplateUrl, bo.getTemplateUrl());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BizCategory::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增类别
|
||||||
|
*
|
||||||
|
* @param bo 类别
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizCategoryBo bo) {
|
||||||
|
BizCategory add = MapstructUtils.convert(bo, BizCategory.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改类别
|
||||||
|
*
|
||||||
|
* @param bo 类别
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizCategoryBo bo) {
|
||||||
|
BizCategory update = MapstructUtils.convert(bo, BizCategory.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizCategory entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除类别信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportFileBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportFileVo;
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.biz.mapper.BizReportFileMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportFileService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息附件Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizReportFileServiceImpl implements IBizReportFileService {
|
||||||
|
|
||||||
|
private final BizReportFileMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息附件
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送信息附件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizReportFileVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送信息附件列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送信息附件分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizReportFileVo> queryPageList(BizReportFileBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizReportFile> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizReportFileVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送信息附件列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送信息附件列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizReportFileVo> queryList(BizReportFileBo bo) {
|
||||||
|
LambdaQueryWrapper<BizReportFile> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizReportFile> buildQueryWrapper(BizReportFileBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizReportFile> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BizReportFile::getId);
|
||||||
|
lqw.eq(bo.getReportId() != null, BizReportFile::getReportId, bo.getReportId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getFileName()), BizReportFile::getFileName, bo.getFileName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), BizReportFile::getFileUrl, bo.getFileUrl());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息附件
|
||||||
|
*
|
||||||
|
* @param bo 报送信息附件
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizReportFileBo bo) {
|
||||||
|
BizReportFile add = MapstructUtils.convert(bo, BizReportFile.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息附件
|
||||||
|
*
|
||||||
|
* @param bo 报送信息附件
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizReportFileBo bo) {
|
||||||
|
BizReportFile update = MapstructUtils.convert(bo, BizReportFile.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizReportFile entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送信息附件信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,240 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportFile;
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
|
import org.dromara.biz.mapper.BizReportFileMapper;
|
||||||
|
import org.dromara.biz.mapper.BizReportReceiverMapper;
|
||||||
|
import org.dromara.common.core.utils.Helper;
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.system.mapper.SysDeptMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
||||||
|
import org.dromara.biz.domain.BizReportInfo;
|
||||||
|
import org.dromara.biz.mapper.BizReportInfoMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportInfoService;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
|
|
||||||
|
private final BizReportInfoMapper baseMapper;
|
||||||
|
|
||||||
|
private final BizReportFileMapper fileMapper;
|
||||||
|
|
||||||
|
private final BizReportReceiverMapper receiverMapper;
|
||||||
|
|
||||||
|
private final SysDeptMapper deptMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizReportInfoVo queryById(Long id){
|
||||||
|
BizReportInfoVo info = baseMapper.selectBizReportInfoVoById(id);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<BizReportReceiver> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(BizReportReceiver::getReportId, id);
|
||||||
|
List<BizReportReceiver> receiverVos = receiverMapper.selectList(lqw);
|
||||||
|
info.setReceiverDepts(receiverVos);
|
||||||
|
|
||||||
|
List<String> deptids = new ArrayList<>();
|
||||||
|
for (BizReportReceiver item : receiverVos) {
|
||||||
|
deptids.add(item.getDeptId());
|
||||||
|
}
|
||||||
|
info.setReceiverDeptIds(deptids.toArray(new String[deptids.size()]));
|
||||||
|
|
||||||
|
LambdaQueryWrapper<BizReportFile> lqwf = Wrappers.lambdaQuery();
|
||||||
|
lqwf.eq(BizReportFile::getReportId, id);
|
||||||
|
List<BizReportFile> files = fileMapper.selectList(lqwf);
|
||||||
|
info.setFiles(files);
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送信息分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizReportInfoVo> queryPageList(BizReportInfoBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizReportInfo> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizReportInfoVo> result = baseMapper.selectBizReportInfoVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送信息列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送信息列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizReportInfoVo> queryList(BizReportInfoBo bo) {
|
||||||
|
LambdaQueryWrapper<BizReportInfo> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectBizReportInfoVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizReportInfo> buildQueryWrapper(BizReportInfoBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizReportInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByDesc(BizReportInfo::getReportTime);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), BizReportInfo::getTitle, bo.getTitle());
|
||||||
|
lqw.eq(bo.getCategoryId() != null, BizReportInfo::getCategoryId, bo.getCategoryId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getChao()), BizReportInfo::getChao, bo.getChao());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getLdps()), BizReportInfo::getLdps, bo.getLdps());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getQh()), BizReportInfo::getQh, bo.getQh());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOldType()), BizReportInfo::getOldType, bo.getOldType());
|
||||||
|
lqw.eq(bo.getOldId() != null, BizReportInfo::getOldId, bo.getOldId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getUrl()), BizReportInfo::getUrl, bo.getUrl());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), BizReportInfo::getFileUrl, bo.getFileUrl());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getFileName()), BizReportInfo::getFileName, bo.getFileName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContent()), BizReportInfo::getContent, bo.getContent());
|
||||||
|
lqw.eq(bo.getReportTime() != null, BizReportInfo::getReportTime, bo.getReportTime());
|
||||||
|
lqw.between(params.get("beginReportTime") != null && params.get("endReportTime") != null,
|
||||||
|
BizReportInfo::getReportTime ,params.get("beginReportTime"), params.get("endReportTime"));
|
||||||
|
lqw.eq(bo.getReportUserId() != null, BizReportInfo::getReportUserId, bo.getReportUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getReportUserName()), BizReportInfo::getReportUserName, bo.getReportUserName());
|
||||||
|
lqw.eq(bo.getReportDeptId() != null, BizReportInfo::getReportDeptId, bo.getReportDeptId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getReportDeptName()), BizReportInfo::getReportDeptName, bo.getReportDeptName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BizReportInfo::getStatus, bo.getStatus());
|
||||||
|
lqw.eq(bo.getUpdateUserId() != null, BizReportInfo::getUpdateUserId, bo.getUpdateUserId());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizReportInfoBo bo) {
|
||||||
|
BizReportInfo add = MapstructUtils.convert(bo, BizReportInfo.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
|
||||||
|
// 插入接收单位表
|
||||||
|
if(bo.getReceiverDeptIds().length>0){
|
||||||
|
for (String deptId : bo.getReceiverDeptIds()) {
|
||||||
|
BizReportReceiver receiver = new BizReportReceiver();
|
||||||
|
receiver.setReportId(bo.getId());
|
||||||
|
receiver.setDeptId(deptId);
|
||||||
|
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
||||||
|
receiverMapper.insert(receiver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 插入附件表
|
||||||
|
if (bo.getFiles().size()>0){
|
||||||
|
for (BizReportFile file : bo.getFiles()) {
|
||||||
|
file.setReportId(bo.getId());
|
||||||
|
fileMapper.insert(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizReportInfoBo bo) {
|
||||||
|
BizReportInfo update = MapstructUtils.convert(bo, BizReportInfo.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
|
||||||
|
boolean flag = baseMapper.updateById(update) > 0;
|
||||||
|
if (flag){
|
||||||
|
// 插入接收单位表
|
||||||
|
List<String> dbDeptIds = new ArrayList<>();
|
||||||
|
if (bo.getReceiverDepts().size()>0) {
|
||||||
|
for (BizReportReceiver receiver : bo.getReceiverDepts()) {
|
||||||
|
if (!Arrays.asList(bo.getReceiverDeptIds()).contains(receiver.getDeptId()))
|
||||||
|
receiverMapper.deleteById(receiver.getId());
|
||||||
|
dbDeptIds.add(receiver.getDeptId());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
LambdaQueryWrapper<BizReportReceiver> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(BizReportReceiver::getReportId, bo.getId());
|
||||||
|
receiverMapper.delete(lqw);
|
||||||
|
}
|
||||||
|
if(bo.getReceiverDeptIds().length>0){
|
||||||
|
for (String deptId : bo.getReceiverDeptIds()) {
|
||||||
|
if (dbDeptIds.contains(deptId)) continue;
|
||||||
|
else {
|
||||||
|
BizReportReceiver receiver = new BizReportReceiver();
|
||||||
|
receiver.setReportId(bo.getId());
|
||||||
|
receiver.setDeptId(deptId);
|
||||||
|
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
||||||
|
receiverMapper.insert(receiver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 插入附件表
|
||||||
|
if (bo.getFiles().size()>0){
|
||||||
|
|
||||||
|
for (BizReportFile file : bo.getFiles()) {
|
||||||
|
if (Helper.FInt(file.getId())>0) continue;
|
||||||
|
else {
|
||||||
|
file.setReportId(bo.getId());
|
||||||
|
fileMapper.insert(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizReportInfo entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送信息信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
|
import org.dromara.biz.domain.BizReportReceiver;
|
||||||
|
import org.dromara.biz.mapper.BizReportReceiverMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportReceiverService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录接收单位Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizReportReceiverServiceImpl implements IBizReportReceiverService {
|
||||||
|
|
||||||
|
private final BizReportReceiverMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送记录接收单位
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizReportReceiverVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送记录接收单位列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送记录接收单位分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizReportReceiverVo> queryPageList(BizReportReceiverBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizReportReceiver> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizReportReceiverVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送记录接收单位列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送记录接收单位列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizReportReceiverVo> queryList(BizReportReceiverBo bo) {
|
||||||
|
LambdaQueryWrapper<BizReportReceiver> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizReportReceiver> buildQueryWrapper(BizReportReceiverBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizReportReceiver> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BizReportReceiver::getId);
|
||||||
|
lqw.eq(bo.getReportId() != null, BizReportReceiver::getReportId, bo.getReportId());
|
||||||
|
lqw.eq(bo.getDeptId() != null, BizReportReceiver::getDeptId, bo.getDeptId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), BizReportReceiver::getDeptName, bo.getDeptName());
|
||||||
|
lqw.eq(bo.getIsSign() != null, BizReportReceiver::getIsSign, bo.getIsSign());
|
||||||
|
lqw.eq(bo.getSignTime() != null, BizReportReceiver::getSignTime, bo.getSignTime());
|
||||||
|
lqw.eq(bo.getSignUserId() != null, BizReportReceiver::getSignUserId, bo.getSignUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getSignUserName()), BizReportReceiver::getSignUserName, bo.getSignUserName());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param bo 报送记录接收单位
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizReportReceiverBo bo) {
|
||||||
|
BizReportReceiver add = MapstructUtils.convert(bo, BizReportReceiver.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录接收单位
|
||||||
|
*
|
||||||
|
* @param bo 报送记录接收单位
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizReportReceiverBo bo) {
|
||||||
|
BizReportReceiver update = MapstructUtils.convert(bo, BizReportReceiver.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizReportReceiver entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送记录接收单位信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReplyBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportReplyVo;
|
||||||
|
import org.dromara.biz.domain.BizReportReply;
|
||||||
|
import org.dromara.biz.mapper.BizReportReplyMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportReplyService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送记录反馈Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-11-21
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizReportReplyServiceImpl implements IBizReportReplyService {
|
||||||
|
|
||||||
|
private final BizReportReplyMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送记录反馈
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送记录反馈
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizReportReplyVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送记录反馈列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送记录反馈分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizReportReplyVo> queryPageList(BizReportReplyBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizReportReply> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizReportReplyVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送记录反馈列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送记录反馈列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizReportReplyVo> queryList(BizReportReplyBo bo) {
|
||||||
|
LambdaQueryWrapper<BizReportReply> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizReportReply> buildQueryWrapper(BizReportReplyBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizReportReply> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BizReportReply::getId);
|
||||||
|
lqw.eq(bo.getReportId() != null, BizReportReply::getReportId, bo.getReportId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getContent()), BizReportReply::getContent, bo.getContent());
|
||||||
|
lqw.eq(bo.getUserId() != null, BizReportReply::getUserId, bo.getUserId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMode()), BizReportReply::getMode, bo.getMode());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), BizReportReply::getFileUrl, bo.getFileUrl());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getFileName()), BizReportReply::getFileName, bo.getFileName());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送记录反馈
|
||||||
|
*
|
||||||
|
* @param bo 报送记录反馈
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizReportReplyBo bo) {
|
||||||
|
BizReportReply add = MapstructUtils.convert(bo, BizReportReply.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送记录反馈
|
||||||
|
*
|
||||||
|
* @param bo 报送记录反馈
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizReportReplyBo bo) {
|
||||||
|
BizReportReply update = MapstructUtils.convert(bo, BizReportReply.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizReportReply entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送记录反馈信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -49,7 +49,7 @@ public class SysDeptController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:dept:list")
|
@SaCheckPermission("system:dept:list")
|
||||||
@GetMapping("/list/exclude/{deptId}")
|
@GetMapping("/list/exclude/{deptId}")
|
||||||
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
|
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) String deptId) {
|
||||||
List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
|
List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
|
||||||
depts.removeIf(d -> d.getDeptId().equals(deptId)
|
depts.removeIf(d -> d.getDeptId().equals(deptId)
|
||||||
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));
|
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));
|
||||||
|
|
@ -63,7 +63,7 @@ public class SysDeptController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:dept:query")
|
@SaCheckPermission("system:dept:query")
|
||||||
@GetMapping(value = "/{deptId}")
|
@GetMapping(value = "/{deptId}")
|
||||||
public R<SysDeptVo> getInfo(@PathVariable Long deptId) {
|
public R<SysDeptVo> getInfo(@PathVariable String deptId) {
|
||||||
deptService.checkDeptDataScope(deptId);
|
deptService.checkDeptDataScope(deptId);
|
||||||
return R.ok(deptService.selectDeptById(deptId));
|
return R.ok(deptService.selectDeptById(deptId));
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +88,7 @@ public class SysDeptController extends BaseController {
|
||||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public R<Void> edit(@Validated @RequestBody SysDeptBo dept) {
|
public R<Void> edit(@Validated @RequestBody SysDeptBo dept) {
|
||||||
Long deptId = dept.getDeptId();
|
String deptId = dept.getDeptId();
|
||||||
deptService.checkDeptDataScope(deptId);
|
deptService.checkDeptDataScope(deptId);
|
||||||
if (!deptService.checkDeptNameUnique(dept)) {
|
if (!deptService.checkDeptNameUnique(dept)) {
|
||||||
return R.fail("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
return R.fail("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
||||||
|
|
@ -112,7 +112,7 @@ public class SysDeptController extends BaseController {
|
||||||
@SaCheckPermission("system:dept:remove")
|
@SaCheckPermission("system:dept:remove")
|
||||||
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
@Log(title = "部门管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{deptId}")
|
@DeleteMapping("/{deptId}")
|
||||||
public R<Void> remove(@PathVariable Long deptId) {
|
public R<Void> remove(@PathVariable String deptId) {
|
||||||
if (deptService.hasChildByDeptId(deptId)) {
|
if (deptService.hasChildByDeptId(deptId)) {
|
||||||
return R.warn("存在下级部门,不允许删除");
|
return R.warn("存在下级部门,不允许删除");
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +133,7 @@ public class SysDeptController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:dept:query")
|
@SaCheckPermission("system:dept:query")
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public R<List<SysDeptVo>> optionselect(@RequestParam(required = false) Long[] deptIds) {
|
public R<List<SysDeptVo>> optionselect(@RequestParam(required = false) String[] deptIds) {
|
||||||
return R.ok(deptService.selectDeptByIds(deptIds == null ? null : List.of(deptIds)));
|
return R.ok(deptService.selectDeptByIds(deptIds == null ? null : List.of(deptIds)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ public class SysPostController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:post:query")
|
@SaCheckPermission("system:post:query")
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public R<List<SysPostVo>> optionselect(@RequestParam(required = false) Long[] postIds, @RequestParam(required = false) Long deptId) {
|
public R<List<SysPostVo>> optionselect(@RequestParam(required = false) Long[] postIds, @RequestParam(required = false) String deptId) {
|
||||||
List<SysPostVo> list = new ArrayList<>();
|
List<SysPostVo> list = new ArrayList<>();
|
||||||
if (ObjectUtil.isNotNull(deptId)) {
|
if (ObjectUtil.isNotNull(deptId)) {
|
||||||
SysPostBo post = new SysPostBo();
|
SysPostBo post = new SysPostBo();
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ public class SysUserController extends BaseController {
|
||||||
SysUserVo sysUser = userService.selectUserById(userId);
|
SysUserVo sysUser = userService.selectUserById(userId);
|
||||||
userInfoVo.setUser(sysUser);
|
userInfoVo.setUser(sysUser);
|
||||||
userInfoVo.setRoleIds(roleService.selectRoleListByUserId(userId));
|
userInfoVo.setRoleIds(roleService.selectRoleListByUserId(userId));
|
||||||
Long deptId = sysUser.getDeptId();
|
String deptId = sysUser.getDeptId();
|
||||||
if (ObjectUtil.isNotNull(deptId)) {
|
if (ObjectUtil.isNotNull(deptId)) {
|
||||||
SysPostBo postBo = new SysPostBo();
|
SysPostBo postBo = new SysPostBo();
|
||||||
postBo.setDeptId(deptId);
|
postBo.setDeptId(deptId);
|
||||||
|
|
@ -217,7 +217,7 @@ public class SysUserController extends BaseController {
|
||||||
@SaCheckPermission("system:user:query")
|
@SaCheckPermission("system:user:query")
|
||||||
@GetMapping("/optionselect")
|
@GetMapping("/optionselect")
|
||||||
public R<List<SysUserVo>> optionselect(@RequestParam(required = false) Long[] userIds,
|
public R<List<SysUserVo>> optionselect(@RequestParam(required = false) Long[] userIds,
|
||||||
@RequestParam(required = false) Long deptId) {
|
@RequestParam(required = false) String deptId) {
|
||||||
return R.ok(userService.selectUserByIds(ArrayUtil.isEmpty(userIds) ? null : List.of(userIds), deptId));
|
return R.ok(userService.selectUserByIds(ArrayUtil.isEmpty(userIds) ? null : List.of(userIds), deptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -284,7 +284,7 @@ public class SysUserController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:user:list")
|
@SaCheckPermission("system:user:list")
|
||||||
@GetMapping("/deptTree")
|
@GetMapping("/deptTree")
|
||||||
public R<List<Tree<Long>>> deptTree(SysDeptBo dept) {
|
public R<List<Tree<String>>> deptTree(SysDeptBo dept) {
|
||||||
return R.ok(deptService.selectDeptTreeList(dept));
|
return R.ok(deptService.selectDeptTreeList(dept));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -293,7 +293,7 @@ public class SysUserController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:user:list")
|
@SaCheckPermission("system:user:list")
|
||||||
@GetMapping("/list/dept/{deptId}")
|
@GetMapping("/list/dept/{deptId}")
|
||||||
public R<List<SysUserVo>> listByDept(@PathVariable @NotNull Long deptId) {
|
public R<List<SysUserVo>> listByDept(@PathVariable @NotNull String deptId) {
|
||||||
return R.ok(userService.selectUserListByDept(deptId));
|
return R.ok(userService.selectUserListByDept(deptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,12 @@ public class SysDept extends TenantEntity {
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
@TableId(value = "dept_id")
|
@TableId(value = "dept_id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父部门ID
|
* 父部门ID
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class SysPost extends TenantEntity {
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位编码
|
* 岗位编码
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ public class SysRoleDept {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class SysUser extends TenantEntity {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,12 @@ public class SysDeptBo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父部门ID
|
* 父部门ID
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门名称
|
* 部门名称
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public class SysDictDataBo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 创建部门
|
* 创建部门
|
||||||
*/
|
*/
|
||||||
private Long createDept;
|
private String createDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,12 @@ public class SysPostBo extends BaseEntity {
|
||||||
* 部门id(单部门)
|
* 部门id(单部门)
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "部门id不能为空")
|
@NotNull(message = "部门id不能为空")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属部门id(部门树)
|
* 归属部门id(部门树)
|
||||||
*/
|
*/
|
||||||
private Long belongDeptId;
|
private String belongDeptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位编码
|
* 岗位编码
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class SysRoleBo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 部门组(数据权限)
|
* 部门组(数据权限)
|
||||||
*/
|
*/
|
||||||
private Long[] deptIds;
|
private String[] deptIds;
|
||||||
|
|
||||||
public SysRoleBo(Long roleId) {
|
public SysRoleBo(Long roleId) {
|
||||||
this.roleId = roleId;
|
this.roleId = roleId;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public class SysUserBo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,6 @@ public class DeptTreeSelectVo {
|
||||||
/**
|
/**
|
||||||
* 下拉树结构列表
|
* 下拉树结构列表
|
||||||
*/
|
*/
|
||||||
private List<Tree<Long>> depts;
|
private List<Tree<String>> depts;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,12 @@ public class SysDeptVo implements Serializable {
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "部门id")
|
@ExcelProperty(value = "部门id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父部门id
|
* 父部门id
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父部门名称
|
* 父部门名称
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public class SysPostVo implements Serializable {
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "部门id")
|
@ExcelProperty(value = "部门id")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位编码
|
* 岗位编码
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class SysUserImportVo implements Serializable {
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "部门编号")
|
@ExcelProperty(value = "部门编号")
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class SysUserVo implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 部门ID
|
* 部门ID
|
||||||
*/
|
*/
|
||||||
private Long deptId;
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账号
|
* 用户账号
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
|
||||||
@DataPermission({
|
@DataPermission({
|
||||||
@DataColumn(key = "deptName", value = "dept_id")
|
@DataColumn(key = "deptName", value = "dept_id")
|
||||||
})
|
})
|
||||||
long countDeptById(Long deptId);
|
long countDeptById(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据父部门ID查询其所有子部门的列表
|
* 根据父部门ID查询其所有子部门的列表
|
||||||
|
|
@ -62,7 +62,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
|
||||||
* @param parentId 父部门ID
|
* @param parentId 父部门ID
|
||||||
* @return 包含子部门的列表
|
* @return 包含子部门的列表
|
||||||
*/
|
*/
|
||||||
default List<SysDept> selectListByParentId(Long parentId) {
|
default List<SysDept> selectListByParentId(String parentId) {
|
||||||
return this.selectList(new LambdaQueryWrapper<SysDept>()
|
return this.selectList(new LambdaQueryWrapper<SysDept>()
|
||||||
.select(SysDept::getDeptId)
|
.select(SysDept::getDeptId)
|
||||||
.apply(DataBaseHelper.findInSet(parentId, "ancestors")));
|
.apply(DataBaseHelper.findInSet(parentId, "ancestors")));
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,6 @@ public interface ISysDataScopeService {
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
* @return 部门id组
|
* @return 部门id组
|
||||||
*/
|
*/
|
||||||
String getDeptAndChild(Long deptId);
|
String getDeptAndChild(String deptId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public interface ISysDeptService {
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 部门树信息集合
|
* @return 部门树信息集合
|
||||||
*/
|
*/
|
||||||
List<Tree<Long>> selectDeptTreeList(SysDeptBo dept);
|
List<Tree<String>> selectDeptTreeList(SysDeptBo dept);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建前端所需要下拉树结构
|
* 构建前端所需要下拉树结构
|
||||||
|
|
@ -35,7 +35,7 @@ public interface ISysDeptService {
|
||||||
* @param depts 部门列表
|
* @param depts 部门列表
|
||||||
* @return 下拉树结构列表
|
* @return 下拉树结构列表
|
||||||
*/
|
*/
|
||||||
List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts);
|
List<Tree<String>> buildDeptTreeSelect(List<SysDeptVo> depts);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询部门树信息
|
* 根据角色ID查询部门树信息
|
||||||
|
|
@ -51,7 +51,7 @@ public interface ISysDeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 部门信息
|
* @return 部门信息
|
||||||
*/
|
*/
|
||||||
SysDeptVo selectDeptById(Long deptId);
|
SysDeptVo selectDeptById(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过部门ID串查询部门
|
* 通过部门ID串查询部门
|
||||||
|
|
@ -59,7 +59,7 @@ public interface ISysDeptService {
|
||||||
* @param deptIds 部门id串
|
* @param deptIds 部门id串
|
||||||
* @return 部门列表信息
|
* @return 部门列表信息
|
||||||
*/
|
*/
|
||||||
List<SysDeptVo> selectDeptByIds(List<Long> deptIds);
|
List<SysDeptVo> selectDeptByIds(List<String> deptIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询所有子部门数(正常状态)
|
* 根据ID查询所有子部门数(正常状态)
|
||||||
|
|
@ -67,11 +67,11 @@ public interface ISysDeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 子部门数
|
* @return 子部门数
|
||||||
*/
|
*/
|
||||||
long selectNormalChildrenDeptById(Long deptId);
|
long selectNormalChildrenDeptById(String deptId);
|
||||||
|
|
||||||
List<SysDept> selectNormalChildrenDeptListById(Long deptId);
|
List<SysDept> selectNormalChildrenDeptListById(String deptId);
|
||||||
|
|
||||||
List<Long> selectNormalChildrenDeptIdById(Long deptId);
|
List<String> selectNormalChildrenDeptIdById(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否存在部门子节点
|
* 是否存在部门子节点
|
||||||
|
|
@ -79,7 +79,7 @@ public interface ISysDeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
boolean hasChildByDeptId(Long deptId);
|
boolean hasChildByDeptId(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门是否存在用户
|
* 查询部门是否存在用户
|
||||||
|
|
@ -87,7 +87,7 @@ public interface ISysDeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果 true 存在 false 不存在
|
* @return 结果 true 存在 false 不存在
|
||||||
*/
|
*/
|
||||||
boolean checkDeptExistUser(Long deptId);
|
boolean checkDeptExistUser(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验部门名称是否唯一
|
* 校验部门名称是否唯一
|
||||||
|
|
@ -102,7 +102,7 @@ public interface ISysDeptService {
|
||||||
*
|
*
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
*/
|
*/
|
||||||
void checkDeptDataScope(Long deptId);
|
void checkDeptDataScope(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存部门信息
|
* 新增保存部门信息
|
||||||
|
|
@ -126,5 +126,5 @@ public interface ISysDeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteDeptById(Long deptId);
|
int deleteDeptById(String deptId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ public interface ISysPostService {
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
long countPostByDeptId(Long deptId);
|
long countPostByDeptId(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除岗位信息
|
* 删除岗位信息
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public interface ISysUserService {
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
* @return 用户列表信息
|
* @return 用户列表信息
|
||||||
*/
|
*/
|
||||||
List<SysUserVo> selectUserByIds(List<Long> userIds, Long deptId);
|
List<SysUserVo> selectUserByIds(List<Long> userIds, String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询用户所属角色组
|
* 根据用户ID查询用户所属角色组
|
||||||
|
|
@ -218,5 +218,5 @@ public interface ISysUserService {
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
List<SysUserVo> selectUserListByDept(Long deptId);
|
List<SysUserVo> selectUserListByDept(String deptId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,12 +62,12 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService {
|
||||||
*/
|
*/
|
||||||
@Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId", condition = "#deptId != null")
|
@Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId", condition = "#deptId != null")
|
||||||
@Override
|
@Override
|
||||||
public String getDeptAndChild(Long deptId) {
|
public String getDeptAndChild(String deptId) {
|
||||||
if (ObjectUtil.isNull(deptId)) {
|
if (ObjectUtil.isNull(deptId)) {
|
||||||
return "-1";
|
return "-1";
|
||||||
}
|
}
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(deptId);
|
List<SysDept> deptList = deptMapper.selectListByParentId(deptId);
|
||||||
List<Long> ids = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> ids = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
ids.add(deptId);
|
ids.add(deptId);
|
||||||
if (CollUtil.isNotEmpty(ids)) {
|
if (CollUtil.isNotEmpty(ids)) {
|
||||||
return StreamUtils.join(ids, Convert::toStr);
|
return StreamUtils.join(ids, Convert::toStr);
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 部门树信息集合
|
* @return 部门树信息集合
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<Long>> selectDeptTreeList(SysDeptBo bo) {
|
public List<Tree<String>> selectDeptTreeList(SysDeptBo bo) {
|
||||||
LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo);
|
||||||
List<SysDeptVo> depts = baseMapper.selectDeptList(lqw);
|
List<SysDeptVo> depts = baseMapper.selectDeptList(lqw);
|
||||||
return buildDeptTreeSelect(depts);
|
return buildDeptTreeSelect(depts);
|
||||||
|
|
@ -97,23 +97,23 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 下拉树结构列表
|
* @return 下拉树结构列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts) {
|
public List<Tree<String>> buildDeptTreeSelect(List<SysDeptVo> depts) {
|
||||||
if (CollUtil.isEmpty(depts)) {
|
if (CollUtil.isEmpty(depts)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
// 获取当前列表中每一个节点的parentId,然后在列表中查找是否有id与其parentId对应,若无对应,则表明此时节点列表中,该节点在当前列表中属于顶级节点
|
// 获取当前列表中每一个节点的parentId,然后在列表中查找是否有id与其parentId对应,若无对应,则表明此时节点列表中,该节点在当前列表中属于顶级节点
|
||||||
List<Tree<Long>> treeList = CollUtil.newArrayList();
|
List<Tree<String>> treeList = CollUtil.newArrayList();
|
||||||
for (SysDeptVo d : depts) {
|
for (SysDeptVo d : depts) {
|
||||||
Long parentId = d.getParentId();
|
String parentId = d.getParentId();
|
||||||
SysDeptVo sysDeptVo = StreamUtils.findFirst(depts, it -> it.getDeptId().longValue() == parentId);
|
SysDeptVo sysDeptVo = StreamUtils.findFirst(depts, it -> it.getDeptId().equals(parentId));
|
||||||
if (ObjectUtil.isNull(sysDeptVo)) {
|
if (ObjectUtil.isNull(sysDeptVo)) {
|
||||||
List<Tree<Long>> trees = TreeBuildUtils.build(depts, parentId, (dept, tree) ->
|
List<Tree<String>> trees = TreeBuildUtils.build(depts, parentId, (dept, tree) ->
|
||||||
tree.setId(dept.getDeptId())
|
tree.setId(dept.getDeptId())
|
||||||
.setParentId(dept.getParentId())
|
.setParentId(dept.getParentId())
|
||||||
.setName(dept.getDeptName())
|
.setName(dept.getDeptName())
|
||||||
.setWeight(dept.getOrderNum())
|
.setWeight(dept.getOrderNum())
|
||||||
.putExtra("disabled", SystemConstants.DISABLE.equals(dept.getStatus())));
|
.putExtra("disabled", SystemConstants.DISABLE.equals(dept.getStatus())));
|
||||||
Tree<Long> tree = StreamUtils.findFirst(trees, it -> it.getId().longValue() == d.getDeptId());
|
Tree<String> tree = StreamUtils.findFirst(trees, it -> it.getId().equals(d.getDeptId()));
|
||||||
treeList.add(tree);
|
treeList.add(tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +140,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
*/
|
*/
|
||||||
@Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId")
|
@Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId")
|
||||||
@Override
|
@Override
|
||||||
public SysDeptVo selectDeptById(Long deptId) {
|
public SysDeptVo selectDeptById(String deptId) {
|
||||||
SysDeptVo dept = baseMapper.selectVoById(deptId);
|
SysDeptVo dept = baseMapper.selectVoById(deptId);
|
||||||
if (ObjectUtil.isNull(dept)) {
|
if (ObjectUtil.isNull(dept)) {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -152,7 +152,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDeptVo> selectDeptByIds(List<Long> deptIds) {
|
public List<SysDeptVo> selectDeptByIds(List<String> deptIds) {
|
||||||
return baseMapper.selectDeptList(new LambdaQueryWrapper<SysDept>()
|
return baseMapper.selectDeptList(new LambdaQueryWrapper<SysDept>()
|
||||||
.select(SysDept::getDeptId, SysDept::getDeptName, SysDept::getLeader)
|
.select(SysDept::getDeptId, SysDept::getDeptName, SysDept::getLeader)
|
||||||
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
||||||
|
|
@ -168,7 +168,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
@Override
|
@Override
|
||||||
public String selectDeptNameByIds(String deptIds) {
|
public String selectDeptNameByIds(String deptIds) {
|
||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
for (Long id : StringUtils.splitTo(deptIds, Convert::toLong)) {
|
for (String id : StringUtils.splitTo(deptIds, Object::toString)) {
|
||||||
SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(id);
|
SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(id);
|
||||||
if (ObjectUtil.isNotNull(vo)) {
|
if (ObjectUtil.isNotNull(vo)) {
|
||||||
list.add(vo.getDeptName());
|
list.add(vo.getDeptName());
|
||||||
|
|
@ -184,7 +184,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 返回该部门的负责人ID
|
* @return 返回该部门的负责人ID
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Long selectDeptLeaderById(Long deptId) {
|
public Long selectDeptLeaderById(String deptId) {
|
||||||
SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(deptId);
|
SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(deptId);
|
||||||
return vo.getLeader();
|
return vo.getLeader();
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +209,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 子部门数
|
* @return 子部门数
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public long selectNormalChildrenDeptById(Long deptId) {
|
public long selectNormalChildrenDeptById(String deptId) {
|
||||||
return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>()
|
return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>()
|
||||||
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
||||||
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
||||||
|
|
@ -221,7 +221,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 子部门
|
* @return 子部门
|
||||||
*/
|
*/
|
||||||
public List<SysDept> selectNormalChildrenDeptListById(Long deptId) {
|
public List<SysDept> selectNormalChildrenDeptListById(String deptId) {
|
||||||
return baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
return baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
||||||
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
||||||
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
||||||
|
|
@ -233,7 +233,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 子部门id
|
* @return 子部门id
|
||||||
*/
|
*/
|
||||||
public List<Long> selectNormalChildrenDeptIdById(Long deptId) {
|
public List<String> selectNormalChildrenDeptIdById(String deptId) {
|
||||||
List<SysDept> ancestors = baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
List<SysDept> ancestors = baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
||||||
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
.eq(SysDept::getStatus, SystemConstants.NORMAL)
|
||||||
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
||||||
|
|
@ -248,7 +248,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean hasChildByDeptId(Long deptId) {
|
public boolean hasChildByDeptId(String deptId) {
|
||||||
return baseMapper.exists(new LambdaQueryWrapper<SysDept>()
|
return baseMapper.exists(new LambdaQueryWrapper<SysDept>()
|
||||||
.eq(SysDept::getParentId, deptId));
|
.eq(SysDept::getParentId, deptId));
|
||||||
}
|
}
|
||||||
|
|
@ -260,7 +260,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @return 结果 true 存在 false 不存在
|
* @return 结果 true 存在 false 不存在
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean checkDeptExistUser(Long deptId) {
|
public boolean checkDeptExistUser(String deptId) {
|
||||||
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
|
||||||
.eq(SysUser::getDeptId, deptId));
|
.eq(SysUser::getDeptId, deptId));
|
||||||
}
|
}
|
||||||
|
|
@ -286,7 +286,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @param deptId 部门id
|
* @param deptId 部门id
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void checkDeptDataScope(Long deptId) {
|
public void checkDeptDataScope(String deptId) {
|
||||||
if (ObjectUtil.isNull(deptId)) {
|
if (ObjectUtil.isNull(deptId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -377,7 +377,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
* @param newAncestors 新的父ID集合
|
* @param newAncestors 新的父ID集合
|
||||||
* @param oldAncestors 旧的父ID集合
|
* @param oldAncestors 旧的父ID集合
|
||||||
*/
|
*/
|
||||||
private void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) {
|
private void updateDeptChildren(String deptId, String newAncestors, String oldAncestors) {
|
||||||
List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
|
||||||
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
|
||||||
List<SysDept> list = new ArrayList<>();
|
List<SysDept> list = new ArrayList<>();
|
||||||
|
|
@ -405,7 +405,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||||
@CacheEvict(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId")
|
@CacheEvict(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId")
|
||||||
})
|
})
|
||||||
@Override
|
@Override
|
||||||
public int deleteDeptById(Long deptId) {
|
public int deleteDeptById(String deptId) {
|
||||||
return baseMapper.deleteById(deptId);
|
return baseMapper.deleteById(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
|
||||||
//部门树搜索
|
//部门树搜索
|
||||||
wrapper.and(x -> {
|
wrapper.and(x -> {
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(bo.getBelongDeptId());
|
List<SysDept> deptList = deptMapper.selectListByParentId(bo.getBelongDeptId());
|
||||||
List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
deptIds.add(bo.getBelongDeptId());
|
deptIds.add(bo.getBelongDeptId());
|
||||||
x.in(SysPost::getDeptId, deptIds);
|
x.in(SysPost::getDeptId, deptIds);
|
||||||
});
|
});
|
||||||
|
|
@ -190,7 +190,7 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public long countPostByDeptId(Long deptId) {
|
public long countPostByDeptId(String deptId) {
|
||||||
return baseMapper.selectCount(new LambdaQueryWrapper<SysPost>().eq(SysPost::getDeptId, deptId));
|
return baseMapper.selectCount(new LambdaQueryWrapper<SysPost>().eq(SysPost::getDeptId, deptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,7 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
|
||||||
int rows = 1;
|
int rows = 1;
|
||||||
// 新增角色与部门(数据权限)管理
|
// 新增角色与部门(数据权限)管理
|
||||||
List<SysRoleDept> list = new ArrayList<>();
|
List<SysRoleDept> list = new ArrayList<>();
|
||||||
for (Long deptId : role.getDeptIds()) {
|
for (String deptId : role.getDeptIds()) {
|
||||||
SysRoleDept rd = new SysRoleDept();
|
SysRoleDept rd = new SysRoleDept();
|
||||||
rd.setRoleId(role.getRoleId());
|
rd.setRoleId(role.getRoleId());
|
||||||
rd.setDeptId(deptId);
|
rd.setDeptId(deptId);
|
||||||
|
|
|
||||||
|
|
@ -80,17 +80,17 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
|
||||||
.between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
|
.between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
|
||||||
SysPost::getCreateTime, taskQuery.getBeginTime(), taskQuery.getEndTime());
|
SysPost::getCreateTime, taskQuery.getBeginTime(), taskQuery.getEndTime());
|
||||||
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
||||||
Long belongDeptId = Long.valueOf(taskQuery.getGroupId());
|
String belongDeptId = (taskQuery.getGroupId());
|
||||||
wrapper.and(x -> {
|
wrapper.and(x -> {
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(belongDeptId);
|
List<SysDept> deptList = deptMapper.selectListByParentId(belongDeptId);
|
||||||
List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
deptIds.add(belongDeptId);
|
deptIds.add(belongDeptId);
|
||||||
x.in(SysPost::getDeptId, deptIds);
|
x.in(SysPost::getDeptId, deptIds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Page<SysPostVo> page = postMapper.selectPagePostList(pageQuery.build(), wrapper);
|
Page<SysPostVo> page = postMapper.selectPagePostList(pageQuery.build(), wrapper);
|
||||||
// 使用封装的字段映射方法进行转换
|
// 使用封装的字段映射方法进行转换
|
||||||
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
|
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList2(page.getRecords(),
|
||||||
SysPostVo::getPostId, SysPostVo::getPostCategory, SysPostVo::getPostName, SysPostVo::getDeptId, SysPostVo::getCreateTime);
|
SysPostVo::getPostId, SysPostVo::getPostCategory, SysPostVo::getPostName, SysPostVo::getDeptId, SysPostVo::getCreateTime);
|
||||||
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
||||||
}
|
}
|
||||||
|
|
@ -117,16 +117,16 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
|
||||||
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
||||||
//部门树搜索
|
//部门树搜索
|
||||||
wrapper.and(x -> {
|
wrapper.and(x -> {
|
||||||
Long parentId = Long.valueOf(taskQuery.getGroupId());
|
String parentId = (taskQuery.getGroupId());
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
|
List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
|
||||||
List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
deptIds.add(parentId);
|
deptIds.add(parentId);
|
||||||
x.in(SysDept::getDeptId, deptIds);
|
x.in(SysDept::getDeptId, deptIds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Page<SysDeptVo> page = deptMapper.selectPageDeptList(pageQuery.build(), wrapper);
|
Page<SysDeptVo> page = deptMapper.selectPageDeptList(pageQuery.build(), wrapper);
|
||||||
// 使用封装的字段映射方法进行转换
|
// 使用封装的字段映射方法进行转换
|
||||||
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
|
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList3(page.getRecords(),
|
||||||
SysDeptVo::getDeptId, SysDeptVo::getDeptCategory, SysDeptVo::getDeptName, SysDeptVo::getParentId, SysDeptVo::getCreateTime);
|
SysDeptVo::getDeptId, SysDeptVo::getDeptCategory, SysDeptVo::getDeptName, SysDeptVo::getParentId, SysDeptVo::getCreateTime);
|
||||||
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
||||||
}
|
}
|
||||||
|
|
@ -151,16 +151,16 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
|
||||||
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
|
||||||
//部门树搜索
|
//部门树搜索
|
||||||
wrapper.and(x -> {
|
wrapper.and(x -> {
|
||||||
Long parentId = Long.valueOf(taskQuery.getGroupId());
|
String parentId = (taskQuery.getGroupId());
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
|
List<SysDept> deptList = deptMapper.selectListByParentId(parentId);
|
||||||
List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
deptIds.add(parentId);
|
deptIds.add(parentId);
|
||||||
x.in("u.dept_id", deptIds);
|
x.in("u.dept_id", deptIds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Page<SysUserVo> page = userMapper.selectPageUserList(pageQuery.build(), wrapper);
|
Page<SysUserVo> page = userMapper.selectPageUserList(pageQuery.build(), wrapper);
|
||||||
// 使用封装的字段映射方法进行转换
|
// 使用封装的字段映射方法进行转换
|
||||||
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList(page.getRecords(),
|
List<TaskAssigneeDTO.TaskHandler> handlers = TaskAssigneeDTO.convertToHandlerList2(page.getRecords(),
|
||||||
SysUserVo::getUserId, SysUserVo::getUserName, SysUserVo::getNickName, SysUserVo::getDeptId, SysUserVo::getCreateTime);
|
SysUserVo::getUserId, SysUserVo::getUserName, SysUserVo::getNickName, SysUserVo::getDeptId, SysUserVo::getCreateTime);
|
||||||
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
return new TaskAssigneeDTO(page.getTotal(), handlers);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,10 +140,10 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
||||||
SysDept dept = new SysDept();
|
SysDept dept = new SysDept();
|
||||||
dept.setTenantId(tenantId);
|
dept.setTenantId(tenantId);
|
||||||
dept.setDeptName(bo.getCompanyName());
|
dept.setDeptName(bo.getCompanyName());
|
||||||
dept.setParentId(Constants.TOP_PARENT_ID);
|
dept.setParentId(Constants.TOP_PARENT_ID.toString());
|
||||||
dept.setAncestors(Constants.TOP_PARENT_ID.toString());
|
dept.setAncestors(Constants.TOP_PARENT_ID.toString());
|
||||||
deptMapper.insert(dept);
|
deptMapper.insert(dept);
|
||||||
Long deptId = dept.getDeptId();
|
String deptId = dept.getDeptId();
|
||||||
|
|
||||||
// 角色和部门关联表
|
// 角色和部门关联表
|
||||||
SysRoleDept roleDept = new SysRoleDept();
|
SysRoleDept roleDept = new SysRoleDept();
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
"u.create_time", params.get("beginTime"), params.get("endTime"))
|
"u.create_time", params.get("beginTime"), params.get("endTime"))
|
||||||
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
|
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
|
||||||
List<SysDept> deptList = deptMapper.selectListByParentId(user.getDeptId());
|
List<SysDept> deptList = deptMapper.selectListByParentId(user.getDeptId());
|
||||||
List<Long> ids = StreamUtils.toList(deptList, SysDept::getDeptId);
|
List<String> ids = StreamUtils.toList(deptList, SysDept::getDeptId);
|
||||||
ids.add(user.getDeptId());
|
ids.add(user.getDeptId());
|
||||||
w.in("u.dept_id", ids);
|
w.in("u.dept_id", ids);
|
||||||
}).orderByAsc("u.user_id");
|
}).orderByAsc("u.user_id");
|
||||||
|
|
@ -181,7 +181,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
* @return 用户列表信息
|
* @return 用户列表信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserVo> selectUserByIds(List<Long> userIds, Long deptId) {
|
public List<SysUserVo> selectUserByIds(List<Long> userIds, String deptId) {
|
||||||
return baseMapper.selectUserList(new LambdaQueryWrapper<SysUser>()
|
return baseMapper.selectUserList(new LambdaQueryWrapper<SysUser>()
|
||||||
.select(SysUser::getUserId, SysUser::getUserName, SysUser::getNickName)
|
.select(SysUser::getUserId, SysUser::getUserName, SysUser::getNickName)
|
||||||
.eq(SysUser::getStatus, SystemConstants.NORMAL)
|
.eq(SysUser::getStatus, SystemConstants.NORMAL)
|
||||||
|
|
@ -544,7 +544,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserVo> selectUserListByDept(Long deptId) {
|
public List<SysUserVo> selectUserListByDept(String deptId) {
|
||||||
LambdaQueryWrapper<SysUser> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SysUser> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(SysUser::getDeptId, deptId);
|
lqw.eq(SysUser::getDeptId, deptId);
|
||||||
lqw.orderByAsc(SysUser::getUserId);
|
lqw.orderByAsc(SysUser::getUserId);
|
||||||
|
|
@ -686,7 +686,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
* @return 用户
|
* @return 用户
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<UserDTO> selectUsersByDeptIds(List<Long> deptIds) {
|
public List<UserDTO> selectUsersByDeptIds(List<String> deptIds) {
|
||||||
if (CollUtil.isEmpty(deptIds)) {
|
if (CollUtil.isEmpty(deptIds)) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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="org.dromara.biz.mapper.BizCategoryMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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="org.dromara.biz.mapper.BizReportFileMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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="org.dromara.biz.mapper.BizReportInfoMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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="org.dromara.biz.mapper.BizReportReceiverMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?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="org.dromara.biz.mapper.BizReportReplyMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package org.dromara.workflow.service.impl;
|
package org.dromara.workflow.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -135,9 +136,9 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
|
||||||
for (String str : storageId.split(StrUtil.COMMA)) {
|
for (String str : storageId.split(StrUtil.COMMA)) {
|
||||||
String[] parts = str.split(StrUtil.COLON, 2);
|
String[] parts = str.split(StrUtil.COLON, 2);
|
||||||
if (parts.length < 2) {
|
if (parts.length < 2) {
|
||||||
list.addAll(getUsersByType(TaskAssigneeEnum.USER, List.of(Long.valueOf(parts[0]))));
|
list.addAll(getUsersByType(TaskAssigneeEnum.USER, List.of((parts[0]))));
|
||||||
} else {
|
} else {
|
||||||
list.addAll(getUsersByType(TaskAssigneeEnum.fromCode(parts[0] + StrUtil.COLON), List.of(Long.valueOf(parts[1]))));
|
list.addAll(getUsersByType(TaskAssigneeEnum.fromCode(parts[0] + StrUtil.COLON), List.of((parts[1]))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
@ -153,13 +154,21 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
|
||||||
* 如果类型为部门(DEPT),则通过部门ID列表查询;
|
* 如果类型为部门(DEPT),则通过部门ID列表查询;
|
||||||
* 如果类型为岗位(POST)或无法识别的类型,则返回空列表
|
* 如果类型为岗位(POST)或无法识别的类型,则返回空列表
|
||||||
*/
|
*/
|
||||||
private List<UserDTO> getUsersByType(TaskAssigneeEnum type, List<Long> ids) {
|
private List<UserDTO> getUsersByType(TaskAssigneeEnum type, List<String> ids) {
|
||||||
return switch (type) {
|
return switch (type) {
|
||||||
case USER -> userService.selectListByIds(ids);
|
case USER -> userService.selectListByIds(convertIds(ids));
|
||||||
case ROLE -> userService.selectUsersByRoleIds(ids);
|
case ROLE -> userService.selectUsersByRoleIds(convertIds(ids));
|
||||||
case DEPT -> userService.selectUsersByDeptIds(ids);
|
case DEPT -> userService.selectUsersByDeptIds(ids);
|
||||||
case POST -> userService.selectUsersByPostIds(ids);
|
case POST -> userService.selectUsersByPostIds(convertIds(ids));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Long> convertIds(List<String> ids){
|
||||||
|
List<Long> lids = new ArrayList<>();
|
||||||
|
for (String id :
|
||||||
|
ids) {
|
||||||
|
lids.add(Convert.toLong(id));
|
||||||
|
}
|
||||||
|
return lids;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue