三级联动反馈、线索人员核查、操作日志
parent
dca909ebbb
commit
41155cf9f5
|
|
@ -50,7 +50,7 @@ public class ShowFileController {
|
||||||
//源文件路径
|
//源文件路径
|
||||||
String sourcePath = filePath;
|
String sourcePath = filePath;
|
||||||
//pdf文件路径
|
//pdf文件路径
|
||||||
String pdfPath = "D:/ruoyi/uploadPath/pdf/";;
|
String pdfPath = "E:/uploadPath/pdf/";;
|
||||||
//获取文件后缀判断是否转换pdf
|
//获取文件后缀判断是否转换pdf
|
||||||
int index = filePath.lastIndexOf(".");
|
int index = filePath.lastIndexOf(".");
|
||||||
String fileType = filePath.substring(index + 1);
|
String fileType = filePath.substring(index + 1);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
package org.dromara.common.core.enums;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务状态枚举
|
||||||
|
*
|
||||||
|
* @author may
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum ReportLogTypeEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
CREATE("1", "新增"),
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
EDIT("2", "修改"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退回
|
||||||
|
*/
|
||||||
|
BACK("3", "退回"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收
|
||||||
|
*/
|
||||||
|
SIGN("4", "签收"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反馈
|
||||||
|
*/
|
||||||
|
REPLY("5", "反馈"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转发
|
||||||
|
*/
|
||||||
|
FORWARD("6", "转发"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二次下发
|
||||||
|
*/
|
||||||
|
RESEND("7", "二次下发"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核查线索人员
|
||||||
|
*/
|
||||||
|
EXAMINE_PERSON("8", "核查线索人员"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
DELETE("9", "删除");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private final String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
private static final Map<String, ReportLogTypeEnum> STATUS_MAP = Arrays.stream(ReportLogTypeEnum.values())
|
||||||
|
.collect(Collectors.toConcurrentMap(ReportLogTypeEnum::getStatus, Function.identity()));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态获取对应的 BusinessStatusEnum 枚举
|
||||||
|
*
|
||||||
|
* @param status 业务状态码
|
||||||
|
* @return 对应的 BusinessStatusEnum 枚举,如果找不到则返回 null
|
||||||
|
*/
|
||||||
|
public static ReportLogTypeEnum getByStatus(String status) {
|
||||||
|
// 使用 STATUS_MAP 获取对应的枚举,若找不到则返回 null
|
||||||
|
return STATUS_MAP.get(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态获取对应的业务状态描述信息
|
||||||
|
*
|
||||||
|
* @param status 业务状态码
|
||||||
|
* @return 返回业务状态描述,若状态码为空或未找到对应的枚举,返回空字符串
|
||||||
|
*/
|
||||||
|
public static String findByStatus(String status) {
|
||||||
|
if (StringUtils.isBlank(status)) {
|
||||||
|
return StrUtil.EMPTY;
|
||||||
|
}
|
||||||
|
ReportLogTypeEnum statusEnum = STATUS_MAP.get(status);
|
||||||
|
return (statusEnum != null) ? statusEnum.getDesc() : StrUtil.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ public class Helper {
|
||||||
Pattern p1 = null;
|
Pattern p1 = null;
|
||||||
Pattern p2 = null;
|
Pattern p2 = null;
|
||||||
Matcher m = 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})?$");
|
p1 = Pattern.compile("^((1[3-9]{1})+\\d{8})?$");
|
||||||
p2 = Pattern.compile("^(0[0-9]{2,3}\\-)?([1-9][0-9]{6,7})$");
|
p2 = Pattern.compile("^(0[0-9]{2,3}\\-)?([1-9][0-9]{6,7})$");
|
||||||
if("0".equals(checkType)){
|
if("0".equals(checkType)){
|
||||||
System.out.println(phoneNum.length());
|
System.out.println(phoneNum.length());
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class SmsUtils {
|
||||||
public static String sendSingleSms(String typeService, String authUserCode, String authPass, String phone, String content, String sendTime){
|
public static String sendSingleSms(String typeService, String authUserCode, String authPass, String phone, String content, String sendTime){
|
||||||
try {
|
try {
|
||||||
URL url = new URL("http://10.128.1.96:8089/smsWebService/services/smsService?wsdl");
|
URL url = new URL("http://10.128.1.96:8089/smsWebService/services/smsService?wsdl");
|
||||||
QName qname = new QName("http://ws.service.shanli.com/",
|
QName qname = new QName("http://webServiceInterface.shanli.cn/",
|
||||||
"sendSingleSMS");
|
"sendSingleSMS");
|
||||||
Service service = new Service();
|
Service service = new Service();
|
||||||
Call call = (Call) service.createCall();
|
Call call = (Call) service.createCall();
|
||||||
|
|
@ -39,10 +39,10 @@ public class SmsUtils {
|
||||||
// call.addParameter("name", XMLType.XSD_STRING, ParameterMode.IN);
|
// call.addParameter("name", XMLType.XSD_STRING, ParameterMode.IN);
|
||||||
call.addParameter("phone", XMLType.XSD_STRING, ParameterMode.IN);
|
call.addParameter("phone", XMLType.XSD_STRING, ParameterMode.IN);
|
||||||
call.addParameter("content", XMLType.XSD_STRING, ParameterMode.IN);
|
call.addParameter("content", XMLType.XSD_STRING, ParameterMode.IN);
|
||||||
call.addParameter("subCode", XMLType.XSD_STRING, ParameterMode.IN);
|
|
||||||
call.addParameter("sendTime", XMLType.XSD_STRING, ParameterMode.IN);
|
call.addParameter("sendTime", XMLType.XSD_STRING, ParameterMode.IN);
|
||||||
|
call.addParameter("subCode", XMLType.XSD_STRING, ParameterMode.IN);
|
||||||
Object[] obj = new String[]{ authUserCode, authPass, typeService, phone,
|
Object[] obj = new String[]{ authUserCode, authPass, typeService, phone,
|
||||||
content, "", sendTime };
|
content, sendTime, "" };
|
||||||
log.info("发送参数: {}", JSONUtil.toJsonStr(obj));
|
log.info("发送参数: {}", JSONUtil.toJsonStr(obj));
|
||||||
return (String) call.invoke(obj);
|
return (String) call.invoke(obj);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
import org.dromara.common.core.utils.Helper;
|
import org.dromara.common.core.utils.Helper;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
|
@ -144,4 +145,22 @@ public class BizReportInfoController extends BaseController {
|
||||||
public R<Void> back(@Validated(EditGroup.class) @RequestBody BizReportInfoBo bo) {
|
public R<Void> back(@Validated(EditGroup.class) @RequestBody BizReportInfoBo bo) {
|
||||||
return toAjax(bizReportInfoService.back(bo));
|
return toAjax(bizReportInfoService.back(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取下一个期号
|
||||||
|
*/
|
||||||
|
@GetMapping("/nextQH")
|
||||||
|
public R<String> nextQH(BizReportInfoBo bo) {
|
||||||
|
return R.ok("操作成功", bizReportInfoService.nextQH(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新下发报送信息
|
||||||
|
*/
|
||||||
|
@Log(title = "报送信息下发", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/resend")
|
||||||
|
public R<Void> resend(@Validated(EditGroup.class) @RequestBody BizReportReceiverBo bo) {
|
||||||
|
return toAjax(bizReportInfoService.resend(bo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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.BizReportLogVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportLogBo;
|
||||||
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送操作日志
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/biz/reportLog")
|
||||||
|
public class BizReportLogController extends BaseController {
|
||||||
|
|
||||||
|
private final IBizReportLogService bizReportLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送操作日志列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<BizReportLogVo> list(BizReportLogBo bo, PageQuery pageQuery) {
|
||||||
|
return bizReportLogService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出报送操作日志列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:export")
|
||||||
|
@Log(title = "报送操作日志", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(BizReportLogBo bo, HttpServletResponse response) {
|
||||||
|
List<BizReportLogVo> list = bizReportLogService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "报送操作日志", BizReportLogVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取报送操作日志详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<BizReportLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(bizReportLogService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送操作日志
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:add")
|
||||||
|
@Log(title = "报送操作日志", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody BizReportLogBo bo) {
|
||||||
|
return toAjax(bizReportLogService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送操作日志
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:edit")
|
||||||
|
@Log(title = "报送操作日志", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody BizReportLogBo bo) {
|
||||||
|
return toAjax(bizReportLogService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除报送操作日志
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("biz:reportLog:remove")
|
||||||
|
@Log(title = "报送操作日志", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(bizReportLogService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -36,6 +36,14 @@ public class BizReportPersonController extends BaseController {
|
||||||
|
|
||||||
private final IBizReportPersonService bizReportPersonService;
|
private final IBizReportPersonService bizReportPersonService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送关联人员列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/history")
|
||||||
|
public R<List<BizReportPersonVo>> history(BizReportPersonBo bo) {
|
||||||
|
return R.ok(bizReportPersonService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报送关联人员列表
|
* 查询报送关联人员列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -82,7 +90,7 @@ public class BizReportPersonController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 修改报送关联人员
|
* 修改报送关联人员
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("biz:reportPerson:edit")
|
// @SaCheckPermission("biz:reportPerson:edit")
|
||||||
@Log(title = "报送关联人员", businessType = BusinessType.UPDATE)
|
@Log(title = "报送关联人员", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package org.dromara.biz.controller;
|
package org.dromara.biz.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
|
@ -43,6 +44,7 @@ import java.util.List;
|
||||||
* @date 2025-12-15
|
* @date 2025-12-15
|
||||||
*/
|
*/
|
||||||
@Validated
|
@Validated
|
||||||
|
@SaIgnore
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/rpa")
|
@RequestMapping("/rpa")
|
||||||
|
|
@ -57,11 +59,10 @@ public class RPAController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增通知公告
|
* 测试短信
|
||||||
*/
|
*/
|
||||||
@RepeatSubmit()
|
@GetMapping("/smstest")
|
||||||
@PostMapping("/smstest")
|
public R<Void> smstest() {
|
||||||
public R<Void> smstest(@Validated(AddGroup.class) @RequestBody BizIcdsNoticeBo bo) {
|
|
||||||
return R.ok(SmsUtils.sendSMS("18655101696", "您有一条新的报送信息待处理,请前往查看"));
|
return R.ok(SmsUtils.sendSMS("18655101696", "您有一条新的报送信息待处理,请前往查看"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
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_log
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("biz_report_log")
|
||||||
|
public class BizReportLog extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型(新增、修改、退回、签收、反馈、转发、作废)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 警号
|
||||||
|
*/
|
||||||
|
private String policeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位ID
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
private Date optime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作IP
|
||||||
|
*/
|
||||||
|
private String opip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联ID
|
||||||
|
*/
|
||||||
|
private String relationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作的简要描述,例如退回原因等
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -294,6 +294,10 @@ public class BizReportPerson extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String szdlx;
|
private String szdlx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在地行政区划ID
|
||||||
|
*/
|
||||||
|
private String szdxzqhid;
|
||||||
/**
|
/**
|
||||||
* 所在地行政区划
|
* 所在地行政区划
|
||||||
*/
|
*/
|
||||||
|
|
@ -399,5 +403,9 @@ public class BizReportPerson extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String sfgp;
|
private String sfgp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否核查
|
||||||
|
*/
|
||||||
|
private Integer sfhc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,38 @@ public class BizReportReceiver extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Boolean isFeedback;
|
private Boolean isFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位ID
|
||||||
|
*/
|
||||||
|
private String sendDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位名称
|
||||||
|
*/
|
||||||
|
private String sendDeptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否下发
|
||||||
|
*/
|
||||||
|
private Long isResend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发时间
|
||||||
|
*/
|
||||||
|
private Date resendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发内容
|
||||||
|
*/
|
||||||
|
private String resendContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户ID
|
||||||
|
*/
|
||||||
|
private Long resendUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户名称
|
||||||
|
*/
|
||||||
|
private String resendUserName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
package org.dromara.biz.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportLog;
|
||||||
|
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_log
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = BizReportLog.class, reverseConvertGenerate = false)
|
||||||
|
public class BizReportLogBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送信息ID
|
||||||
|
*/
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型(新增、修改、退回、签收、反馈、转发、作废)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 警号
|
||||||
|
*/
|
||||||
|
private String policeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位ID
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
private Date optime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作IP
|
||||||
|
*/
|
||||||
|
private String opip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联ID
|
||||||
|
*/
|
||||||
|
private String relationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作的简要描述,例如退回原因等
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -293,6 +293,10 @@ public class BizReportPersonBo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String szdlx;
|
private String szdlx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在地行政区划ID
|
||||||
|
*/
|
||||||
|
private String szdxzqhid;
|
||||||
/**
|
/**
|
||||||
* 所在地行政区划
|
* 所在地行政区划
|
||||||
*/
|
*/
|
||||||
|
|
@ -398,5 +402,9 @@ public class BizReportPersonBo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String sfgp;
|
private String sfgp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否核查
|
||||||
|
*/
|
||||||
|
private Integer sfhc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,5 +83,40 @@ public class BizReportReceiverBo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Boolean isFeedback;
|
private Boolean isFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位ID
|
||||||
|
*/
|
||||||
|
private String sendDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位名称
|
||||||
|
*/
|
||||||
|
private String sendDeptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否下发
|
||||||
|
*/
|
||||||
|
private Long isResend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发时间
|
||||||
|
*/
|
||||||
|
private Date resendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发内容
|
||||||
|
*/
|
||||||
|
private String resendContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户ID
|
||||||
|
*/
|
||||||
|
private Long resendUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户名称
|
||||||
|
*/
|
||||||
|
private String resendUserName;
|
||||||
|
|
||||||
|
private BizReportInfoBo reportInfo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,9 @@ package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.dromara.biz.domain.BizReportFile;
|
import org.dromara.biz.domain.*;
|
||||||
import org.dromara.biz.domain.BizReportInfo;
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import org.dromara.biz.domain.BizReportPerson;
|
|
||||||
import org.dromara.biz.domain.BizReportReceiver;
|
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
|
@ -193,4 +190,9 @@ public class BizReportInfoVo implements Serializable {
|
||||||
* 关联线索人员列表
|
* 关联线索人员列表
|
||||||
*/
|
*/
|
||||||
private List<BizReportPerson> personList;
|
private List<BizReportPerson> personList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联日志列表
|
||||||
|
*/
|
||||||
|
private List<BizReportLog> logList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
package org.dromara.biz.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.biz.domain.BizReportLog;
|
||||||
|
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_log
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = BizReportLog.class)
|
||||||
|
public class BizReportLogVo 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 = "操作类型", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "新=增、修改、退回、签收、反馈、转发、作废")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作用户ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作用户名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作用户名称")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 警号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "警号")
|
||||||
|
private String policeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作单位ID")
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作单位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作单位名称")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作时间")
|
||||||
|
private Date optime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作IP
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作IP")
|
||||||
|
private String opip;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联ID")
|
||||||
|
private String relationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作的简要描述,例如退回原因等
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作的简要描述,例如退回原因等")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -354,6 +354,10 @@ public class BizReportPersonVo implements Serializable {
|
||||||
@ExcelProperty(value = "所在地类型")
|
@ExcelProperty(value = "所在地类型")
|
||||||
private String szdlx;
|
private String szdlx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在地行政区划ID
|
||||||
|
*/
|
||||||
|
private String szdxzqhid;
|
||||||
/**
|
/**
|
||||||
* 所在地行政区划
|
* 所在地行政区划
|
||||||
*/
|
*/
|
||||||
|
|
@ -480,5 +484,9 @@ public class BizReportPersonVo implements Serializable {
|
||||||
@ExcelProperty(value = "是否购票")
|
@ExcelProperty(value = "是否购票")
|
||||||
private String sfgp;
|
private String sfgp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否核查
|
||||||
|
*/
|
||||||
|
private Integer sfhc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,5 +102,45 @@ public class BizReportReceiverVo implements Serializable {
|
||||||
@ExcelProperty(value = "是否反馈")
|
@ExcelProperty(value = "是否反馈")
|
||||||
private Boolean isFeedback;
|
private Boolean isFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发单位ID")
|
||||||
|
private String sendDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发单位名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发单位名称")
|
||||||
|
private String sendDeptName;
|
||||||
|
/**
|
||||||
|
* 是否下发
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否下发")
|
||||||
|
private Long isResend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发时间")
|
||||||
|
private Date resendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发内容
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发内容")
|
||||||
|
private String resendContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发用户ID")
|
||||||
|
private Long resendUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下发用户名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下发用户名称")
|
||||||
|
private String resendUserName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.biz.mapper;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.BizReportLog;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportLogVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送操作日志Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface BizReportLogMapper extends BaseMapperPlus<BizReportLog, BizReportLogVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package org.dromara.biz.service;
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
||||||
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
@ -73,4 +74,20 @@ public interface IBizReportInfoService {
|
||||||
* @return 是否修改成功
|
* @return 是否修改成功
|
||||||
*/
|
*/
|
||||||
Boolean back(BizReportInfoBo bo);
|
Boolean back(BizReportInfoBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取下一个期号
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 下一个期号
|
||||||
|
*/
|
||||||
|
public String nextQH(BizReportInfoBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新下发报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否下发成功
|
||||||
|
*/
|
||||||
|
Boolean resend(BizReportReceiverBo bo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package org.dromara.biz.service;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportLogVo;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportLogBo;
|
||||||
|
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-12-30
|
||||||
|
*/
|
||||||
|
public interface IBizReportLogService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送操作日志
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送操作日志
|
||||||
|
*/
|
||||||
|
BizReportLogVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送操作日志列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送操作日志分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<BizReportLogVo> queryPageList(BizReportLogBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送操作日志列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送操作日志列表
|
||||||
|
*/
|
||||||
|
List<BizReportLogVo> queryList(BizReportLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送操作日志
|
||||||
|
*
|
||||||
|
* @param bo 报送操作日志
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(BizReportLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送操作日志
|
||||||
|
*
|
||||||
|
* @param bo 报送操作日志
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(BizReportLogBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送操作日志信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存操作日志
|
||||||
|
* @param reportId 报送信息ID
|
||||||
|
* @param type 操作类型
|
||||||
|
* @param relationId 关联ID
|
||||||
|
* @param remark 备注
|
||||||
|
* @return 返回是否成功
|
||||||
|
*/
|
||||||
|
Boolean saveLog(Long reportId, String type, String relationId, String remark);
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
package org.dromara.biz.service.impl;
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
import org.dromara.biz.domain.BizReportFile;
|
import org.dromara.biz.domain.*;
|
||||||
import org.dromara.biz.domain.BizReportPerson;
|
import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
import org.dromara.biz.domain.BizReportReceiver;
|
|
||||||
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
import org.dromara.biz.mapper.BizReportFileMapper;
|
import org.dromara.biz.mapper.*;
|
||||||
import org.dromara.biz.mapper.BizReportPersonMapper;
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
import org.dromara.biz.mapper.BizReportReceiverMapper;
|
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
||||||
|
import org.dromara.common.core.enums.ReportLogTypeEnum;
|
||||||
import org.dromara.common.core.utils.Helper;
|
import org.dromara.common.core.utils.Helper;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
import org.dromara.common.core.utils.StreamUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
@ -19,18 +19,18 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.dromara.common.sms.util.SmsUtils;
|
||||||
import org.dromara.common.sse.dto.SseMessageDto;
|
import org.dromara.common.sse.dto.SseMessageDto;
|
||||||
import org.dromara.common.sse.utils.SseMessageUtils;
|
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||||
import org.dromara.system.domain.SysDept;
|
import org.dromara.system.domain.SysDept;
|
||||||
import org.dromara.system.domain.bo.SysUserBo;
|
import org.dromara.system.domain.bo.SysUserBo;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
import org.dromara.system.mapper.SysDeptMapper;
|
import org.dromara.system.mapper.SysDeptMapper;
|
||||||
import org.dromara.system.mapper.SysUserMapper;
|
import org.dromara.system.mapper.SysUserMapper;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
import org.dromara.biz.domain.bo.BizReportInfoBo;
|
||||||
import org.dromara.biz.domain.vo.BizReportInfoVo;
|
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 org.dromara.biz.service.IBizReportInfoService;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -55,12 +55,16 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
|
|
||||||
private final BizReportPersonMapper personMapper;
|
private final BizReportPersonMapper personMapper;
|
||||||
|
|
||||||
|
private final BizReportLogMapper logMapper;
|
||||||
|
|
||||||
private final SysDeptMapper deptMapper;
|
private final SysDeptMapper deptMapper;
|
||||||
|
|
||||||
private final ISysUserService userService;
|
private final ISysUserService userService;
|
||||||
|
|
||||||
private final ScheduledExecutorService scheduledExecutorService;
|
private final ScheduledExecutorService scheduledExecutorService;
|
||||||
|
|
||||||
|
private final IBizReportLogService logService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报送信息
|
* 查询报送信息
|
||||||
*
|
*
|
||||||
|
|
@ -92,6 +96,12 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
List<BizReportPerson> persons = personMapper.selectList(lqwp);
|
List<BizReportPerson> persons = personMapper.selectList(lqwp);
|
||||||
info.setPersonList(persons);
|
info.setPersonList(persons);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<BizReportLog> lqwl = Wrappers.lambdaQuery();
|
||||||
|
lqwl.orderByAsc(BizReportLog::getOptime);
|
||||||
|
lqwl.eq(BizReportLog::getReportId, id);
|
||||||
|
List<BizReportLog> logs = logMapper.selectList(lqwl);
|
||||||
|
info.setLogList(logs);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -191,6 +201,9 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
|
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(add.getId(), ReportLogTypeEnum.CREATE.getStatus(), "", "新增记录");
|
||||||
|
|
||||||
// 插入接收单位表
|
// 插入接收单位表
|
||||||
if(bo.getReceiverDeptIds()!=null && bo.getReceiverDeptIds().length>0){
|
if(bo.getReceiverDeptIds()!=null && bo.getReceiverDeptIds().length>0){
|
||||||
for (String deptId : bo.getReceiverDeptIds()) {
|
for (String deptId : bo.getReceiverDeptIds()) {
|
||||||
|
|
@ -198,6 +211,8 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
receiver.setReportId(bo.getId());
|
receiver.setReportId(bo.getId());
|
||||||
receiver.setDeptId(deptId);
|
receiver.setDeptId(deptId);
|
||||||
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
||||||
|
receiver.setSendDeptId(user.getDeptId());
|
||||||
|
receiver.setSendDeptName(deptMapper.selectVoById(user.getDeptId()).getDeptName());
|
||||||
receiverMapper.insert(receiver);
|
receiverMapper.insert(receiver);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -208,6 +223,8 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
receiver.setReportId(bo.getId());
|
receiver.setReportId(bo.getId());
|
||||||
receiver.setDeptId(sjdept);
|
receiver.setDeptId(sjdept);
|
||||||
receiver.setDeptName(deptMapper.selectVoById(sjdept).getDeptName());
|
receiver.setDeptName(deptMapper.selectVoById(sjdept).getDeptName());
|
||||||
|
receiver.setSendDeptId(user.getDeptId());
|
||||||
|
receiver.setSendDeptName(deptMapper.selectVoById(user.getDeptId()).getDeptName());
|
||||||
|
|
||||||
bo.setReceiverDeptIds(new String[]{ sjdept });
|
bo.setReceiverDeptIds(new String[]{ sjdept });
|
||||||
receiverMapper.insert(receiver);
|
receiverMapper.insert(receiver);
|
||||||
|
|
@ -247,7 +264,9 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
if(bo.getReceiverDeptIds()!=null && bo.getReceiverDeptIds().length>0){
|
if(bo.getReceiverDeptIds()!=null && bo.getReceiverDeptIds().length>0){
|
||||||
SysUserBo userBo = new SysUserBo();
|
SysUserBo userBo = new SysUserBo();
|
||||||
userBo.setDeptIds(bo.getReceiverDeptIds());
|
userBo.setDeptIds(bo.getReceiverDeptIds());
|
||||||
List<Long> userIds = userService.selectUserIdList(userBo);
|
List<SysUserVo> list = userService.selectUserIdList(userBo);
|
||||||
|
List<Long> userIds = StreamUtils.toList(list, SysUserVo::getUserId);
|
||||||
|
|
||||||
scheduledExecutorService.schedule(() -> {
|
scheduledExecutorService.schedule(() -> {
|
||||||
SseMessageDto dto = new SseMessageDto();
|
SseMessageDto dto = new SseMessageDto();
|
||||||
dto.setMessage("您有新的待办信息,请前往查看!");
|
dto.setMessage("您有新的待办信息,请前往查看!");
|
||||||
|
|
@ -255,6 +274,13 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
dto.setUserIds(userIds);
|
dto.setUserIds(userIds);
|
||||||
SseMessageUtils.publishMessage(dto);
|
SseMessageUtils.publishMessage(dto);
|
||||||
}, 5, TimeUnit.SECONDS);
|
}, 5, TimeUnit.SECONDS);
|
||||||
|
|
||||||
|
for (SysUserVo userVo : list) {
|
||||||
|
String phone = Helper.NStr(userVo.getPhonenumber());
|
||||||
|
if (Helper.validPhoneNum("0", phone)){
|
||||||
|
SmsUtils.sendSMS(phone, "您有一条新的报送信息待处理,请前往查看");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
|
@ -276,6 +302,9 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
|
|
||||||
boolean flag = baseMapper.updateById(update) > 0;
|
boolean flag = baseMapper.updateById(update) > 0;
|
||||||
if (flag){
|
if (flag){
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(update.getId(), ReportLogTypeEnum.EDIT.getStatus(), "", "修改记录");
|
||||||
|
|
||||||
// 插入接收单位表
|
// 插入接收单位表
|
||||||
List<String> dbDeptIds = new ArrayList<>();
|
List<String> dbDeptIds = new ArrayList<>();
|
||||||
if (bo.getReceiverDepts()!=null) {
|
if (bo.getReceiverDepts()!=null) {
|
||||||
|
|
@ -299,6 +328,8 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
receiver.setReportId(bo.getId());
|
receiver.setReportId(bo.getId());
|
||||||
receiver.setDeptId(deptId);
|
receiver.setDeptId(deptId);
|
||||||
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
||||||
|
receiver.setSendDeptId(user.getDeptId());
|
||||||
|
receiver.setSendDeptName(deptMapper.selectVoById(user.getDeptId()).getDeptName());
|
||||||
receiverMapper.insert(receiver);
|
receiverMapper.insert(receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -384,8 +415,98 @@ public class BizReportInfoServiceImpl implements IBizReportInfoService {
|
||||||
|
|
||||||
boolean flag = baseMapper.updateById(update) > 0;
|
boolean flag = baseMapper.updateById(update) > 0;
|
||||||
if (flag){
|
if (flag){
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(update.getId(), ReportLogTypeEnum.BACK.getStatus(), "", "退回记录");
|
||||||
|
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取下一个期号
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 下一个期号
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String nextQH(BizReportInfoBo bo) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
|
LambdaQueryWrapper<BizReportInfo> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getCategoryId() != null, BizReportInfo::getCategoryId, bo.getCategoryId());
|
||||||
|
lqw.eq(BizReportInfo::getReportDeptId, user.getDeptId());
|
||||||
|
lqw.between(BizReportInfo::getReportTime , "", "");
|
||||||
|
|
||||||
|
int count = Helper.FInt(baseMapper.selectCount(lqw));
|
||||||
|
String result = String.format("%0" + 4 + "d", count+1);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新下发报送信息
|
||||||
|
*
|
||||||
|
* @param bo 报送信息
|
||||||
|
* @return 是否下发成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean resend(BizReportReceiverBo bo) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
|
BizReportReceiver update = new BizReportReceiver(); // MapstructUtils.convert(bo, BizReportReceiver.class);
|
||||||
|
update.setId(bo.getId());
|
||||||
|
update.setIsResend(1L);
|
||||||
|
update.setResendTime(new Date());
|
||||||
|
update.setResendUserId(user.getUserId());
|
||||||
|
update.setResendUserName(user.getNickname());
|
||||||
|
update.setResendContent(bo.getResendContent());
|
||||||
|
boolean flag = receiverMapper.updateById(update) > 0;
|
||||||
|
|
||||||
|
if (flag){
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(bo.getReportId(), ReportLogTypeEnum.RESEND.getStatus(), bo.getId().toString(), "二次下发");
|
||||||
|
|
||||||
|
BizReportInfo reportInfo = new BizReportInfo(); // MapstructUtils.convert(bo.getReportInfo(), BizReportInfo.class);
|
||||||
|
reportInfo.setStatus(ReportInfoStatusEnum.WAITING_SIGN.getStatus());
|
||||||
|
reportInfo.setId(bo.getReportId());
|
||||||
|
baseMapper.updateById(reportInfo);
|
||||||
|
|
||||||
|
// 插入新的接收单位表
|
||||||
|
if(bo.getReportInfo().getReceiverDeptIds()!=null && bo.getReportInfo().getReceiverDeptIds().length>0){
|
||||||
|
for (String deptId : bo.getReportInfo().getReceiverDeptIds()) {
|
||||||
|
BizReportReceiver receiver = new BizReportReceiver();
|
||||||
|
receiver.setReportId(bo.getReportId());
|
||||||
|
receiver.setDeptId(deptId);
|
||||||
|
receiver.setDeptName(deptMapper.selectVoById(deptId).getDeptName());
|
||||||
|
receiver.setSendDeptId(user.getDeptId());
|
||||||
|
receiver.setSendDeptName(deptMapper.selectVoById(user.getDeptId()).getDeptName());
|
||||||
|
receiverMapper.insert(receiver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送待办消息提醒
|
||||||
|
if(bo.getReportInfo().getReceiverDeptIds()!=null && bo.getReportInfo().getReceiverDeptIds().length>0){
|
||||||
|
SysUserBo userBo = new SysUserBo();
|
||||||
|
userBo.setDeptIds(bo.getReportInfo().getReceiverDeptIds());
|
||||||
|
List<SysUserVo> list = userService.selectUserIdList(userBo);
|
||||||
|
List<Long> userIds = StreamUtils.toList(list, SysUserVo::getUserId);
|
||||||
|
|
||||||
|
scheduledExecutorService.schedule(() -> {
|
||||||
|
SseMessageDto dto = new SseMessageDto();
|
||||||
|
dto.setMessage("您有新的待办信息,请前往查看!");
|
||||||
|
dto.setType("todo");
|
||||||
|
dto.setUserIds(userIds);
|
||||||
|
SseMessageUtils.publishMessage(dto);
|
||||||
|
}, 5, TimeUnit.SECONDS);
|
||||||
|
|
||||||
|
for (SysUserVo userVo : list) {
|
||||||
|
String phone = Helper.NStr(userVo.getPhonenumber());
|
||||||
|
if (Helper.validPhoneNum("0", phone)){
|
||||||
|
SmsUtils.sendSMS(phone, "您有一条新的报送信息待处理,请前往查看");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,177 @@
|
||||||
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
|
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.common.satoken.utils.LoginHelper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.dromara.biz.domain.bo.BizReportLogBo;
|
||||||
|
import org.dromara.biz.domain.vo.BizReportLogVo;
|
||||||
|
import org.dromara.biz.domain.BizReportLog;
|
||||||
|
import org.dromara.biz.mapper.BizReportLogMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报送操作日志Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BizReportLogServiceImpl implements IBizReportLogService {
|
||||||
|
|
||||||
|
private final BizReportLogMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报送操作日志
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 报送操作日志
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BizReportLogVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报送操作日志列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 报送操作日志分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<BizReportLogVo> queryPageList(BizReportLogBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<BizReportLog> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<BizReportLogVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的报送操作日志列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 报送操作日志列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<BizReportLogVo> queryList(BizReportLogBo bo) {
|
||||||
|
LambdaQueryWrapper<BizReportLog> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<BizReportLog> buildQueryWrapper(BizReportLogBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<BizReportLog> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(BizReportLog::getId);
|
||||||
|
lqw.eq(bo.getReportId() != null, BizReportLog::getReportId, bo.getReportId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getType()), BizReportLog::getType, bo.getType());
|
||||||
|
lqw.eq(bo.getUserId() != null, BizReportLog::getUserId, bo.getUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getUserName()), BizReportLog::getUserName, bo.getUserName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getPoliceNum()), BizReportLog::getPoliceNum, bo.getPoliceNum());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), BizReportLog::getDeptId, bo.getDeptId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), BizReportLog::getDeptName, bo.getDeptName());
|
||||||
|
lqw.eq(bo.getOptime() != null, BizReportLog::getOptime, bo.getOptime());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOpip()), BizReportLog::getOpip, bo.getOpip());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getRelationId()), BizReportLog::getRelationId, bo.getRelationId());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增报送操作日志
|
||||||
|
*
|
||||||
|
* @param bo 报送操作日志
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(BizReportLogBo bo) {
|
||||||
|
BizReportLog add = MapstructUtils.convert(bo, BizReportLog.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存操作日志
|
||||||
|
* @param reportId 报送信息ID
|
||||||
|
* @param type 操作类型
|
||||||
|
* @param relationId 关联ID
|
||||||
|
* @param remark 备注
|
||||||
|
* @return 返回是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean saveLog(Long reportId, String type, String relationId, String remark) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
|
|
||||||
|
BizReportLog log = new BizReportLog();
|
||||||
|
log.setReportId(reportId);
|
||||||
|
log.setDeptId(user.getDeptId());
|
||||||
|
log.setDeptName(user.getDeptName());
|
||||||
|
// log.setOpip(Helper.getIP(request));
|
||||||
|
log.setOptime(new Date());
|
||||||
|
log.setRemark(remark);
|
||||||
|
log.setRelationId(relationId);
|
||||||
|
log.setType(type);
|
||||||
|
log.setPoliceNum(user.getUsername());
|
||||||
|
log.setUserName(user.getNickname());
|
||||||
|
log.setUserId(user.getUserId());
|
||||||
|
|
||||||
|
boolean flag = baseMapper.insert(log) > 0;
|
||||||
|
if (flag) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报送操作日志
|
||||||
|
*
|
||||||
|
* @param bo 报送操作日志
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(BizReportLogBo bo) {
|
||||||
|
BizReportLog update = MapstructUtils.convert(bo, BizReportLog.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(BizReportLog entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除报送操作日志信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package org.dromara.biz.service.impl;
|
package org.dromara.biz.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
|
import org.dromara.common.core.enums.ReportLogTypeEnum;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
@ -8,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.biz.domain.bo.BizReportPersonBo;
|
import org.dromara.biz.domain.bo.BizReportPersonBo;
|
||||||
import org.dromara.biz.domain.vo.BizReportPersonVo;
|
import org.dromara.biz.domain.vo.BizReportPersonVo;
|
||||||
|
|
@ -15,6 +19,7 @@ import org.dromara.biz.domain.BizReportPerson;
|
||||||
import org.dromara.biz.mapper.BizReportPersonMapper;
|
import org.dromara.biz.mapper.BizReportPersonMapper;
|
||||||
import org.dromara.biz.service.IBizReportPersonService;
|
import org.dromara.biz.service.IBizReportPersonService;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -30,6 +35,7 @@ import java.util.Collection;
|
||||||
public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
||||||
|
|
||||||
private final BizReportPersonMapper baseMapper;
|
private final BizReportPersonMapper baseMapper;
|
||||||
|
private final IBizReportLogService logService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报送关联人员
|
* 查询报送关联人员
|
||||||
|
|
@ -71,7 +77,7 @@ public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
||||||
private LambdaQueryWrapper<BizReportPerson> buildQueryWrapper(BizReportPersonBo bo) {
|
private LambdaQueryWrapper<BizReportPerson> buildQueryWrapper(BizReportPersonBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
LambdaQueryWrapper<BizReportPerson> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BizReportPerson> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByAsc(BizReportPerson::getId);
|
lqw.orderByDesc(BizReportPerson::getGxsj);
|
||||||
lqw.eq(bo.getReportId() != null, BizReportPerson::getReportId, bo.getReportId());
|
lqw.eq(bo.getReportId() != null, BizReportPerson::getReportId, bo.getReportId());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getXm()), BizReportPerson::getXm, bo.getXm());
|
lqw.eq(StringUtils.isNotBlank(bo.getXm()), BizReportPerson::getXm, bo.getXm());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getZjlx()), BizReportPerson::getZjlx, bo.getZjlx());
|
lqw.eq(StringUtils.isNotBlank(bo.getZjlx()), BizReportPerson::getZjlx, bo.getZjlx());
|
||||||
|
|
@ -146,6 +152,7 @@ public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFxpg()), BizReportPerson::getFxpg, bo.getFxpg());
|
lqw.eq(StringUtils.isNotBlank(bo.getFxpg()), BizReportPerson::getFxpg, bo.getFxpg());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFjxs()), BizReportPerson::getFjxs, bo.getFjxs());
|
lqw.eq(StringUtils.isNotBlank(bo.getFjxs()), BizReportPerson::getFjxs, bo.getFjxs());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getSfgp()), BizReportPerson::getSfgp, bo.getSfgp());
|
lqw.eq(StringUtils.isNotBlank(bo.getSfgp()), BizReportPerson::getSfgp, bo.getSfgp());
|
||||||
|
lqw.eq(bo.getSfhc()!=null && !bo.getSfhc().toString().equals(""), BizReportPerson::getSfhc, bo.getSfhc());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -157,7 +164,22 @@ public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertByBo(BizReportPersonBo bo) {
|
public Boolean insertByBo(BizReportPersonBo bo) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
|
|
||||||
BizReportPerson add = MapstructUtils.convert(bo, BizReportPerson.class);
|
BizReportPerson add = MapstructUtils.convert(bo, BizReportPerson.class);
|
||||||
|
add.setCjsj(new Date());
|
||||||
|
add.setCjrid(user.getUserId());
|
||||||
|
add.setCjrjh(user.getUsername());
|
||||||
|
add.setCjrxm(user.getNickname());
|
||||||
|
add.setCjrjgdwdm(user.getDeptId());
|
||||||
|
add.setCjrjgdw(user.getDeptName());
|
||||||
|
add.setGxsj(new Date());
|
||||||
|
add.setGxrid(user.getUserId());
|
||||||
|
add.setGxrjh(user.getUsername());
|
||||||
|
add.setGxrxm(user.getNickname());
|
||||||
|
add.setGxrjgdwdm(user.getDeptId());
|
||||||
|
add.setGxrjgdw(user.getDeptName());
|
||||||
|
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
@ -174,9 +196,23 @@ public class BizReportPersonServiceImpl implements IBizReportPersonService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateByBo(BizReportPersonBo bo) {
|
public Boolean updateByBo(BizReportPersonBo bo) {
|
||||||
|
LoginUser user = LoginHelper.getLoginUser();
|
||||||
BizReportPerson update = MapstructUtils.convert(bo, BizReportPerson.class);
|
BizReportPerson update = MapstructUtils.convert(bo, BizReportPerson.class);
|
||||||
|
update.setSfhc(1);
|
||||||
|
update.setGxsj(new Date());
|
||||||
|
update.setGxrid(user.getUserId());
|
||||||
|
update.setGxrjh(user.getUsername());
|
||||||
|
update.setGxrxm(user.getNickname());
|
||||||
|
update.setGxrjgdwdm(user.getDeptId());
|
||||||
|
update.setGxrjgdw(user.getDeptName());
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
return baseMapper.updateById(update) > 0;
|
boolean flag = baseMapper.updateById(update) > 0;
|
||||||
|
if (flag){
|
||||||
|
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(bo.getReportId(), ReportLogTypeEnum.EXAMINE_PERSON.getStatus(), bo.getId().toString(), "核查线索人员");
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@ package org.dromara.biz.service.impl;
|
||||||
import org.dromara.biz.domain.BizReportInfo;
|
import org.dromara.biz.domain.BizReportInfo;
|
||||||
import org.dromara.biz.domain.BizReportReply;
|
import org.dromara.biz.domain.BizReportReply;
|
||||||
import org.dromara.biz.mapper.BizReportInfoMapper;
|
import org.dromara.biz.mapper.BizReportInfoMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
||||||
|
import org.dromara.common.core.enums.ReportLogTypeEnum;
|
||||||
import org.dromara.common.core.utils.Helper;
|
import org.dromara.common.core.utils.Helper;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
|
@ -40,6 +42,8 @@ public class BizReportReceiverServiceImpl implements IBizReportReceiverService {
|
||||||
private final BizReportReceiverMapper baseMapper;
|
private final BizReportReceiverMapper baseMapper;
|
||||||
private final BizReportInfoMapper reportInfoMapper;
|
private final BizReportInfoMapper reportInfoMapper;
|
||||||
|
|
||||||
|
private final IBizReportLogService logService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报送记录接收单位
|
* 查询报送记录接收单位
|
||||||
*
|
*
|
||||||
|
|
@ -93,6 +97,11 @@ public class BizReportReceiverServiceImpl implements IBizReportReceiverService {
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getOldUserId()), BizReportReceiver::getOldUserId, bo.getOldUserId());
|
lqw.eq(StringUtils.isNotBlank(bo.getOldUserId()), BizReportReceiver::getOldUserId, bo.getOldUserId());
|
||||||
lqw.eq(bo.getOldReportId() != null, BizReportReceiver::getOldReportId, bo.getOldReportId());
|
lqw.eq(bo.getOldReportId() != null, BizReportReceiver::getOldReportId, bo.getOldReportId());
|
||||||
lqw.eq(bo.getIsFeedback() != null, BizReportReceiver::getIsFeedback, bo.getIsFeedback());
|
lqw.eq(bo.getIsFeedback() != null, BizReportReceiver::getIsFeedback, bo.getIsFeedback());
|
||||||
|
lqw.eq(bo.getIsResend() != null, BizReportReceiver::getIsResend, bo.getIsResend());
|
||||||
|
lqw.eq(bo.getResendTime() != null, BizReportReceiver::getResendTime, bo.getResendTime());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getResendContent()), BizReportReceiver::getResendContent, bo.getResendContent());
|
||||||
|
lqw.eq(bo.getResendUserId() != null, BizReportReceiver::getResendUserId, bo.getResendUserId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getResendUserName()), BizReportReceiver::getResendUserName, bo.getResendUserName());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,6 +186,9 @@ public class BizReportReceiverServiceImpl implements IBizReportReceiverService {
|
||||||
int flag = baseMapper.updateById(update);
|
int flag = baseMapper.updateById(update);
|
||||||
|
|
||||||
if (flag > 0){
|
if (flag > 0){
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(bo.getReportId(), ReportLogTypeEnum.SIGN.getStatus(), bo.getId().toString(), "签收");
|
||||||
|
|
||||||
LambdaQueryWrapper<BizReportReceiver> lqw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BizReportReceiver> lqw = new LambdaQueryWrapper<>();
|
||||||
lqw.eq(BizReportReceiver::getReportId, bo.getReportId());
|
lqw.eq(BizReportReceiver::getReportId, bo.getReportId());
|
||||||
lqw.eq(BizReportReceiver::getIsSign, 0);
|
lqw.eq(BizReportReceiver::getIsSign, 0);
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,10 @@ import org.dromara.biz.domain.bo.BizReportReceiverBo;
|
||||||
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
import org.dromara.biz.domain.vo.BizReportReceiverVo;
|
||||||
import org.dromara.biz.mapper.BizReportInfoMapper;
|
import org.dromara.biz.mapper.BizReportInfoMapper;
|
||||||
import org.dromara.biz.mapper.BizReportReceiverMapper;
|
import org.dromara.biz.mapper.BizReportReceiverMapper;
|
||||||
|
import org.dromara.biz.service.IBizReportLogService;
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
import org.dromara.common.core.enums.ReportInfoStatusEnum;
|
||||||
|
import org.dromara.common.core.enums.ReportLogTypeEnum;
|
||||||
import org.dromara.common.core.utils.Helper;
|
import org.dromara.common.core.utils.Helper;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
|
@ -42,6 +44,7 @@ public class BizReportReplyServiceImpl implements IBizReportReplyService {
|
||||||
private final BizReportReplyMapper baseMapper;
|
private final BizReportReplyMapper baseMapper;
|
||||||
private final BizReportReceiverMapper receiverMapper;
|
private final BizReportReceiverMapper receiverMapper;
|
||||||
private final BizReportInfoMapper reportInfoMapper;
|
private final BizReportInfoMapper reportInfoMapper;
|
||||||
|
private final IBizReportLogService logService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报送记录反馈
|
* 查询报送记录反馈
|
||||||
|
|
@ -109,6 +112,9 @@ public class BizReportReplyServiceImpl implements IBizReportReplyService {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
|
|
||||||
|
// 添加日志
|
||||||
|
logService.saveLog(bo.getReportId(), ReportLogTypeEnum.REPLY.getStatus(), bo.getId().toString(), "反馈");
|
||||||
|
|
||||||
LambdaQueryWrapper<BizReportReceiver> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<BizReportReceiver> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByAsc(BizReportReceiver::getId);
|
lqw.orderByAsc(BizReportReceiver::getId);
|
||||||
lqw.eq(bo.getReportId() != null, BizReportReceiver::getReportId, bo.getReportId());
|
lqw.eq(bo.getReportId() != null, BizReportReceiver::getReportId, bo.getReportId());
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
package org.dromara.system.controller.system;
|
||||||
|
|
||||||
|
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.system.domain.vo.SysAreaVo;
|
||||||
|
import org.dromara.system.domain.bo.SysAreaBo;
|
||||||
|
import org.dromara.system.service.ISysAreaService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/area")
|
||||||
|
public class SysAreaController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysAreaService sysAreaService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行政区划列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/alllist")
|
||||||
|
public R<List<SysAreaVo>> alllist(SysAreaBo bo) {
|
||||||
|
return R.ok(sysAreaService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行政区划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<SysAreaVo> list(SysAreaBo bo, PageQuery pageQuery) {
|
||||||
|
return sysAreaService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出行政区划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:export")
|
||||||
|
@Log(title = "行政区划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(SysAreaBo bo, HttpServletResponse response) {
|
||||||
|
List<SysAreaVo> list = sysAreaService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "行政区划", SysAreaVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取行政区划详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<SysAreaVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable String id) {
|
||||||
|
return R.ok(sysAreaService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行政区划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:add")
|
||||||
|
@Log(title = "行政区划", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysAreaBo bo) {
|
||||||
|
return toAjax(sysAreaService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行政区划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:edit")
|
||||||
|
@Log(title = "行政区划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysAreaBo bo) {
|
||||||
|
return toAjax(sysAreaService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行政区划
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:area:remove")
|
||||||
|
@Log(title = "行政区划", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable String[] ids) {
|
||||||
|
return toAjax(sysAreaService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,6 +32,13 @@ public class SysDeptController extends BaseController {
|
||||||
private final ISysDeptService deptService;
|
private final ISysDeptService deptService;
|
||||||
private final ISysPostService postService;
|
private final ISysPostService postService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/group/alllist")
|
||||||
|
public R<List<SysDeptVo>> alllist(SysDeptBo dept) {
|
||||||
|
List<SysDeptVo> depts = deptService.selectDeptList(dept);
|
||||||
|
return R.ok(depts);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取部门列表
|
* 获取部门列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ public class SysDictDataController extends BaseController {
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字典数据列表
|
* 查询字典数据列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
package org.dromara.system.controller.system;
|
||||||
|
|
||||||
|
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.system.domain.vo.SysDictTreeVo;
|
||||||
|
import org.dromara.system.domain.bo.SysDictTreeBo;
|
||||||
|
import org.dromara.system.service.ISysDictTreeService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/dictTree")
|
||||||
|
public class SysDictTreeController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysDictTreeService sysDictTreeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/alllist")
|
||||||
|
public R<List<SysDictTreeVo>> list(SysDictTreeBo bo) {
|
||||||
|
return R.ok( sysDictTreeService.queryList(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<SysDictTreeVo> list(SysDictTreeBo bo, PageQuery pageQuery) {
|
||||||
|
return sysDictTreeService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出字典列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dictTree:export")
|
||||||
|
@Log(title = "字典", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(SysDictTreeBo bo, HttpServletResponse response) {
|
||||||
|
List<SysDictTreeVo> list = sysDictTreeService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "字典", SysDictTreeVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dictTree:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<SysDictTreeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(sysDictTreeService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dictTree:add")
|
||||||
|
@Log(title = "字典", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysDictTreeBo bo) {
|
||||||
|
return toAjax(sysDictTreeService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dictTree:edit")
|
||||||
|
@Log(title = "字典", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysDictTreeBo bo) {
|
||||||
|
return toAjax(sysDictTreeService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除字典
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:dictTree:remove")
|
||||||
|
@Log(title = "字典", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(sysDictTreeService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
package org.dromara.system.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划对象 sys_area
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_area")
|
||||||
|
public class SysArea extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址编码
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区全称
|
||||||
|
*/
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级ID
|
||||||
|
*/
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首字母
|
||||||
|
*/
|
||||||
|
private String spell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型:1是省会,2直辖市,3港澳台,4其它
|
||||||
|
*/
|
||||||
|
private Long areaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同级下排序
|
||||||
|
*/
|
||||||
|
private Long orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0全国、1省、2市区、3郊县、4街道、5居委会
|
||||||
|
*/
|
||||||
|
private Long areaLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城乡分类代码
|
||||||
|
*/
|
||||||
|
private String villageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属国家名
|
||||||
|
*/
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属省名称
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属市名称
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属区县名称
|
||||||
|
*/
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属街道名称
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源地图,百度1,高德2
|
||||||
|
*/
|
||||||
|
private Long mapType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有下级(1 是 0 否)
|
||||||
|
*/
|
||||||
|
private String isHaveChild;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package org.dromara.system.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典对象 sys_dict_tree
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_dict_tree")
|
||||||
|
public class SysDictTree extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级名称
|
||||||
|
*/
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
package org.dromara.system.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysArea;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划业务对象 sys_area
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = SysArea.class, reverseConvertGenerate = false)
|
||||||
|
public class SysAreaBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址编码
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "地址编码不能为空", groups = { EditGroup.class })
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "地区名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区全称
|
||||||
|
*/
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级ID
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "父级ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首字母
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "首字母不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String spell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型:1是省会,2直辖市,3港澳台,4其它
|
||||||
|
*/
|
||||||
|
@NotNull(message = "类型:1是省会,2直辖市,3港澳台,4其它不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long areaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同级下排序
|
||||||
|
*/
|
||||||
|
@NotNull(message = "同级下排序不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0全国、1省、2市区、3郊县、4街道、5居委会
|
||||||
|
*/
|
||||||
|
@NotNull(message = "0全国、1省、2市区、3郊县、4街道、5居委会不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long areaLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城乡分类代码
|
||||||
|
*/
|
||||||
|
private String villageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属国家名
|
||||||
|
*/
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属省名称
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属市名称
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属区县名称
|
||||||
|
*/
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属街道名称
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源地图,百度1,高德2
|
||||||
|
*/
|
||||||
|
private Long mapType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有下级(1 是 0 否)
|
||||||
|
*/
|
||||||
|
private String isHaveChild;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package org.dromara.system.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysDictTree;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典业务对象 sys_dict_tree
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = SysDictTree.class, reverseConvertGenerate = false)
|
||||||
|
public class SysDictTreeBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "ID不能为空", groups = { EditGroup.class })
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级名称
|
||||||
|
*/
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -66,6 +66,10 @@ public class SysUserBo extends BaseEntity {
|
||||||
@Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
|
@Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定电话
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,147 @@
|
||||||
|
package org.dromara.system.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysArea;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划视图对象 sys_area
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = SysArea.class)
|
||||||
|
public class SysAreaVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "地址编码")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "地区名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区全称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "地区全称")
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "父级ID")
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首字母
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "首字母")
|
||||||
|
private String spell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型:1是省会,2直辖市,3港澳台,4其它
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类型:1是省会,2直辖市,3港澳台,4其它")
|
||||||
|
private Long areaType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同级下排序
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "同级下排序")
|
||||||
|
private Long orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0全国、1省、2市区、3郊县、4街道、5居委会
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "0全国、1省、2市区、3郊县、4街道、5居委会")
|
||||||
|
private Long areaLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城乡分类代码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "城乡分类代码")
|
||||||
|
private String villageType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属国家名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属国家名")
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属省名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属省名称")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属市名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属市名称")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属区县名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属区县名称")
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属街道名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所属街道名称")
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "经度")
|
||||||
|
private String lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "纬度")
|
||||||
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来源地图,百度1,高德2
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "来源地图,百度1,高德2")
|
||||||
|
private Long mapType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有下级(1 是 0 否)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否有下级", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(readConverterExp = "1=,是=,0=,否=")
|
||||||
|
private String isHaveChild;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
package org.dromara.system.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysDictTree;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典视图对象 sys_dict_tree
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = SysDictTree.class)
|
||||||
|
public class SysDictTreeVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "父ID")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "父级名称")
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 值
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "值")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -68,6 +68,10 @@ public class SysUserVo implements Serializable {
|
||||||
@Sensitive(strategy = SensitiveStrategy.EMAIL, perms = "system:user:edit")
|
@Sensitive(strategy = SensitiveStrategy.EMAIL, perms = "system:user:edit")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定电话
|
||||||
|
*/
|
||||||
|
private String telephone;
|
||||||
/**
|
/**
|
||||||
* 手机号码
|
* 手机号码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.system.mapper;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysArea;
|
||||||
|
import org.dromara.system.domain.vo.SysAreaVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface SysAreaMapper extends BaseMapperPlus<SysArea, SysAreaVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.dromara.system.mapper;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.SysDictTree;
|
||||||
|
import org.dromara.system.domain.vo.SysDictTreeVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
public interface SysDictTreeMapper extends BaseMapperPlus<SysDictTree, SysDictTreeVo> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.vo.SysAreaVo;
|
||||||
|
import org.dromara.system.domain.bo.SysAreaBo;
|
||||||
|
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-12-30
|
||||||
|
*/
|
||||||
|
public interface ISysAreaService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行政区划
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 行政区划
|
||||||
|
*/
|
||||||
|
SysAreaVo queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询行政区划列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 行政区划分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<SysAreaVo> queryPageList(SysAreaBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的行政区划列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 行政区划列表
|
||||||
|
*/
|
||||||
|
List<SysAreaVo> queryList(SysAreaBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行政区划
|
||||||
|
*
|
||||||
|
* @param bo 行政区划
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(SysAreaBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行政区划
|
||||||
|
*
|
||||||
|
* @param bo 行政区划
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(SysAreaBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除行政区划信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.vo.SysDictTreeVo;
|
||||||
|
import org.dromara.system.domain.bo.SysDictTreeBo;
|
||||||
|
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-12-29
|
||||||
|
*/
|
||||||
|
public interface ISysDictTreeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 字典
|
||||||
|
*/
|
||||||
|
SysDictTreeVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询字典列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 字典分页列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<SysDictTreeVo> queryPageList(SysDictTreeBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的字典列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 字典列表
|
||||||
|
*/
|
||||||
|
List<SysDictTreeVo> queryList(SysDictTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典
|
||||||
|
*
|
||||||
|
* @param bo 字典
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(SysDictTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典
|
||||||
|
*
|
||||||
|
* @param bo 字典
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(SysDictTreeBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除字典信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
@ -26,7 +26,7 @@ public interface ISysUserService {
|
||||||
*/
|
*/
|
||||||
List<SysUserExportVo> selectUserExportList(SysUserBo user);
|
List<SysUserExportVo> selectUserExportList(SysUserBo user);
|
||||||
|
|
||||||
List<Long> selectUserIdList(SysUserBo user);
|
List<SysUserVo> selectUserIdList(SysUserBo user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询已分配用户角色列表
|
* 根据条件分页查询已分配用户角色列表
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,146 @@
|
||||||
|
package org.dromara.system.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.system.domain.bo.SysAreaBo;
|
||||||
|
import org.dromara.system.domain.vo.SysAreaVo;
|
||||||
|
import org.dromara.system.domain.SysArea;
|
||||||
|
import org.dromara.system.mapper.SysAreaMapper;
|
||||||
|
import org.dromara.system.service.ISysAreaService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class SysAreaServiceImpl implements ISysAreaService {
|
||||||
|
|
||||||
|
private final SysAreaMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行政区划
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 行政区划
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysAreaVo queryById(String id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询行政区划列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 行政区划分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<SysAreaVo> queryPageList(SysAreaBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<SysArea> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<SysAreaVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的行政区划列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 行政区划列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysAreaVo> queryList(SysAreaBo bo) {
|
||||||
|
LambdaQueryWrapper<SysArea> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<SysArea> buildQueryWrapper(SysAreaBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<SysArea> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(SysArea::getId);
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), SysArea::getName, bo.getName());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getFullName()), SysArea::getFullName, bo.getFullName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getParentId()), SysArea::getParentId, bo.getParentId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getSpell()), SysArea::getSpell, bo.getSpell());
|
||||||
|
lqw.eq(bo.getAreaType() != null, SysArea::getAreaType, bo.getAreaType());
|
||||||
|
lqw.eq(bo.getOrderNo() != null, SysArea::getOrderNo, bo.getOrderNo());
|
||||||
|
lqw.eq(bo.getAreaLevel() != null, SysArea::getAreaLevel, bo.getAreaLevel());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getVillageType()), SysArea::getVillageType, bo.getVillageType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getNation()), SysArea::getNation, bo.getNation());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getProvince()), SysArea::getProvince, bo.getProvince());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCity()), SysArea::getCity, bo.getCity());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getCounty()), SysArea::getCounty, bo.getCounty());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getTown()), SysArea::getTown, bo.getTown());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getLng()), SysArea::getLng, bo.getLng());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getLat()), SysArea::getLat, bo.getLat());
|
||||||
|
lqw.eq(bo.getMapType() != null, SysArea::getMapType, bo.getMapType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getIsHaveChild()), SysArea::getIsHaveChild, bo.getIsHaveChild());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行政区划
|
||||||
|
*
|
||||||
|
* @param bo 行政区划
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(SysAreaBo bo) {
|
||||||
|
SysArea add = MapstructUtils.convert(bo, SysArea.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行政区划
|
||||||
|
*
|
||||||
|
* @param bo 行政区划
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(SysAreaBo bo) {
|
||||||
|
SysArea update = MapstructUtils.convert(bo, SysArea.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(SysArea entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除行政区划信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
package org.dromara.system.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.system.domain.bo.SysDictTreeBo;
|
||||||
|
import org.dromara.system.domain.vo.SysDictTreeVo;
|
||||||
|
import org.dromara.system.domain.SysDictTree;
|
||||||
|
import org.dromara.system.mapper.SysDictTreeMapper;
|
||||||
|
import org.dromara.system.service.ISysDictTreeService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruansee
|
||||||
|
* @date 2025-12-29
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class SysDictTreeServiceImpl implements ISysDictTreeService {
|
||||||
|
|
||||||
|
private final SysDictTreeMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 字典
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysDictTreeVo queryById(Long id){
|
||||||
|
return baseMapper.selectVoById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询字典列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @param pageQuery 分页参数
|
||||||
|
* @return 字典分页列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<SysDictTreeVo> queryPageList(SysDictTreeBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<SysDictTree> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<SysDictTreeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询符合条件的字典列表
|
||||||
|
*
|
||||||
|
* @param bo 查询条件
|
||||||
|
* @return 字典列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysDictTreeVo> queryList(SysDictTreeBo bo) {
|
||||||
|
LambdaQueryWrapper<SysDictTree> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<SysDictTree> buildQueryWrapper(SysDictTreeBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<SysDictTree> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.orderByAsc(SysDictTree::getId);
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getType()), SysDictTree::getType, bo.getType());
|
||||||
|
lqw.eq(bo.getParentId() != null, SysDictTree::getParentId, bo.getParentId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getName()), SysDictTree::getName, bo.getName());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getParentName()), SysDictTree::getParentName, bo.getParentName());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getValue()), SysDictTree::getValue, bo.getValue());
|
||||||
|
lqw.eq(bo.getSort() != null, SysDictTree::getSort, bo.getSort());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDictTree::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典
|
||||||
|
*
|
||||||
|
* @param bo 字典
|
||||||
|
* @return 是否新增成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(SysDictTreeBo bo) {
|
||||||
|
SysDictTree add = MapstructUtils.convert(bo, SysDictTree.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setId(add.getId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典
|
||||||
|
*
|
||||||
|
* @param bo 字典
|
||||||
|
* @return 是否修改成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(SysDictTreeBo bo) {
|
||||||
|
SysDictTree update = MapstructUtils.convert(bo, SysDictTree.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(SysDictTree entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除字典信息
|
||||||
|
*
|
||||||
|
* @param ids 待删除的主键集合
|
||||||
|
* @param isValid 是否进行有效性校验
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Long> selectUserIdList(SysUserBo user) {
|
public List<SysUserVo> selectUserIdList(SysUserBo user) {
|
||||||
QueryWrapper<SysUser> wrapper = Wrappers.query();
|
QueryWrapper<SysUser> wrapper = Wrappers.query();
|
||||||
wrapper.eq("u.del_flag", SystemConstants.NORMAL)
|
wrapper.eq("u.del_flag", SystemConstants.NORMAL)
|
||||||
.and(ObjectUtil.isNotNull(user.getDeptIds()) && user.getDeptIds().length>0 , w -> {
|
.and(ObjectUtil.isNotNull(user.getDeptIds()) && user.getDeptIds().length>0 , w -> {
|
||||||
|
|
@ -93,7 +93,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
})
|
})
|
||||||
.orderByAsc("u.user_id");
|
.orderByAsc("u.user_id");
|
||||||
List<SysUserVo> list = baseMapper.selectUserList(wrapper);
|
List<SysUserVo> list = baseMapper.selectUserList(wrapper);
|
||||||
return StreamUtils.toList(list, SysUserVo::getUserId);
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Wrapper<SysUser> buildQueryWrapper(SysUserBo user) {
|
private Wrapper<SysUser> buildQueryWrapper(SysUserBo user) {
|
||||||
|
|
|
||||||
|
|
@ -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.BizReportLogMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.system.mapper.SysAreaMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.system.mapper.SysDictTreeMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue