diff --git a/flow.json b/flow.json
index e69de29..752e1f9 100644
--- a/flow.json
+++ b/flow.json
@@ -0,0 +1,3 @@
+{
+ "base64": "data:image/jpg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQAAAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAB2qADAAQAAAABAAAAMgAAAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgAMgHaAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMADw8PDw8PGg8PGiQaGhokMSQkJCQxPjExMTExPks+Pj4+Pj5LS0tLS0tLS1paWlpaWmlpaWlpdnZ2dnZ2dnZ2dv/bAEMBEhMTHhweNBwcNHtURVR7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7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84yM/StF7JvOee3kMTSY34AOcdOtMbTlEEcMMjRmJtwYc5POc565zQhlCOVpNTnkmXYiwjcp6456+9QN9ritEMvz2bEEj+NVzxz0I/WtyK0SNX8w72l++x79qhNg7L5LzM0XTZgdPTPWmFzRGMcUUUUiT//R7GiiiszMKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/0uxooorMzCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k="
+}
\ No newline at end of file
diff --git a/mailbox-lan/pom.xml b/mailbox-lan/pom.xml
index ea9d3bc..e99659a 100644
--- a/mailbox-lan/pom.xml
+++ b/mailbox-lan/pom.xml
@@ -39,6 +39,19 @@
spring-boot-starter-websocket
+
+ jakarta.websocket
+ jakarta.websocket-api
+ 2.2.0-M1
+ provided
+
+
+ jakarta.websocket
+ jakarta.websocket-client-api
+ 2.2.0-M1
+ provided
+
+
com.tongweb.springboot
tongweb-spring-boot-starter-3.x
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/config/WebSocketConfig.java b/mailbox-lan/src/main/java/com/biutag/lan/config/WebSocketConfig.java
new file mode 100644
index 0000000..8e6180e
--- /dev/null
+++ b/mailbox-lan/src/main/java/com/biutag/lan/config/WebSocketConfig.java
@@ -0,0 +1,24 @@
+package com.biutag.lan.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
+import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+
+@EnableWebSocketMessageBroker
+@Configuration
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+
+ @Override
+ public void configureMessageBroker(MessageBrokerRegistry registry) {
+ registry.setApplicationDestinationPrefixes("/app");
+ registry.enableSimpleBroker("/topic","/queue");
+ }
+
+ @Override
+ public void registerStompEndpoints(StompEndpointRegistry registry) {
+ registry.addEndpoint("/port").setAllowedOriginPatterns("*").withSockJS();
+ }
+
+}
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/ApiV1Controller.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/ApiV1Controller.java
index 5f85fbd..242651c 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/controller/ApiV1Controller.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/ApiV1Controller.java
@@ -2,22 +2,28 @@ package com.biutag.lan.controller;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.MD5;
-import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.biutag.config.Minio;
import com.biutag.core.AjaxResult;
+import com.biutag.entity.system.Holiday;
import com.biutag.exception.AuthException;
import com.biutag.exception.BusinessException;
+import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailSource;
+import com.biutag.lan.domain.bo.HolidayV1Req;
import com.biutag.lan.domain.bo.MailApiV1Req;
+import com.biutag.lan.domain.bo.MailEvaluateApiV1Req;
+import com.biutag.lan.service.HolidayService;
+import com.biutag.lan.service.MailService;
import com.biutag.lan.service.MailSourceService;
+import com.biutag.util.IOUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.Valid;
-import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.simpleframework.xml.core.Validate;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.Collections;
@@ -32,10 +38,17 @@ public class ApiV1Controller {
private final MailSourceService mailSourceService;
+ private final MailService mailService;
+
+ private final HolidayService holidayService;
+
private final Minio minio;
private final String key = "mailbox";
+ @Value("${spring.profiles.active}")
+ private String active;
+
@PostMapping("mail")
public AjaxResult addMail(@RequestBody @Valid MailApiV1Req mail, HttpServletRequest request) {
validAuth(request);
@@ -45,7 +58,10 @@ public class ApiV1Controller {
if (StrUtil.isNotBlank(mail.getAttachments())) {
List attachments = JSON.parseArray(mail.getAttachments()).toList(JSONObject.class);
for (JSONObject attachment : attachments) {
- //minio.upload(IOUtil.base64ToStream(attachment.getString("base64")), attachment.getString("filepath"), true);
+ if (active.equals("dev")) {
+ continue;
+ }
+ minio.upload(IOUtil.base64ToStream(attachment.getString("base64")), attachment.getString("filepath"), true);
attachment.remove("base64");
}
mail.setAttachments(JSON.toJSONString(attachments));
@@ -54,6 +70,30 @@ public class ApiV1Controller {
return AjaxResult.success();
}
+ @PutMapping("mail/evaluate")
+ public AjaxResult updateMail(@RequestBody @Valid MailEvaluateApiV1Req req, HttpServletRequest request) {
+ validAuth(request);
+ Mail mail = mailService.getById(req.getId());
+ if (Objects.isNull(mail)) {
+ throw new BusinessException("信件不存在或信件还未签收");
+ }
+ mail.setSatisfaction(mail.getSatisfaction());
+ mailService.updateById(mail);
+ return AjaxResult.success();
+ }
+
+ @PostMapping("holiday")
+ public AjaxResult addHoliday(@RequestBody @Valid List holidays, HttpServletRequest request) {
+ validAuth(request);
+ for (HolidayV1Req holiday : holidays) {
+ if (holidayService.exists(new LambdaQueryWrapper().eq(Holiday::getDate, holiday.getDate()))) {
+ continue;
+ }
+ holidayService.save(holiday.toEntity());
+ }
+ return AjaxResult.success();
+ }
+
private void validAuth(HttpServletRequest request) {
String authorization = request.getHeader("Authorization");
String timestamp = request.getHeader("timestamp");
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/FileController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/FileController.java
index 2fcc698..88d8bd7 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/controller/FileController.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/FileController.java
@@ -39,7 +39,11 @@ public class FileController {
@PostMapping("upload/base64")
public AjaxResult upload(@RequestBody JSONObject file) {
log.info("文件上传 base64: {}", file.toJSONString());
- String filepath = minio.upload(file.getString("base64"));
+ String base64 = file.getString("base64");
+ if (base64.startsWith("data:image")) {
+ base64 = base64.substring(base64.indexOf(",") + 1);
+ }
+ String filepath = minio.upload(base64);
return AjaxResult.success(JSONObject.of("filepath", filepath));
}
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java
index df5bc1d..52662cd 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/HomeController.java
@@ -100,7 +100,7 @@ public class HomeController {
// 今日办结
long completedToday = mailMarkService.countByCompleted(today);
// 累计来信
- long mailTotal = mailSourceService.count();
+ long mailTotal = mailMarkService.count();
// 累计办结
long completedTotal = mailMarkService.countByCompleted();
// 累计办结
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
index 44c12ff..d630177 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/Mail.java
@@ -315,6 +315,11 @@ public class Mail {
*/
private String currentOperator;
+ /**
+ * 申请延期ID
+ */
+ private String extensionRequestId;
+
/**
* 是否申请延期
*/
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailExtensionApproval.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailExtensionApproval.java
index dba9f96..138ded0 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/domain/MailExtensionApproval.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/MailExtensionApproval.java
@@ -15,6 +15,9 @@ public class MailExtensionApproval {
@TableId(type = IdType.AUTO)
private Integer id;
+
+ private String requestId;
+
/**
*
*/
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/HolidayV1Req.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/HolidayV1Req.java
new file mode 100644
index 0000000..d333534
--- /dev/null
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/HolidayV1Req.java
@@ -0,0 +1,31 @@
+package com.biutag.lan.domain.bo;
+
+import com.biutag.entity.system.Holiday;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.beans.BeanUtils;
+
+@Setter
+@Getter
+public class HolidayV1Req {
+
+ @NotBlank
+ private String date;
+
+ @NotBlank
+ private String holidayFlag;
+
+ @NotNull
+ private String detail;
+
+ @NotNull
+ private Integer year;
+
+ public Holiday toEntity() {
+ Holiday holiday = new Holiday();
+ BeanUtils.copyProperties(this, holiday);
+ return holiday;
+ }
+}
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailApiV1Req.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailApiV1Req.java
index 0459115..1f2978f 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailApiV1Req.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailApiV1Req.java
@@ -3,6 +3,7 @@ package com.biutag.lan.domain.bo;
import com.biutag.lan.domain.MailSource;
import com.biutag.validator.annotation.IdCard;
import com.biutag.validator.annotation.Phone;
+import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
@@ -67,7 +68,7 @@ public class MailApiV1Req {
* 创建时间
*/
@NotNull
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
/**
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailEvaluateApiV1Req.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailEvaluateApiV1Req.java
new file mode 100644
index 0000000..9e1590b
--- /dev/null
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/bo/MailEvaluateApiV1Req.java
@@ -0,0 +1,23 @@
+package com.biutag.lan.domain.bo;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class MailEvaluateApiV1Req {
+
+ /**
+ *
+ */
+ @NotBlank
+ private String id;
+
+ /**
+ * 满意读
+ */
+ @NotBlank
+ private String satisfaction;
+
+}
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailExtensionApprovalVo.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailExtensionApprovalVo.java
new file mode 100644
index 0000000..ab33361
--- /dev/null
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailExtensionApprovalVo.java
@@ -0,0 +1,20 @@
+package com.biutag.lan.domain.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+@Accessors(chain = true)
+@Setter
+@Getter
+public class MailExtensionApprovalVo {
+
+ private String name;
+
+ private Boolean active;
+
+ private Boolean returnFlag;
+
+ private String comment;
+
+}
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
index 698bc5c..46a5875 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
@@ -358,7 +358,7 @@ public class MailVo {
*/
private List countersigns = new ArrayList<>();
- private List extensionApprovals = new ArrayList<>();
+ private List extensionApprovals = new ArrayList<>();
public static MailVo of(Mail mail) {
MailVo mailVo = new MailVo();
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java
index d360982..12a2c39 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/FirstApprovalFlow.java
@@ -81,6 +81,9 @@ public class FirstApprovalFlow extends Flow {
mailService.updateById(mail);
// 认定办结
MailMark mailMark = mailMarkService.getById(mailId);
+ if (Objects.isNull(mailMark)) {
+ mailMark = new MailMark().setMailId(mailId);
+ }
mailMark.setSecondDeptId(mail.getSecondDeptId())
.setSecondDeptName(mail.getSecondDeptName())
.setThreeDeptId(mail.getThreeDeptId())
@@ -89,7 +92,7 @@ public class FirstApprovalFlow extends Flow {
.setCompletionTime(now)
.setResolved(problemSolvingStatus ? AppConstants.TRUE : AppConstants.FALSE)
.setSatisfied("非常满意".equals(satisfactionStatus) || "基本满意".equals(satisfactionStatus) ? AppConstants.TRUE : AppConstants.FALSE);
- mailMarkService.updateById(mailMark);
+ mailMarkService.saveOrUpdate(mailMark);
}
public Flow mailReturn(String mailId, JSONObject data) {
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java
index 10c2800..a1031e7 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/flow/node/ThreeVerifyFlow.java
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.biutag.entity.system.PoliceUser;
@@ -57,6 +58,7 @@ public class ThreeVerifyFlow extends Flow {
}
throw new BusinessException();
}
+
public Flow applyExtensionSubmit(String mailId, JSONObject data) {
Integer extensionDays = data.getInteger("extensionDays");
Assert.notNull(extensionDays, "延期时长不能为空");
@@ -65,6 +67,9 @@ public class ThreeVerifyFlow extends Flow {
Mail mail = mailService.getById(mailId);
LocalDateTime now = LocalDateTime.now();
+ Work myWork = workService.getOne(mailId, RoleEnum.THREE_DEPT_CLASSES.getRoleId(), AdminThreadLocal.getDeptId());
+ myWork.setFlowName("申请延期中");
+ workService.updateById(myWork);
// 给二级机构增加待办
Work work = workService.getOne(mailId, RoleEnum.SECOND_DEPT_CLASSES.getRoleId(), mail.getSecondDeptId());
work.setWorkState(Work.State.todo.name()).setWorkType(WorkType.extension_approval.name()).setFlowName(FlowNameEnum.PENDING_APPROVAL.getName()).setUpdateTime(now);
@@ -73,7 +78,8 @@ public class ThreeVerifyFlow extends Flow {
mail.setUpdateTime(now)
.setExtensionDays(extensionDays)
.setExtensionReason(reason)
- .setExtensionState(ExtensionState.applying.name());
+ .setExtensionState(ExtensionState.applying.name())
+ .setExtensionRequestId(IdUtil.nanoId(16));
mailService.updateById(mail);
return null;
}
@@ -84,7 +90,7 @@ public class ThreeVerifyFlow extends Flow {
String verifyFollowupPolice = JSONObject
.of("name", verifyFollowupPoliceObj.getString("name"),
"empNo", verifyFollowupPoliceObj.getString("empNo"),
- "phone", verifyFollowupPoliceObj.getString("phone")).toJSONString();
+ "mobile", verifyFollowupPoliceObj.getString("mobile")).toJSONString();
JSONObject contactPolice = data.getJSONObject("contactPolice");
Mail mail = mailService.getById(mailId);
Mail source = new Mail()
diff --git a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java
index cc18e9b..f635503 100644
--- a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java
+++ b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java
@@ -18,9 +18,6 @@ import java.util.Map;
public interface DataScreenMapper extends BaseMapper {
-
-
-
List