业务功能代码

master
YIN 2025-11-24 17:35:57 +08:00
parent 9b0783822c
commit 869cd744db
96 changed files with 4054 additions and 115 deletions

View File

@ -23,6 +23,23 @@
<artifactId>mysql-connector-j</artifactId>
</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>
<!-- &lt;!&ndash; mp支持的数据库均支持 只需要增加对应的jdbc依赖即可 &ndash;&gt;-->
<!-- &lt;!&ndash; Oracle &ndash;&gt;-->
<!-- <dependency>-->

View File

@ -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: excelpdf
* @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: pptpdf
* @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: docpdf
* @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();
}
}
}

View File

@ -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();
}
}

View File

@ -49,9 +49,9 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# 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
password: 1234
password: root
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true

View File

@ -52,7 +52,7 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# 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
password: root
# # 从库数据源

View File

@ -194,7 +194,7 @@ springdoc:
# 标题
title: '标题:${ruoyi.name}多租户管理系统_接口文档'
# 描述
description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
description: '.'
# 版本
version: '版本号: ${ruoyi.version}'
# 作者信息
@ -225,10 +225,11 @@ springdoc:
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
enabled: false
# 排除链接(多个用逗号分隔)
excludeUrls:
- /system/notice
- /biz
- /warm-flow/save-xml
# 全局线程池相关配置

View File

@ -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>

View File

@ -22,12 +22,12 @@ public class DeptDTO implements Serializable {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
* ID
*/
private Long parentId;
private String parentId;
/**
*

View File

@ -26,7 +26,7 @@ public class PostDTO implements Serializable {
/**
* id
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -66,6 +66,62 @@ public class TaskAssigneeDTO implements Serializable {
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> 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
@NoArgsConstructor

View File

@ -28,7 +28,7 @@ public class UserDTO implements Serializable {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -35,7 +35,7 @@ public class LoginUser implements Serializable {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -25,7 +25,7 @@ public interface DeptService {
* @param deptId ID
* @return ID
*/
Long selectDeptLeaderById(Long deptId);
Long selectDeptLeaderById(String deptId);
/**
*

View File

@ -81,7 +81,7 @@ public interface UserService {
* @param deptIds ids
* @return
*/
List<UserDTO> selectUsersByDeptIds(List<Long> deptIds);
List<UserDTO> selectUsersByDeptIds(List<String> deptIds);
/**
* ID

View File

@ -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 012
* @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;
}
}

View File

@ -34,7 +34,7 @@ public class BaseEntity implements Serializable {
*
*/
@TableField(fill = FieldFill.INSERT,exist = false)
private Long createDept;
private String createDept;
/**
*

View File

@ -113,8 +113,8 @@ public class LoginHelper {
/**
* ID
*/
public static Long getDeptId() {
return Convert.toLong(getExtra(DEPT_KEY));
public static String getDeptId() {
return getExtra(DEPT_KEY).toString();
}
/**

View File

@ -2,7 +2,7 @@ spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
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
password: root
hikari:

View File

@ -30,7 +30,7 @@ public class TestDemo extends TenantEntity {
/**
* id
*/
private Long deptId;
private String deptId;
/**
* id

View File

@ -38,7 +38,7 @@ public class TestTree extends TenantEntity {
/**
* id
*/
private Long deptId;
private String deptId;
/**
* id

View File

@ -33,7 +33,7 @@ public class TestDemoBo extends BaseEntity {
* id
*/
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
private Long deptId;
private String deptId;
/**
* id

View File

@ -20,7 +20,7 @@ public class TestDemoImportVo {
*/
@NotNull(message = "部门id不能为空")
@ExcelProperty(value = "部门id")
private Long deptId;
private String deptId;
/**
* id

View File

@ -37,7 +37,7 @@ public class TestTreeBo extends BaseEntity {
* id
*/
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
private Long deptId;
private String deptId;
/**
* id

View File

@ -40,7 +40,7 @@ public class TestDemoVo implements Serializable {
*/
@ExcelRequired
@ExcelProperty(value = "部门id")
private Long deptId;
private String deptId;
/**
* id

View File

@ -40,7 +40,7 @@ public class TestTreeVo implements Serializable {
* id
*/
@ExcelProperty(value = "部门id")
private Long deptId;
private String deptId;
/**
* id

View File

@ -97,8 +97,8 @@ public class DeptExtractionJobExecutor {
// 2. 将组织机构名称格式统一(有的为合肥市公安局,有的为安徽省宿州市公安局)
if (deptName.startsWith("安徽省") && !deptId.equals("340000000000")){deptName = deptName.substring(3);}
// 将抽取到的组织机构信息放入集合中
sysDept.setDeptId(Long.valueOf(deptId));
sysDept.setParentId(Long.valueOf(parentId));
sysDept.setDeptId((deptId));
sysDept.setParentId((parentId));
sysDept.setAncestors(newAncestors);
sysDept.setDeptName(deptName);
sysDept.setShortName(shortName);

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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));
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -49,7 +49,7 @@ public class SysDeptController extends BaseController {
*/
@SaCheckPermission("system:dept:list")
@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());
depts.removeIf(d -> d.getDeptId().equals(deptId)
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));
@ -63,7 +63,7 @@ public class SysDeptController extends BaseController {
*/
@SaCheckPermission("system:dept:query")
@GetMapping(value = "/{deptId}")
public R<SysDeptVo> getInfo(@PathVariable Long deptId) {
public R<SysDeptVo> getInfo(@PathVariable String deptId) {
deptService.checkDeptDataScope(deptId);
return R.ok(deptService.selectDeptById(deptId));
}
@ -88,7 +88,7 @@ public class SysDeptController extends BaseController {
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
@PutMapping
public R<Void> edit(@Validated @RequestBody SysDeptBo dept) {
Long deptId = dept.getDeptId();
String deptId = dept.getDeptId();
deptService.checkDeptDataScope(deptId);
if (!deptService.checkDeptNameUnique(dept)) {
return R.fail("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
@ -112,7 +112,7 @@ public class SysDeptController extends BaseController {
@SaCheckPermission("system:dept:remove")
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptId}")
public R<Void> remove(@PathVariable Long deptId) {
public R<Void> remove(@PathVariable String deptId) {
if (deptService.hasChildByDeptId(deptId)) {
return R.warn("存在下级部门,不允许删除");
}
@ -133,7 +133,7 @@ public class SysDeptController extends BaseController {
*/
@SaCheckPermission("system:dept:query")
@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)));
}

View File

@ -118,7 +118,7 @@ public class SysPostController extends BaseController {
*/
@SaCheckPermission("system:post:query")
@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<>();
if (ObjectUtil.isNotNull(deptId)) {
SysPostBo post = new SysPostBo();

View File

@ -134,7 +134,7 @@ public class SysUserController extends BaseController {
SysUserVo sysUser = userService.selectUserById(userId);
userInfoVo.setUser(sysUser);
userInfoVo.setRoleIds(roleService.selectRoleListByUserId(userId));
Long deptId = sysUser.getDeptId();
String deptId = sysUser.getDeptId();
if (ObjectUtil.isNotNull(deptId)) {
SysPostBo postBo = new SysPostBo();
postBo.setDeptId(deptId);
@ -217,7 +217,7 @@ public class SysUserController extends BaseController {
@SaCheckPermission("system:user:query")
@GetMapping("/optionselect")
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));
}
@ -284,7 +284,7 @@ public class SysUserController extends BaseController {
*/
@SaCheckPermission("system:user:list")
@GetMapping("/deptTree")
public R<List<Tree<Long>>> deptTree(SysDeptBo dept) {
public R<List<Tree<String>>> deptTree(SysDeptBo dept) {
return R.ok(deptService.selectDeptTreeList(dept));
}
@ -293,7 +293,7 @@ public class SysUserController extends BaseController {
*/
@SaCheckPermission("system:user:list")
@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));
}

View File

@ -27,12 +27,12 @@ public class SysDept extends TenantEntity {
* ID
*/
@TableId(value = "dept_id")
private Long deptId;
private String deptId;
/**
* ID
*/
private Long parentId;
private String parentId;
/**
*

View File

@ -26,7 +26,7 @@ public class SysPost extends TenantEntity {
/**
* id
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -24,6 +24,6 @@ public class SysRoleDept {
/**
* ID
*/
private Long deptId;
private String deptId;
}

View File

@ -30,7 +30,7 @@ public class SysUser extends TenantEntity {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -25,12 +25,12 @@ public class SysDeptBo extends BaseEntity {
/**
* id
*/
private Long deptId;
private String deptId;
/**
* ID
*/
private Long parentId;
private String parentId;
/**
*

View File

@ -70,7 +70,7 @@ public class SysDictDataBo extends BaseEntity {
/**
*
*/
private Long createDept;
private String createDept;
/**
*

View File

@ -29,12 +29,12 @@ public class SysPostBo extends BaseEntity {
* id
*/
@NotNull(message = "部门id不能为空")
private Long deptId;
private String deptId;
/**
* id
*/
private Long belongDeptId;
private String belongDeptId;
/**
*

View File

@ -81,7 +81,7 @@ public class SysRoleBo extends BaseEntity {
/**
*
*/
private Long[] deptIds;
private String[] deptIds;
public SysRoleBo(Long roleId) {
this.roleId = roleId;

View File

@ -32,7 +32,7 @@ public class SysUserBo extends BaseEntity {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -21,6 +21,6 @@ public class DeptTreeSelectVo {
/**
*
*/
private List<Tree<Long>> depts;
private List<Tree<String>> depts;
}

View File

@ -29,12 +29,12 @@ public class SysDeptVo implements Serializable {
* id
*/
@ExcelProperty(value = "部门id")
private Long deptId;
private String deptId;
/**
* id
*/
private Long parentId;
private String parentId;
/**
*

View File

@ -37,7 +37,7 @@ public class SysPostVo implements Serializable {
* id
*/
@ExcelProperty(value = "部门id")
private Long deptId;
private String deptId;
/**
*

View File

@ -33,7 +33,7 @@ public class SysUserImportVo implements Serializable {
* ID
*/
@ExcelProperty(value = "部门编号")
private Long deptId;
private String deptId;
/**
*

View File

@ -41,7 +41,7 @@ public class SysUserVo implements Serializable {
/**
* ID
*/
private Long deptId;
private String deptId;
/**
*

View File

@ -54,7 +54,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
@DataPermission({
@DataColumn(key = "deptName", value = "dept_id")
})
long countDeptById(Long deptId);
long countDeptById(String deptId);
/**
* ID
@ -62,7 +62,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
* @param parentId ID
* @return
*/
default List<SysDept> selectListByParentId(Long parentId) {
default List<SysDept> selectListByParentId(String parentId) {
return this.selectList(new LambdaQueryWrapper<SysDept>()
.select(SysDept::getDeptId)
.apply(DataBaseHelper.findInSet(parentId, "ancestors")));

View File

@ -21,6 +21,6 @@ public interface ISysDataScopeService {
* @param deptId id
* @return id
*/
String getDeptAndChild(Long deptId);
String getDeptAndChild(String deptId);
}

View File

@ -27,7 +27,7 @@ public interface ISysDeptService {
* @param dept
* @return
*/
List<Tree<Long>> selectDeptTreeList(SysDeptBo dept);
List<Tree<String>> selectDeptTreeList(SysDeptBo dept);
/**
*
@ -35,7 +35,7 @@ public interface ISysDeptService {
* @param depts
* @return
*/
List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts);
List<Tree<String>> buildDeptTreeSelect(List<SysDeptVo> depts);
/**
* ID
@ -51,7 +51,7 @@ public interface ISysDeptService {
* @param deptId ID
* @return
*/
SysDeptVo selectDeptById(Long deptId);
SysDeptVo selectDeptById(String deptId);
/**
* ID
@ -59,7 +59,7 @@ public interface ISysDeptService {
* @param deptIds id
* @return
*/
List<SysDeptVo> selectDeptByIds(List<Long> deptIds);
List<SysDeptVo> selectDeptByIds(List<String> deptIds);
/**
* ID
@ -67,11 +67,11 @@ public interface ISysDeptService {
* @param deptId ID
* @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
* @return
*/
boolean hasChildByDeptId(Long deptId);
boolean hasChildByDeptId(String deptId);
/**
*
@ -87,7 +87,7 @@ public interface ISysDeptService {
* @param deptId ID
* @return true false
*/
boolean checkDeptExistUser(Long deptId);
boolean checkDeptExistUser(String deptId);
/**
*
@ -102,7 +102,7 @@ public interface ISysDeptService {
*
* @param deptId id
*/
void checkDeptDataScope(Long deptId);
void checkDeptDataScope(String deptId);
/**
*
@ -126,5 +126,5 @@ public interface ISysDeptService {
* @param deptId ID
* @return
*/
int deleteDeptById(Long deptId);
int deleteDeptById(String deptId);
}

View File

@ -94,7 +94,7 @@ public interface ISysPostService {
* @param deptId id
* @return
*/
long countPostByDeptId(Long deptId);
long countPostByDeptId(String deptId);
/**
*

View File

@ -73,7 +73,7 @@ public interface ISysUserService {
* @param deptId id
* @return
*/
List<SysUserVo> selectUserByIds(List<Long> userIds, Long deptId);
List<SysUserVo> selectUserByIds(List<Long> userIds, String deptId);
/**
* ID
@ -218,5 +218,5 @@ public interface ISysUserService {
* @param deptId id
* @return
*/
List<SysUserVo> selectUserListByDept(Long deptId);
List<SysUserVo> selectUserListByDept(String deptId);
}

View File

@ -62,12 +62,12 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService {
*/
@Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId", condition = "#deptId != null")
@Override
public String getDeptAndChild(Long deptId) {
public String getDeptAndChild(String deptId) {
if (ObjectUtil.isNull(deptId)) {
return "-1";
}
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);
if (CollUtil.isNotEmpty(ids)) {
return StreamUtils.join(ids, Convert::toStr);

View File

@ -69,7 +69,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return
*/
@Override
public List<Tree<Long>> selectDeptTreeList(SysDeptBo bo) {
public List<Tree<String>> selectDeptTreeList(SysDeptBo bo) {
LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo);
List<SysDeptVo> depts = baseMapper.selectDeptList(lqw);
return buildDeptTreeSelect(depts);
@ -97,23 +97,23 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return
*/
@Override
public List<Tree<Long>> buildDeptTreeSelect(List<SysDeptVo> depts) {
public List<Tree<String>> buildDeptTreeSelect(List<SysDeptVo> depts) {
if (CollUtil.isEmpty(depts)) {
return CollUtil.newArrayList();
}
// 获取当前列表中每一个节点的parentId然后在列表中查找是否有id与其parentId对应若无对应则表明此时节点列表中该节点在当前列表中属于顶级节点
List<Tree<Long>> treeList = CollUtil.newArrayList();
List<Tree<String>> treeList = CollUtil.newArrayList();
for (SysDeptVo d : depts) {
Long parentId = d.getParentId();
SysDeptVo sysDeptVo = StreamUtils.findFirst(depts, it -> it.getDeptId().longValue() == parentId);
String parentId = d.getParentId();
SysDeptVo sysDeptVo = StreamUtils.findFirst(depts, it -> it.getDeptId().equals(parentId));
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())
.setParentId(dept.getParentId())
.setName(dept.getDeptName())
.setWeight(dept.getOrderNum())
.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);
}
}
@ -140,7 +140,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
*/
@Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId")
@Override
public SysDeptVo selectDeptById(Long deptId) {
public SysDeptVo selectDeptById(String deptId) {
SysDeptVo dept = baseMapper.selectVoById(deptId);
if (ObjectUtil.isNull(dept)) {
return null;
@ -152,7 +152,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
}
@Override
public List<SysDeptVo> selectDeptByIds(List<Long> deptIds) {
public List<SysDeptVo> selectDeptByIds(List<String> deptIds) {
return baseMapper.selectDeptList(new LambdaQueryWrapper<SysDept>()
.select(SysDept::getDeptId, SysDept::getDeptName, SysDept::getLeader)
.eq(SysDept::getStatus, SystemConstants.NORMAL)
@ -168,7 +168,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
@Override
public String selectDeptNameByIds(String deptIds) {
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);
if (ObjectUtil.isNotNull(vo)) {
list.add(vo.getDeptName());
@ -184,7 +184,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return ID
*/
@Override
public Long selectDeptLeaderById(Long deptId) {
public Long selectDeptLeaderById(String deptId) {
SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(deptId);
return vo.getLeader();
}
@ -209,7 +209,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return
*/
@Override
public long selectNormalChildrenDeptById(Long deptId) {
public long selectNormalChildrenDeptById(String deptId) {
return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>()
.eq(SysDept::getStatus, SystemConstants.NORMAL)
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
@ -221,7 +221,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @param deptId ID
* @return
*/
public List<SysDept> selectNormalChildrenDeptListById(Long deptId) {
public List<SysDept> selectNormalChildrenDeptListById(String deptId) {
return baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
.eq(SysDept::getStatus, SystemConstants.NORMAL)
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
@ -233,7 +233,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @param deptId ID
* @return id
*/
public List<Long> selectNormalChildrenDeptIdById(Long deptId) {
public List<String> selectNormalChildrenDeptIdById(String deptId) {
List<SysDept> ancestors = baseMapper.selectList(new LambdaQueryWrapper<SysDept>()
.eq(SysDept::getStatus, SystemConstants.NORMAL)
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
@ -248,7 +248,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return
*/
@Override
public boolean hasChildByDeptId(Long deptId) {
public boolean hasChildByDeptId(String deptId) {
return baseMapper.exists(new LambdaQueryWrapper<SysDept>()
.eq(SysDept::getParentId, deptId));
}
@ -260,7 +260,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return true false
*/
@Override
public boolean checkDeptExistUser(Long deptId) {
public boolean checkDeptExistUser(String deptId) {
return userMapper.exists(new LambdaQueryWrapper<SysUser>()
.eq(SysUser::getDeptId, deptId));
}
@ -286,7 +286,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @param deptId id
*/
@Override
public void checkDeptDataScope(Long deptId) {
public void checkDeptDataScope(String deptId) {
if (ObjectUtil.isNull(deptId)) {
return;
}
@ -377,7 +377,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @param newAncestors 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>()
.apply(DataBaseHelper.findInSet(deptId, "ancestors")));
List<SysDept> list = new ArrayList<>();
@ -405,7 +405,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
@CacheEvict(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId")
})
@Override
public int deleteDeptById(Long deptId) {
public int deleteDeptById(String deptId) {
return baseMapper.deleteById(deptId);
}

View File

@ -89,7 +89,7 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
//部门树搜索
wrapper.and(x -> {
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());
x.in(SysPost::getDeptId, deptIds);
});
@ -190,7 +190,7 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
* @return
*/
@Override
public long countPostByDeptId(Long deptId) {
public long countPostByDeptId(String deptId) {
return baseMapper.selectCount(new LambdaQueryWrapper<SysPost>().eq(SysPost::getDeptId, deptId));
}

View File

@ -374,7 +374,7 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
int rows = 1;
// 新增角色与部门(数据权限)管理
List<SysRoleDept> list = new ArrayList<>();
for (Long deptId : role.getDeptIds()) {
for (String deptId : role.getDeptIds()) {
SysRoleDept rd = new SysRoleDept();
rd.setRoleId(role.getRoleId());
rd.setDeptId(deptId);

View File

@ -80,17 +80,17 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
.between(StringUtils.isNotBlank(taskQuery.getBeginTime()) && StringUtils.isNotBlank(taskQuery.getEndTime()),
SysPost::getCreateTime, taskQuery.getBeginTime(), taskQuery.getEndTime());
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
Long belongDeptId = Long.valueOf(taskQuery.getGroupId());
String belongDeptId = (taskQuery.getGroupId());
wrapper.and(x -> {
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);
x.in(SysPost::getDeptId, deptIds);
});
}
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);
return new TaskAssigneeDTO(page.getTotal(), handlers);
}
@ -117,16 +117,16 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
//部门树搜索
wrapper.and(x -> {
Long parentId = Long.valueOf(taskQuery.getGroupId());
String parentId = (taskQuery.getGroupId());
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);
x.in(SysDept::getDeptId, deptIds);
});
}
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);
return new TaskAssigneeDTO(page.getTotal(), handlers);
}
@ -151,16 +151,16 @@ public class SysTaskAssigneeServiceImpl implements TaskAssigneeService {
if (StringUtils.isNotBlank(taskQuery.getGroupId())) {
//部门树搜索
wrapper.and(x -> {
Long parentId = Long.valueOf(taskQuery.getGroupId());
String parentId = (taskQuery.getGroupId());
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);
x.in("u.dept_id", deptIds);
});
}
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);
return new TaskAssigneeDTO(page.getTotal(), handlers);
}

View File

@ -140,10 +140,10 @@ public class SysTenantServiceImpl implements ISysTenantService {
SysDept dept = new SysDept();
dept.setTenantId(tenantId);
dept.setDeptName(bo.getCompanyName());
dept.setParentId(Constants.TOP_PARENT_ID);
dept.setParentId(Constants.TOP_PARENT_ID.toString());
dept.setAncestors(Constants.TOP_PARENT_ID.toString());
deptMapper.insert(dept);
Long deptId = dept.getDeptId();
String deptId = dept.getDeptId();
// 角色和部门关联表
SysRoleDept roleDept = new SysRoleDept();

View File

@ -86,7 +86,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
"u.create_time", params.get("beginTime"), params.get("endTime"))
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
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());
w.in("u.dept_id", ids);
}).orderByAsc("u.user_id");
@ -181,7 +181,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
* @return
*/
@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>()
.select(SysUser::getUserId, SysUser::getUserName, SysUser::getNickName)
.eq(SysUser::getStatus, SystemConstants.NORMAL)
@ -544,7 +544,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
* @return
*/
@Override
public List<SysUserVo> selectUserListByDept(Long deptId) {
public List<SysUserVo> selectUserListByDept(String deptId) {
LambdaQueryWrapper<SysUser> lqw = Wrappers.lambdaQuery();
lqw.eq(SysUser::getDeptId, deptId);
lqw.orderByAsc(SysUser::getUserId);
@ -686,7 +686,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
* @return
*/
@Override
public List<UserDTO> selectUsersByDeptIds(List<Long> deptIds) {
public List<UserDTO> selectUsersByDeptIds(List<String> deptIds) {
if (CollUtil.isEmpty(deptIds)) {
return List.of();
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,6 +1,7 @@
package org.dromara.workflow.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -135,9 +136,9 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
for (String str : storageId.split(StrUtil.COMMA)) {
String[] parts = str.split(StrUtil.COLON, 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 {
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;
@ -153,13 +154,21 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
* DEPTID
* POST
*/
private List<UserDTO> getUsersByType(TaskAssigneeEnum type, List<Long> ids) {
private List<UserDTO> getUsersByType(TaskAssigneeEnum type, List<String> ids) {
return switch (type) {
case USER -> userService.selectListByIds(ids);
case ROLE -> userService.selectUsersByRoleIds(ids);
case USER -> userService.selectListByIds(convertIds(ids));
case ROLE -> userService.selectUsersByRoleIds(convertIds(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;
}
}