Browse Source

Merge remote-tracking branch 'origin/master'

master
21819 2 years ago
parent
commit
7442cfcb53
  1. 3
      mailbox-common/src/main/java/com/biutag/config/Minio.java
  2. 19
      mailbox-common/src/main/java/com/biutag/entity/system/Holiday.java
  3. 6
      mailbox-lan/pom.xml
  4. 11
      mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java
  5. 32
      mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java
  6. 75
      mailbox-lan/src/main/java/com/biutag/lan/controller/system/HolidayController.java
  7. 6
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java
  8. 6
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java
  9. 12
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java
  10. 19
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java
  11. 6
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java
  12. 2
      mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java
  13. 4
      mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java
  14. 12
      mailbox-lan/src/main/java/com/biutag/lan/service/HolidayService.java
  15. 9
      mailbox-lan/src/main/java/com/biutag/lan/service/IHolidayService.java
  16. 4
      mailbox-lan/src/main/java/com/biutag/lan/service/MailApprovalService.java
  17. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/MailCountersignService.java
  18. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/MailExtensionApprovalService.java
  19. 21
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  20. 16
      mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java
  21. 41
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java
  22. 33
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java
  23. 10
      mailbox-lan/src/main/java/com/biutag/lan/vo/system/HolidayVo.java
  24. 2
      mailbox-lan/src/main/resources/application.yml
  25. 39
      mailbox-lan/src/main/resources/mapper/WorkMapper.xml
  26. 11
      mailbox-lan/src/test/java/com/biutag/lan/FlowTest.java
  27. 4
      mailbox-outer-admin/src/main/java/com/biutag/outeradmin/controller/LoginController.java
  28. 2
      sql/240304.sql
  29. 4
      truncate.sql

3
mailbox-common/src/main/java/com/biutag/config/Minio.java

@ -2,6 +2,7 @@ package com.biutag.config;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.biutag.exception.MinioOperateException;
import com.biutag.util.IOUtil;
import io.minio.*;
@ -47,7 +48,7 @@ public class Minio {
public String upload(InputStream is, String originName) {
try {
String filepath = DateUtil.format(new Date(), "YYMMdd") + "/" + IdUtil.nanoId(8) +
Optional.ofNullable(originName).map(item -> "_" + item).orElse("");
(StrUtil.isNotBlank(originName) && originName.contains(".") ? originName.substring(originName.lastIndexOf(".")) : "");
PutObjectArgs putObjectArgs = PutObjectArgs.builder()
.object(filepath)
.bucket(properties.getBucketName())

19
mailbox-common/src/main/java/com/biutag/entity/system/Holiday.java

@ -3,11 +3,9 @@ package com.biutag.entity.system;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel("节假日实体")
@ -16,22 +14,13 @@ public class Holiday implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value="id", type= IdType.AUTO)
@ApiModelProperty(value = "")
private Long id;
@ApiModelProperty(value = "")
private String holidayName;
@ApiModelProperty(value = "")
private String startDate;
private String date;
@ApiModelProperty(value = "")
private String endDate;
private String holidayFlag;
private String detail;
@ApiModelProperty(value = "")
private String holidayType;
@ApiModelProperty(value = "")
private Integer isWorkday;
private Integer year;
}

6
mailbox-lan/pom.xml

@ -120,6 +120,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

11
mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java

@ -11,8 +11,10 @@ import com.biutag.entity.system.PoliceUser;
import com.biutag.enums.ErrorEnum;
import com.biutag.exception.BusinessException;
import com.biutag.exception.LoginException;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.service.IRoleService;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.lan.vo.system.DeptVo;
import com.biutag.util.StringUtils;
import com.biutag.util.YmlUtils;
import jakarta.annotation.Resource;
@ -41,6 +43,9 @@ public class AdminInterceptor implements HandlerInterceptor {
@Resource
IRoleService roleService;
@Resource
IDeptService deptService;
/**
* 前置处理器
*
@ -162,7 +167,6 @@ public class AdminInterceptor implements HandlerInterceptor {
String errMsg = ErrorEnum.TOKEN_INVALID.getMsg();
throw new LoginException(errCode, errMsg);
}
// 用户校验
PoliceUser adminUser = policeUserMapper.selectOne(
new QueryWrapper<PoliceUser>()
@ -170,7 +174,6 @@ public class AdminInterceptor implements HandlerInterceptor {
.eq("id", Integer.parseInt(id.toString()))
.eq("is_delete", 0)
.last("limit 1"));
// 删除校验
if (StringUtils.isNull(adminUser)) {
Integer errCode = ErrorEnum.TOKEN_INVALID.getCode();
@ -187,16 +190,16 @@ public class AdminInterceptor implements HandlerInterceptor {
if (StrUtil.isBlank(adminUser.getRoleIds())) {
throw new BusinessException("用户角色为空");
}
DeptVo deptVo = deptService.detail(Integer.parseInt(adminUser.getDeptIds()));
// 写入线程
AdminThreadLocal.put("adminId", id);
//AdminThreadLocal.put("username", adminUser.getUsername());
AdminThreadLocal.put("empNo", adminUser.getEmpNo());
AdminThreadLocal.put("name", adminUser.getName());
AdminThreadLocal.put("name", deptVo.getName());
AdminThreadLocal.put("roleIds", adminUser.getRoleIds());
AdminThreadLocal.put("deptIds", adminUser.getDeptIds());
AdminThreadLocal.put("deptName", adminUser.getDeptName());
// AdminThreadLocal.put("postIds", adminUser.getPostIds());
AdminThreadLocal.put("roleName", roleService.detail(Integer.parseInt(adminUser.getRoleIds())).getName());
// 权限校验

32
mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java

@ -3,11 +3,14 @@ package com.biutag.lan.controller;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.aop.NotPower;
import com.biutag.core.AjaxResult;
import com.biutag.enums.RoleEnum;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.Work;
import com.biutag.lan.domain.bo.MailTotal;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.service.MailMarkService;
import com.biutag.lan.service.MailService;
@ -19,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@ -42,13 +46,30 @@ public class HomeController {
Integer roleId = AdminThreadLocal.getRoleId();
Integer deptId = AdminThreadLocal.getDeptId();
if (roleId.equals(RoleEnum.MUNICIPAL_DEPT_CLASSES.getRoleId())) {
unSignTotal = mailSourceService.countByUnSign().intValue();
unSignTotal = (int) workService.count(new LambdaQueryWrapper<Work>().in(Work::getFlowName,
// 待签收、待下发、信件退回
Arrays.asList(FlowNameEnum.PENDING_SIGN.getName(), FlowNameEnum.PENDING_DISTRIBUTE.getName(),
FlowNameEnum.MAIL_RETURN.getName()))
.eq(Work::getSignRoleId, roleId)
.eq(Work::getWorkState, Work.State.todo.name()));
}
if (roleId.equals(RoleEnum.SECOND_DEPT_CLASSES.getRoleId())) {
unSignTotal = workService.count(FlowNodeEnum.SECOND_SIGN.getKey(), deptId);
LambdaQueryWrapper<Work> queryWrapper = new LambdaQueryWrapper<Work>()
.in(Work::getFlowName,
// 待签收、待下发、信件退回
Arrays.asList(FlowNameEnum.PENDING_SIGN.getName(), FlowNameEnum.PENDING_DISTRIBUTE.getName(), FlowNameEnum.MAIL_RETURN.getName()))
.eq(Work::getSignRoleId, roleId)
.eq(Work::getSignDeptId, deptId)
.eq(Work::getWorkState, Work.State.todo.name());
unSignTotal = (int) workService.count(queryWrapper);
}
if (roleId.equals(RoleEnum.THREE_DEPT_CLASSES.getRoleId())) {
unSignTotal = workService.count(FlowNodeEnum.THREE_SIGN.getKey(), deptId);
unSignTotal = (int) workService.count(new LambdaQueryWrapper<Work>().in(Work::getFlowName,
// 待签收
Collections.singletonList(FlowNameEnum.PENDING_SIGN.getName()))
.eq(Work::getSignRoleId, roleId)
.eq(Work::getSignDeptId, deptId)
.eq(Work::getWorkState, Work.State.todo.name()));
}
Integer contactWriterTotal = workService.count(FlowNodeEnum.CONTACT_WRITER.getKey(), deptId);
Integer interviewWriterTotal = workService.count(FlowNodeEnum.INTERVIEW_WRITER.getKey(), deptId);
@ -61,11 +82,10 @@ public class HomeController {
FlowNodeEnum.SECOND_REPORTING.getKey(),
FlowNodeEnum.FIRST_APPROVAL.getKey(),
FlowNodeEnum.COUNTERSIGN.getKey()), deptId);
return AjaxResult.success(Arrays.asList(MailTotal.of("未签收", "un_sign", unSignTotal),
MailTotal.of("联系群众", "contact_writer", contactWriterTotal),
return AjaxResult.success(Arrays.asList(MailTotal.of("待签收下发", "un_sign", unSignTotal),
MailTotal.of("联系群众", "contact_writer", contactWriterTotal),
MailTotal.of("待接访群众", "interview_writer", interviewWriterTotal),
MailTotal.of("待核查办理", "verify", verifyTotal),
// TODO
MailTotal.of("申请延期", "extension", extensionTotal),
MailTotal.of("待办结审批", "approval", approvalTotal)
));

75
mailbox-lan/src/main/java/com/biutag/lan/controller/system/HolidayController.java

@ -1,6 +1,9 @@
package com.biutag.lan.controller.system;
import com.alibaba.fastjson2.JSON;
import com.biutag.entity.system.Holiday;
import com.biutag.lan.aop.Log;
import com.biutag.lan.service.HolidayService;
import com.biutag.lan.service.IHolidayService;
import com.biutag.lan.validate.commons.IdValidate;
import com.biutag.lan.validate.system.HolidayCreateValidate;
@ -11,58 +14,48 @@ import com.biutag.lan.vo.system.HolidayListedVo;
import com.biutag.lan.vo.system.HolidayDetailVo;
import com.biutag.core.AjaxResult;
import com.biutag.core.PageResult;
import com.biutag.lan.vo.system.HolidayVo;
import com.biutag.mapper.system.HolidayMapper;
import com.biutag.util.StringUtils;
import com.biutag.validator.annotation.IDMust;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@RequiredArgsConstructor
@RestController
@RequestMapping("api/holiday")
@Api(tags = "节假日管理")
public class HolidayController {
@Resource
IHolidayService iHolidayService;
@GetMapping("/list")
@ApiOperation(value="节假日列表")
public AjaxResult<PageResult<HolidayListedVo>> list(@Validated PageValidate pageValidate,
@Validated HolidaySearchValidate searchValidate) {
PageResult<HolidayListedVo> list = iHolidayService.list(pageValidate, searchValidate);
return AjaxResult.success(list);
}
@GetMapping("/detail")
@ApiOperation(value="节假日详情")
public AjaxResult<HolidayDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
HolidayDetailVo detail = iHolidayService.detail(id);
return AjaxResult.success(detail);
}
@Log(title = "节假日新增")
@PostMapping("/add")
@ApiOperation(value="节假日新增")
public AjaxResult<Void> add(@Validated @RequestBody HolidayCreateValidate createValidate) {
iHolidayService.add(createValidate);
return AjaxResult.success();
}
@Log(title = "节假日编辑")
@PostMapping("/edit")
@ApiOperation(value="节假日编辑")
public AjaxResult<Void> edit(@Validated @RequestBody HolidayUpdateValidate updateValidate) {
iHolidayService.edit(updateValidate);
return AjaxResult.success();
}
@Log(title = "节假日删除")
@PostMapping("/del")
@ApiOperation(value="节假日删除")
public AjaxResult<Void> del(@Validated @RequestBody IdValidate idValidate) {
iHolidayService.del(idValidate.getId());
return AjaxResult.success();
private final HolidayService holidayService;
private final HolidayMapper holidayMapper;
@RequestMapping("/show-holiday")
@ApiOperation("进入页面显示节假日")
public List<HolidayVo> getlist() {
List<Holiday> holidayList = holidayService.list();
List<HolidayVo> result = new ArrayList<>();
for (Holiday holiday : holidayList) {
if (holiday.getHolidayFlag().equals("Y")) {
HolidayVo HolidayVo = new HolidayVo();
HolidayVo.setHolidayFlag(holiday.getHolidayFlag());
HolidayVo.setDetail(holiday.getDetail());
HolidayVo.setDate(holiday.getDate());
result.add(HolidayVo);
} else if (holiday.getHolidayFlag().equals("N") && StringUtils.isNotEmpty(holiday.getDetail())) {
HolidayVo HolidayVo = new HolidayVo();
HolidayVo.setHolidayFlag(holiday.getHolidayFlag());
HolidayVo.setDetail(holiday.getDetail());
HolidayVo.setDate(holiday.getDate());
result.add(HolidayVo);
}
}
return result;
}
}

6
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/WorkVo.java

@ -84,6 +84,12 @@ public class WorkVo {
@ExcelProperty("流程限时")
private Long flowLimitedRemainingTime;
private LocalDateTime flowLimitedLastHandlerTime;
private Long limitedTime;
private LocalDateTime createTime;
/**
* 办理单位ID三级单位
*/

6
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java

@ -80,8 +80,8 @@ public class FirstApprovalFlow extends Flow {
}
mailService.updateById(mail);
// 认定办结
MailMark mailMark = new MailMark().setMailId(mailId)
.setSecondDeptId(mail.getSecondDeptId())
MailMark mailMark = mailMarkService.getById(mailId);
mailMark.setSecondDeptId(mail.getSecondDeptId())
.setSecondDeptName(mail.getSecondDeptName())
.setThreeDeptId(mail.getThreeDeptId())
.setThreeDeptName(mail.getThreeDeptName())
@ -89,7 +89,7 @@ public class FirstApprovalFlow extends Flow {
.setCompletionTime(now)
.setResolved(problemSolvingStatus ? AppConstants.TRUE : AppConstants.FALSE)
.setSatisfied("非常满意".equals(satisfactionStatus) || "基本满意".equals(satisfactionStatus) ? AppConstants.TRUE : AppConstants.FALSE);
mailMarkService.save(mailMark);
mailMarkService.updateById(mailMark);
}
public Flow mailReturn(String mailId, JSONObject data) {

12
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstDistributeFlow.java

@ -1,13 +1,16 @@
package com.biutag.lan.flow.node;
import com.alibaba.fastjson2.JSONObject;
import com.biutag.constants.AppConstants;
import com.biutag.enums.RoleEnum;
import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailMark;
import com.biutag.lan.domain.Work;
import com.biutag.lan.flow.Flow;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.service.MailMarkService;
import com.biutag.lan.service.MailService;
import com.biutag.lan.service.WorkService;
import com.biutag.lan.vo.system.DeptVo;
@ -31,6 +34,7 @@ public class FirstDistributeFlow extends Flow {
private final MailService mailService;
private final WorkService workService;
private final IDeptService deptService;
private final MailMarkService mailMarkService;
@Transactional(rollbackFor = Exception.class)
@Override
@ -77,6 +81,14 @@ public class FirstDistributeFlow extends Flow {
.setFirstDistributeInfo(firstDistributeInfo.toJSONString())
.setMainDeptLevel(mainDeptLevel);
mailService.updateById(mail);
MailMark mailMark = new MailMark()
.setMailId(mailId)
.setSecondDeptId(mail.getSecondDeptId())
.setSecondDeptName(mail.getSecondDeptName())
.setCompleted(AppConstants.FALSE)
.setCompletionTime(now);
mailMarkService.save(mailMark);
return nextNode;
}

19
mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstSignFlow.java

@ -11,9 +11,7 @@ import com.biutag.lan.enums.MailState;
import com.biutag.lan.flow.Flow;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.service.MailService;
import com.biutag.lan.service.MailSourceService;
import com.biutag.lan.service.WorkService;
import com.biutag.lan.service.*;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@ -31,6 +29,9 @@ public class FirstSignFlow extends Flow {
private final MailService mailService;
private final MailSourceService mailSourceService;
private final WorkService workService;
private final MailApprovalService mailApprovalService;
private final MailExtensionApprovalService mailExtensionApprovalService;
private final MailCountersignService mailCountersignService;
@Override
@Transactional(rollbackFor = Exception.class)
@ -73,6 +74,7 @@ public class FirstSignFlow extends Flow {
String mailSecondCategory = data.getString("mailSecondCategory");
String mailThreeCategory = data.getString("mailThreeCategory");
String mailCategory = data.getString("mailCategory");
validMailExists(mailId);
Mail mail = mailSource.toMail()
// 办理中
.setMailState(MailState.processing.getValue())
@ -97,6 +99,7 @@ public class FirstSignFlow extends Flow {
Assert.notNull(threeDeptId, "三级办理单位不能为空");
LocalDateTime now = LocalDateTime.now();
MailSource mailSource = mailSourceService.getById(mailId);
validMailExists(mailId);
Mail mail = mailSource.toMail()
.setMailFirstCategory(mailFirstCategory)
.setMailCategory(mailFirstCategory)
@ -118,6 +121,7 @@ public class FirstSignFlow extends Flow {
Assert.hasText(invalidationReason, "判定理由不能为空");
LocalDateTime now = LocalDateTime.now();
MailSource mailSource = mailSourceService.getById(mailId);
validMailExists(mailId);
Mail mail = mailSource.toMail()
.setMailFirstCategory(mailFirstCategory)
.setMailCategory(mailFirstCategory)
@ -132,4 +136,13 @@ public class FirstSignFlow extends Flow {
return null;
}
private void validMailExists(String mailId) {
if (mailService.exists(mailId)) {
// 如果存在则删除相关数据
mailService.removeById(mailId);
mailApprovalService.remove(mailId);
mailExtensionApprovalService.remove(mailId);
mailCountersignService.remove(mailId);
}
}
}

6
mailbox-lan/src/main/java/com/biutag/lan/flow/node/SecondSignFlow.java

@ -2,7 +2,6 @@ package com.biutag.lan.flow.node;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.biutag.enums.RoleEnum;
import com.biutag.exception.BusinessException;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.Mail;
@ -12,6 +11,7 @@ import com.biutag.lan.flow.ActionEnum;
import com.biutag.lan.flow.Flow;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.service.MailMarkService;
import com.biutag.lan.service.MailReturnService;
import com.biutag.lan.service.MailService;
import com.biutag.lan.service.WorkService;
@ -36,6 +36,8 @@ public class SecondSignFlow extends Flow {
private final MailReturnService mailReturnService;
private final MailMarkService mailMarkService;
@Override
@Transactional(rollbackFor = Exception.class)
public Flow next(String nextActionKey, String mailId, JSONObject data) {
@ -88,6 +90,8 @@ public class SecondSignFlow extends Flow {
}
// 更新信件
mailService.updateById(mail);
// 删除统计表
mailMarkService.removeById(mailId);
return null;
}

2
mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java

@ -172,7 +172,7 @@ public class ThreeVerifyFlow extends Flow {
.setFlowName(nextNode.getFlowNode().getFullName());
// 当前节点操作对象
if (ActionEnum.offline.name().equals(nextActionKey)) {
mail.setCurrentOperator(String.format("%s专班", mail.getSecondDeptId()));
mail.setCurrentOperator(String.format("%s专班", mail.getSecondDeptName()));
} else {
String leaderEmpNo = data.getString("leaderEmpNo");
PoliceUser policeUser = policeUserService.getOneByEmpNo(leaderEmpNo);

4
mailbox-lan/src/main/java/com/biutag/lan/mapper/WorkMapper.java

@ -15,14 +15,14 @@ import java.util.Collection;
public interface WorkMapper extends BaseMapper<Work> {
Page<WorkVo> selectPage(@Param("page") Page<Work> page, @Param(Constants.WRAPPER) QueryWrapper<Work> queryWrapper);
Page<WorkVo> selectPageBy(@Param("page") Page<Work> page, @Param(Constants.WRAPPER) QueryWrapper<Work> queryWrapper);
Page<QueryMailVo> selectQueryPage(@Param("page") Page<Mail> page, @Param(Constants.WRAPPER) QueryWrapper<Mail> queryWrapper);
Integer selectCountByFlowKey(Collection<String> flowKeys, Integer deptId);
@Select("select count(w.id) from work w left join mail m on w.mail_id = m.id where m.flow_key = #{flowKey} and w.sign_dept_id = #{deptId}")
Integer selectCount(String flowKey, Integer deptId);
Integer selectCountBy(String flowKey, Integer deptId);
@Select("select count(w.id) from work w left join mail m on w.mail_id = m.id where m.extension_flag = #{extensionFlag} and w.sign_dept_id = #{deptId}")
Integer selectCountByExtensionFlag(Boolean extensionFlag, Integer deptId);

12
mailbox-lan/src/main/java/com/biutag/lan/service/HolidayService.java

@ -0,0 +1,12 @@
package com.biutag.lan.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.entity.system.Holiday;
import com.biutag.mapper.system.HolidayMapper;
import org.springframework.stereotype.Service;
@Service
public class HolidayService extends ServiceImpl<HolidayMapper, Holiday> {
}

9
mailbox-lan/src/main/java/com/biutag/lan/service/IHolidayService.java

@ -1,5 +1,6 @@
package com.biutag.lan.service;
import com.biutag.entity.system.Holiday;
import com.biutag.lan.validate.commons.PageValidate;
import com.biutag.lan.validate.system.HolidayCreateValidate;
import com.biutag.lan.validate.system.HolidayUpdateValidate;
@ -8,6 +9,10 @@ import com.biutag.lan.vo.system.HolidayListedVo;
import com.biutag.lan.vo.system.HolidayDetailVo;
import com.biutag.core.PageResult;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* 节假日服务接口类
* @author oumyye
@ -24,6 +29,8 @@ public interface IHolidayService {
*/
PageResult<HolidayListedVo> list(PageValidate pageValidate, HolidaySearchValidate searchValidate);
List<Holiday> list(List<String> dates);
/**
* 节假日详情
*
@ -57,4 +64,6 @@ public interface IHolidayService {
*/
void del(Integer id);
long getFlowRemainingTime(long limitedTime, LocalDateTime flowLimitedLastHandlerTime);
}

4
mailbox-lan/src/main/java/com/biutag/lan/service/MailApprovalService.java

@ -44,4 +44,8 @@ public class MailApprovalService extends ServiceImpl<MailApprovalMapper, MailApp
public MailApproval getOne(String mailId, String flowKey) {
return getOne(new LambdaQueryWrapper<MailApproval>().eq(MailApproval::getMailId, mailId).eq(MailApproval::getFlowKey, flowKey));
}
public boolean remove(String mailId) {
return remove(new LambdaQueryWrapper<MailApproval>().eq(MailApproval::getMailId, mailId));
}
}

5
mailbox-lan/src/main/java/com/biutag/lan/service/MailCountersignService.java

@ -3,6 +3,7 @@ package com.biutag.lan.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.lan.domain.MailCountersign;
import com.biutag.lan.domain.MailExtensionApproval;
import com.biutag.lan.mapper.MailCountersignMapper;
import org.springframework.stereotype.Service;
@ -19,4 +20,8 @@ public class MailCountersignService extends ServiceImpl<MailCountersignMapper, M
return list(new LambdaQueryWrapper<MailCountersign>().eq(MailCountersign::getMailId, mailId));
}
public boolean remove(String mailId) {
return remove(new LambdaQueryWrapper<MailCountersign>().eq(MailCountersign::getMailId, mailId));
}
}

5
mailbox-lan/src/main/java/com/biutag/lan/service/MailExtensionApprovalService.java

@ -3,6 +3,7 @@ package com.biutag.lan.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.domain.MailApproval;
import com.biutag.lan.domain.MailExtensionApproval;
import com.biutag.lan.mapper.MailExtensionApprovalMapper;
import org.springframework.stereotype.Service;
@ -30,4 +31,8 @@ public class MailExtensionApprovalService extends ServiceImpl<MailExtensionAppro
.setHandlerDeptName(AdminThreadLocal.getDeptName());
return save(mailExtensionApproval);
}
public boolean remove(String mailId) {
return remove(new LambdaQueryWrapper<MailExtensionApproval>().eq(MailExtensionApproval::getMailId, mailId));
}
}

21
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -1,5 +1,6 @@
package com.biutag.lan.service;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
@ -7,7 +8,9 @@ import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.constants.AppConstants;
import com.biutag.entity.system.Dept;
import com.biutag.entity.system.Holiday;
import com.biutag.enums.RoleEnum;
import com.biutag.exception.BusinessException;
import com.biutag.lan.config.AdminThreadLocal;
@ -65,6 +68,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
private final IMailLabelService mailLabelService;
private final IHolidayService holidayService;
@Lazy
@Autowired
private List<Flow> flowNodes;
@ -88,9 +93,6 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
.findFirst().orElse(null);
}
MailVo mailVo = MailVo.of(mail);
List<MailFlow> flows = mailFlowService.list(mailId)
// 时间倒叙
.stream().sorted(Comparator.comparing(MailFlow::getCreateTime).reversed()).collect(Collectors.toList());
@ -100,7 +102,6 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
.setFlows(flows);
// 部门会签
mailVo.setCountersigns(mailCountersignService.list(mailId));
// 审批
List<MailApproval> list = mailApprovalService.list(mailId);
if (!list.isEmpty()) {
@ -137,7 +138,7 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
limitedTime += mail.getExtensionDays() * 24 * 60 * 60;
}
// 剩余时间
long flowRemainingTime = limitedTime - Duration.between(mail.getFlowLimitedLastHandlerTime(), LocalDateTime.now()).getSeconds();
long flowRemainingTime = holidayService.getFlowRemainingTime(limitedTime, mail.getFlowLimitedLastHandlerTime());
// 剩余时间百分比
int flowRemainingTimePercentage = flowRemainingTime <= 0 ? 0 :
Long.valueOf(flowRemainingTime * 100 / limitedTime).intValue();
@ -242,6 +243,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
countersignDeptIds = countersignDeptIds.stream().distinct().collect(Collectors.toList());
LocalDateTime now = LocalDateTime.now();
Mail mail = getById(mailId);
List<MailCountersign> countersigns = mailCountersignService.list(mailId);
// 更新信件
mail.setUpdateTime(now)
.setFlowKey(nextNode.getFlowNode().getKey())
@ -251,8 +254,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
.setCountersignPromoterDeptId(AdminThreadLocal.getDeptId())
.setCountersignPromoterDeptName(AdminThreadLocal.getDeptName())
.setCountersignRequirement(countersignRequirement)
.setCountersignTotal(countersignDeptIds.size())
.setCountersignCompleted(0);
.setCountersignTotal(countersignDeptIds.size() + countersigns.size())
.setCountersignCompleted(countersigns.size());
updateById(mail);
Integer roleId = AdminThreadLocal.getRoleId();
@ -348,4 +351,8 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
return DateUtil.format(new Date(), "yyyyMMddHHMM") + MailSource.Source.get(source).getKey() + zeroString + seqVal;
}
public boolean exists(String mailId) {
return exists(new LambdaQueryWrapper<Mail>().eq(Mail::getId, mailId));
}
}

16
mailbox-lan/src/main/java/com/biutag/lan/service/WorkService.java

@ -1,6 +1,7 @@
package com.biutag.lan.service;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -17,8 +18,10 @@ import com.biutag.lan.domain.vo.MailExcel;
import com.biutag.lan.domain.vo.QueryMailVo;
import com.biutag.lan.domain.vo.WorkVo;
import com.biutag.lan.enums.WorkType;
import com.biutag.lan.flow.Flow;
import com.biutag.lan.flow.FlowNameEnum;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.flow.node.FirstSignFlow;
import com.biutag.lan.mapper.MailCategoryMapper;
import com.biutag.lan.mapper.MailLabelMapper;
import com.biutag.lan.mapper.MailMapper;
@ -59,6 +62,8 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
@Resource
private DeptMapper deptMapper;
private final IHolidayService holidayService;
public boolean saveBatch(List<MailSource> mailSources) {
LocalDateTime now = LocalDateTime.now();
List<Work> list = mailSources.stream().map(mail -> {
@ -239,7 +244,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
}
// 排序
queryWrapper.orderByDesc("w.update_time");
Page<WorkVo> workVoPage = baseMapper.selectPage(page, queryWrapper);
Page<WorkVo> workVoPage = baseMapper.selectPageBy(page, queryWrapper);
workVoPage.getRecords().forEach(item -> {
// 会签中
if (FlowNameEnum.COUNTERSIGNING.getName().equals(item.getFlowName())) {
@ -249,6 +254,12 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
item.setFlowName(String.format("%s(%s/%s)", item.getFlowName(), item.getCountersignCompleted(), item.getCountersignTotal()));
}
}
if (Objects.nonNull(item.getLimitedTime())) {
item.setFlowLimitedRemainingTime(holidayService.getFlowRemainingTime(item.getLimitedTime(), item.getFlowLimitedLastHandlerTime()));
} else {
Flow flow = SpringUtil.getBean(FirstSignFlow.class);
item.setFlowLimitedRemainingTime(holidayService.getFlowRemainingTime(flow.getFlowNode().getLimitedTime(), item.getCreateTime()));
}
});
return workVoPage;
}
@ -291,7 +302,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
}
public Integer count(String flowKey, Integer deptId) {
return baseMapper.selectCount(flowKey, deptId);
return baseMapper.selectCountBy(flowKey, deptId);
}
public Integer count(Collection<String> flowKeys, Integer deptId) {
@ -461,4 +472,5 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
EasyExcel.read(file.getInputStream(), MailExcel.class, excelService).sheet().doRead();
return AjaxResult.success(excelService.getResult());
}
}

41
mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java

@ -1,8 +1,11 @@
package com.biutag.lan.service.impl;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.constants.AppConstants;
import com.biutag.lan.validate.commons.PageValidate;
import com.biutag.lan.service.IHolidayService;
import com.biutag.lan.validate.system.HolidayCreateValidate;
@ -19,6 +22,8 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.*;
/**
@ -73,6 +78,12 @@ public class HolidayServiceImpl implements IHolidayService {
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
}
@Override
public List<Holiday> list(List<String> dates) {
LambdaQueryWrapper<Holiday> queryWrapper = new LambdaQueryWrapper<Holiday>().in(Holiday::getDate, dates);
return holidayMapper.selectList(queryWrapper);
}
/**
* 节假日详情
*
@ -103,9 +114,6 @@ public class HolidayServiceImpl implements IHolidayService {
@Override
public void add(HolidayCreateValidate createValidate) {
Holiday model = new Holiday();
model.setStartDate(createValidate.getStartDate());
model.setHolidayName(createValidate.getHolidayName());
model.setEndDate(createValidate.getEndDate());
holidayMapper.insert(model);
}
@ -125,9 +133,6 @@ public class HolidayServiceImpl implements IHolidayService {
Assert.notNull(model, "数据不存在!");
model.setId(updateValidate.getId());
model.setStartDate(updateValidate.getStartDate());
model.setHolidayName(updateValidate.getHolidayName());
model.setEndDate(updateValidate.getEndDate());
holidayMapper.updateById(model);
}
@ -149,4 +154,28 @@ public class HolidayServiceImpl implements IHolidayService {
holidayMapper.delete(new QueryWrapper<Holiday>().eq("id", id));
}
/**
* 获取剩余时间
* @return
*/
public long getFlowRemainingTime(long limitedTime, LocalDateTime flowLimitedLastHandlerTime) {
// 86400 s 一天
if (limitedTime < 86400) {
return limitedTime - Duration.between(flowLimitedLastHandlerTime, LocalDateTime.now()).getSeconds();
}
LocalDateTime now = LocalDateTime.now();
String nowDate = now.format(DatePattern.NORM_DATE_FORMATTER);
ArrayList<String> dates = new ArrayList<>();
for (LocalDateTime dateTime = flowLimitedLastHandlerTime; dateTime.isBefore(now); dateTime = dateTime.plusDays(1)) {
dates.add(dateTime.format(DatePattern.NORM_DATE_FORMATTER));
}
List<Holiday> list = list(dates);
long holidays = list.stream().filter(item -> item.getHolidayFlag().equals(AppConstants.YES) && !item.getDate().equals(nowDate)).count();
long todaySeconds = list.stream().anyMatch(item -> item.getHolidayFlag().equals(AppConstants.YES) && item.getDate().equals(nowDate)) ? 0 :
// 当天的时间差
Duration.between(now, now.toLocalDate().atStartOfDay()).getSeconds();
limitedTime += 86400 * holidays + todaySeconds;
return limitedTime - Duration.between(flowLimitedLastHandlerTime, LocalDateTime.now()).getSeconds();
}
}

33
mailbox-lan/src/main/java/com/biutag/lan/service/impl/PoliceUserServiceImpl.java

@ -13,6 +13,7 @@ import com.biutag.exception.OperateException;
import com.biutag.lan.config.AdminThreadLocal;
import com.biutag.lan.enums.PostEnums;
import com.biutag.lan.mapper.PoliceUserMapper;
import com.biutag.lan.service.IDeptService;
import com.biutag.lan.service.IPermService;
import com.biutag.lan.service.IPoliceUserService;
import com.biutag.lan.validate.commons.PageValidate;
@ -20,10 +21,7 @@ import com.biutag.lan.validate.system.PoliceUserCreateValidate;
import com.biutag.lan.validate.system.PoliceUserSearchValidate;
import com.biutag.lan.validate.system.PoliceUserUpInfoValidate;
import com.biutag.lan.validate.system.PoliceUserUpdateValidate;
import com.biutag.lan.vo.system.PoliceUserDetailVo;
import com.biutag.lan.vo.system.PoliceUserInformVo;
import com.biutag.lan.vo.system.PoliceUserListedVo;
import com.biutag.lan.vo.system.PoliceUserSelvesVo;
import com.biutag.lan.vo.system.*;
import com.biutag.mapper.system.MenuMapper;
import com.biutag.mapper.system.PoliceDepartMapper;
import com.biutag.mapper.system.PolicePositionMapper;
@ -61,6 +59,9 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
@Resource
IPermService iPermService;
@Resource
IDeptService deptService;
/**
* 管理员列表
*
@ -74,7 +75,7 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
Integer page = pageValidate.getPageNo();
Integer limit = pageValidate.getPageSize();
QueryWrapper<PoliceUser> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StrUtil.isNotBlank(searchValidate.getEmpNo()), "u.emp_no", searchValidate.getEmpNo())
queryWrapper.eq(StrUtil.isNotBlank(searchValidate.getEmpNo()), "u.emp_no", StrUtil.trim(searchValidate.getEmpNo()))
.like(StrUtil.isNotBlank(searchValidate.getName()), "u.name", searchValidate.getName())
.like(StrUtil.isNotBlank(searchValidate.getIdCode()), "u.id_code", searchValidate.getIdCode())
.eq(Objects.nonNull(searchValidate.getRole()), "u.role_ids", searchValidate.getRole())
@ -134,7 +135,6 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
.like("emp_no", searchName).or()
.like("mobile", searchName)
.orderByDesc( "sort");
return policeUserMapper.selectList(queryWrapper);
}
@ -276,8 +276,10 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
PoliceUser model = new PoliceUser();
model.setRoleIds(createValidate.getRoleIds().toString());
this.batchSaveRoleByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getRoleIds()));
DeptVo deptVo = deptService.detail(createValidate.getDeptIds());
model.setDeptIds(createValidate.getDeptIds().toString());
model.setDeptName(deptVo.getName());
this.batchSaveDepartByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getDeptIds()));
model.setPostIds(createValidate.getPostIds().toString());
this.batchSavePositionByEmpNo(createValidate.getEmpNo(), Arrays.asList(createValidate.getPostIds()));
@ -331,18 +333,15 @@ public class PoliceUserServiceImpl implements IPoliceUserService {
Assert.notNull(policeUser, "警号已存在换一个吧!");
PoliceUser model = new PoliceUser();
model.setId(updateValidate.getId());
if(Objects.nonNull(updateValidate.getRoleIds())) {
model.setRoleIds(updateValidate.getRoleIds().toString());
if(!policeUser.getRoleIds().equals(model.getRoleIds())){
this.batchSaveRoleByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getRoleIds()));
}
model.setRoleIds(updateValidate.getRoleIds().toString());
if(!policeUser.getRoleIds().equals(model.getRoleIds())){
this.batchSaveRoleByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getRoleIds()));
}
if(StringUtils.isNotNull(updateValidate.getDeptIds())) {
if(!policeUser.getDeptIds().equals(model.getDeptIds())){
this.batchSaveDepartByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getDeptIds()));
}
}
DeptVo deptVo = deptService.detail(updateValidate.getDeptIds());
model.setDeptIds(updateValidate.getDeptIds().toString());
model.setDeptName(deptVo.getName());
if(StringUtils.isNotNull(updateValidate.getPostIds())) {
if(!policeUser.getPostIds().equals(model.getPostIds())){
this.batchSavePositionByEmpNo(updateValidate.getEmpNo(), Collections.singletonList(updateValidate.getPostIds()));

10
mailbox-lan/src/main/java/com/biutag/lan/vo/system/HolidayVo.java

@ -0,0 +1,10 @@
package com.biutag.lan.vo.system;
import lombok.Data;
@Data
public class HolidayVo {
private String date;
private String holidayFlag;
private String detail;
}

2
mailbox-lan/src/main/resources/application.yml

@ -32,7 +32,7 @@ sa-token:
token-name: admin # token的名称
timeout: 2592000 # token有效期单位s(默认30天,-1代表永不过期)
active-timeout: -1 # token临时有效期(指定时间无操作掉线)
is-concurrent: true # 是否允许同一账号并发登录
is-concurrent: false # 是否允许同一账号并发登录
is-share: false # 多人同登账号共用token
token-style: random-64 # token生成的风格
is-print: false # 打印版本字符画

39
mailbox-lan/src/main/resources/mapper/WorkMapper.xml

@ -4,16 +4,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.biutag.lan.mapper.WorkMapper">
<select id="selectPage" resultType="com.biutag.lan.domain.vo.WorkVo">
select w.id, w.contact_name, w.contact_phone, w.contact_id_card, w.content, w.source, w.mail_time, w.mail_id, w.work_type,w.flow_name,
m.mail_state, m.mail_category, m.mail_level, m.three_dept_id, m.three_dept_name, m.flow_key, m.mail_labels, m.countersign_total, m.countersign_completed,
m.flow_name mail_flow_name, m.current_operator,
<!-- 当前流程剩余多少时间(秒) -->
f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time
from work w
left join mail m on w.mail_id = m.id
left join flow_node f on m.flow_key = f.key
${ew.getCustomSqlSegment}
<select id="selectPageBy" resultType="com.biutag.lan.domain.vo.WorkVo">
select w.id,
w.contact_name,
w.contact_phone,
w.contact_id_card,
w.content,
w.source,
w.mail_time,
w.mail_id,
w.work_type,
w.flow_name,
m.mail_state,
m.mail_category,
m.mail_level,
m.three_dept_id,
m.three_dept_name,
m.flow_key,
m.mail_labels,
m.countersign_total,
m.countersign_completed,
m.flow_name mail_flow_name,
m.current_operator,
f.limited_time,
m.flow_limited_last_handler_time,
w.create_time
from work w
left join mail m on w.mail_id = m.id
left join flow_node f on m.flow_key = f.key
${ew.getCustomSqlSegment}
</select>
<select id="selectCountByFlowKey" resultType="int">

11
mailbox-lan/src/test/java/com/biutag/lan/FlowTest.java

@ -1,12 +1,19 @@
package com.biutag.lan;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import org.junit.jupiter.api.Test;
import java.util.Date;
public class FlowTest {
@Test
public void buildFlow() {
String originName = "123 11.jpg";
String filepath = DateUtil.format(new Date(), "YYMMdd") + "/" + IdUtil.nanoId(8) +
(StrUtil.isNotBlank(originName) && originName.contains(".") ? originName.substring(originName.lastIndexOf(".")) : "");
System.out.println(filepath);
}
}

4
mailbox-outer-admin/src/main/java/com/biutag/outeradmin/controller/LoginController.java

@ -6,7 +6,6 @@ import com.biutag.enums.ErrorEnum;
import com.biutag.outeradmin.dto.LoginFormData;
import com.biutag.outeradmin.dto.TokenDTO;
import com.biutag.outeradmin.entity.User;
import com.biutag.outeradmin.mapper.UserMapper;
import com.biutag.outeradmin.service.UserService;
import com.biutag.outeradmin.util.JwtUtil;
import jakarta.servlet.http.HttpServletRequest;
@ -21,13 +20,12 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
public class LoginController {
private final UserService userService;
private final UserMapper userMapper;
private static String randomCaptcha = "";
@RequestMapping("/login")
public TokenDTO login(@RequestBody String formData, HttpServletRequest request) {
public TokenDTO login(@RequestBody String formData) {
LoginFormData data = JSON.parseObject(formData, LoginFormData.class);
TokenDTO tokens = new TokenDTO();
if (!data.getCaptcha().equals(randomCaptcha)) {

2
sql/240304.sql

@ -0,0 +1,2 @@
INSERT INTO "mailbox"."dict_data"("id", "type_id", "name", "value", "remark", "sort", "status", "is_delete", "create_time", "update_time", "delete_time") VALUES (62, 7, '信访投诉', 'petition_complaints', NULL, 0, 1, 0, 1709014562, 1709014562, 0);
INSERT INTO "mailbox"."dict_data"("id", "type_id", "name", "value", "remark", "sort", "status", "is_delete", "create_time", "update_time", "delete_time") VALUES (63, 7, '新闻舆情', 'news_opinion', NULL, 0, 1, 0, 1709014605, 1709014605, 0);

4
truncate.sql

@ -8,10 +8,10 @@ truncate table mail_extension_approval;
truncate table mail_countersign;
truncate table mail_return;
truncate table mail_label;
truncate table mail_mark;
truncate table work;
truncate table favorite;
truncate table mail_mark;
truncate table system_log_operate;
truncate table system_log_login;

Loading…
Cancel
Save