diff --git a/libs/words/installMavenJar.bat b/libs/words/installMavenJar.bat
new file mode 100644
index 0000000..c8c3b53
--- /dev/null
+++ b/libs/words/installMavenJar.bat
@@ -0,0 +1 @@
+mvn install:install-file -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=15.8.0 -Dfile="words-15.8.0.jar" -Dpackaging=jar
\ No newline at end of file
diff --git a/libs/words/words-15.8.0.jar b/libs/words/words-15.8.0.jar
new file mode 100644
index 0000000..c0e699f
Binary files /dev/null and b/libs/words/words-15.8.0.jar differ
diff --git a/pom.xml b/pom.xml
index 1429e95..db387a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -181,6 +181,12 @@
4.9
+
+ com.aspose
+ aspose-words
+ 15.8.0
+
+
diff --git a/sql/1126.sql b/sql/1126.sql
new file mode 100644
index 0000000..a1c340a
--- /dev/null
+++ b/sql/1126.sql
@@ -0,0 +1,34 @@
+ALTER TABLE `negative`.`negative`
+ ADD COLUMN `countersign_apply_id` int;
+
+INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (21, 'apply_countersign', 'second_approve', NULL, '单位会签', 'primary', 1, 1, '发起会签', 0, NULL, 1);
+INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (22, 'countersign', 'countersign', NULL, '提交会签', 'primary', 0, 1, '提交会签', 1, 1, 0);
+INSERT INTO `negative`.`flow_action`(`id`, `action_key`, `flow_key`, `next_flow_key`, `button_label`, `button_type`, `plain`, `sort`, `action_name`, `validate_form`, `do_close`, `open_dialog`) VALUES (23, 'apply_countersign', 'first_approve', '', '单位会签', 'primary', 1, 1, '发起会签', 0, NULL, 1);
+
+
+CREATE TABLE `negative_countersign` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `countersign_apply_id` int NOT NULL,
+ `negative_id` varchar(40) NOT NULL,
+ `comments` text ,
+ `files` text ,
+ `depart_id` varchar(40) DEFAULT NULL,
+ `depart_name` varchar(255) DEFAULT NULL,
+ `create_time` datetime DEFAULT NULL,
+ `creator` varchar(255) DEFAULT NULL,
+ `creator_name` varchar(255) DEFAULT NULL,
+ `state` varchar(255) DEFAULT NULL,
+ `update_time` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 COMMENT='单位会签表';
+
+CREATE TABLE `negative_countersign_apply` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `negative_id` varchar(40) NOT NULL,
+ `requirement` text NOT NULL,
+ `create_time` datetime NOT NULL,
+ `creator` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `creator_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `create_depart_name` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 COMMENT='单位会签申请表';
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/constants/enums/CountersignState.java b/src/main/java/com/biutag/supervision/constants/enums/CountersignState.java
new file mode 100644
index 0000000..ead7778
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/constants/enums/CountersignState.java
@@ -0,0 +1,11 @@
+package com.biutag.supervision.constants.enums;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+public enum CountersignState {
+
+ uncompleted,
+ completed;
+}
diff --git a/src/main/java/com/biutag/supervision/constants/enums/DepartLevelEnum.java b/src/main/java/com/biutag/supervision/constants/enums/DepartLevelEnum.java
index 18b7a41..10e909a 100644
--- a/src/main/java/com/biutag/supervision/constants/enums/DepartLevelEnum.java
+++ b/src/main/java/com/biutag/supervision/constants/enums/DepartLevelEnum.java
@@ -7,6 +7,7 @@ import lombok.Getter;
@Getter
public enum DepartLevelEnum {
+ FIRST(0),
SECOND_CATEGORY(1),
SECOND(2),
THREE(3);
diff --git a/src/main/java/com/biutag/supervision/constants/enums/FlowNodeEnum.java b/src/main/java/com/biutag/supervision/constants/enums/FlowNodeEnum.java
index 8bbe13c..17ef861 100644
--- a/src/main/java/com/biutag/supervision/constants/enums/FlowNodeEnum.java
+++ b/src/main/java/com/biutag/supervision/constants/enums/FlowNodeEnum.java
@@ -18,6 +18,7 @@ public enum FlowNodeEnum {
FIRST_APPROVE("first_approve"),
SECOND_EXTENSION_APPROVE("second_extension_approve"),
FIRST_EXTENSION_APPROVE("first_extension_approve"),
+ COUNTERSIGN("countersign"),
COMPLETED("completed");
private String key;
diff --git a/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java b/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
index 029e10c..2b12d0e 100644
--- a/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
+++ b/src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
@@ -28,7 +28,7 @@ public enum ProblemSourcesEnum {
JJZRSJ("经济责任审计", "29"),
ZXSJ("专项审计", "30"),
- JWDC("警务评议", "2"),
+ JWDC("民意感知", "2"),
JYDC("警意调查", "3"),
CFJD("持法监督", "4"),
JCKH("检查考核", "8"),
diff --git a/src/main/java/com/biutag/supervision/controller/FileController.java b/src/main/java/com/biutag/supervision/controller/FileController.java
index a1dd2d9..a9893c8 100644
--- a/src/main/java/com/biutag/supervision/controller/FileController.java
+++ b/src/main/java/com/biutag/supervision/controller/FileController.java
@@ -4,6 +4,7 @@ import cn.hutool.core.io.IoUtil;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.FileVo;
import com.biutag.supervision.service.FileService;
+import com.biutag.supervision.util.WordUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
+import java.io.InputStream;
@Slf4j
@RequiredArgsConstructor
@@ -40,7 +42,11 @@ public class FileController {
} else {
response.setContentType("application/octet-stream");
}
- IoUtil.copy(fileService.download(filePath), response.getOutputStream());
+ InputStream is = fileService.download(filePath);
+ if (filePath.toLowerCase().endsWith(".doc")) {
+ is = WordUtil.convertDocx(is);
+ }
+ IoUtil.copy(is, response.getOutputStream());
}
}
diff --git a/src/main/java/com/biutag/supervision/flow/FlowService.java b/src/main/java/com/biutag/supervision/flow/FlowService.java
index a7f5da8..a74dcda 100644
--- a/src/main/java/com/biutag/supervision/flow/FlowService.java
+++ b/src/main/java/com/biutag/supervision/flow/FlowService.java
@@ -32,7 +32,7 @@ public class FlowService {
public Boolean execute(ActionDto actionDto) {
Action action = actions
.stream()
- .filter(item -> item.getClass().getName().contains(StrUtil.upperFirst(StrUtil.toCamelCase(actionDto.getActionKey()))))
+ .filter(item -> item.getClass().getSimpleName().startsWith(StrUtil.upperFirst(StrUtil.toCamelCase(actionDto.getActionKey()))))
.findFirst()
.orElseThrow(() -> new RuntimeException("配置异常,请联系系统管理员"));
action.next(actionDto);
diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
index ee96306..a953bf0 100644
--- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
+++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java
@@ -95,7 +95,7 @@ public class ApplyCompletionAction implements Action {
}
negativeBlame
- .setBlameId(IdUtil.fastSimpleUUID())
+ .setBlameId(IdUtil.getSnowflakeNextIdStr())
.setNegativeId(negativeId)
.setCrtTime(now)
.setUpdTime(now);
diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCountersignAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCountersignAction.java
new file mode 100644
index 0000000..f6c084b
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCountersignAction.java
@@ -0,0 +1,107 @@
+package com.biutag.supervision.flow.action;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.biutag.supervision.common.UserContextHolder;
+import com.biutag.supervision.constants.enums.*;
+import com.biutag.supervision.pojo.dto.ActionDto;
+import com.biutag.supervision.pojo.dto.flow.ApplyCountersignData;
+import com.biutag.supervision.pojo.entity.*;
+import com.biutag.supervision.pojo.model.UserAuth;
+import com.biutag.supervision.service.*;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+@RequiredArgsConstructor
+@Component
+public class ApplyCountersignAction implements Action {
+
+ private final NegativeCountersignApplyService countersignApplyService;
+
+ private final NegativeCountersignService countersignService;
+
+ private final NegativeService negativeService;
+
+ private final NegativeWorkService workService;
+
+ private final SupDepartService departService;
+
+ @Override
+ public void next(ActionDto actionDto) {
+ ApplyCountersignData applyCountersignData = BeanUtil.toBean(actionDto.getData(), ApplyCountersignData.class);
+ addWork(actionDto, applyCountersignData);
+ addCountersign(actionDto.getNegativeId(), applyCountersignData);
+ }
+
+ private void addCountersign(String negativeId, ApplyCountersignData applyCountersignData) {
+ UserAuth user = UserContextHolder.getCurrentUser();
+ NegativeCountersignApply countersignApply = new NegativeCountersignApply();
+ countersignApply.setNegativeId(negativeId)
+ .setRequirement(applyCountersignData.getRequirement())
+ .setCreateTime(LocalDateTime.now())
+ .setCreator(user.getUserName())
+ .setCreatorName(user.getNickName());
+ countersignApplyService.save(countersignApply);
+ Set departIds = applyCountersignData.getCountersignDeparts().stream().map(ApplyCountersignData.CountersignDepart::getId).collect(Collectors.toSet());
+
+ List countersigns = departIds.stream().map(departId -> {
+ NegativeCountersign countersign = new NegativeCountersign();
+ countersign.setCountersignApplyId(countersignApply.getId())
+ .setNegativeId(negativeId)
+ .setDepartId(departId)
+ .setDepartName(departService.getById(departId).getShortName())
+ .setState(CountersignState.uncompleted.name())
+ .setCreateTime(LocalDateTime.now());
+ return countersign;
+ }).toList();
+ countersignService.saveBatch(countersigns);
+ // 更新
+ negativeService.update(new LambdaUpdateWrapper().eq(Negative::getId, negativeId)
+ .set(Negative::getCountersignApplyId, countersignApply.getId())
+ .set(Negative::getUpdTime, LocalDateTime.now()));
+ }
+
+ private void addWork(ActionDto actionDto, ApplyCountersignData applyCountersignData) {
+ List works = workService.list(actionDto.getNegativeId());
+ Set departIds = applyCountersignData.getCountersignDeparts().stream()
+ .map(ApplyCountersignData.CountersignDepart::getId)
+ .collect(Collectors.toSet());
+ List filterWorks = works.stream().filter(item -> !FlowNodeEnum.COUNTERSIGN.getKey().equals(item.getFlowKey()) && departIds.contains(item.getDepartId())).toList();
+ if (!filterWorks.isEmpty()) {
+ throw new RuntimeException(String.format("办理单位【%s】不能参与会签", filterWorks.stream().map(NegativeWork::getDepartName).collect(Collectors.joining("、"))));
+ }
+ List workDepartIds = works.stream().filter(item -> FlowNodeEnum.COUNTERSIGN.getKey().equals(item.getFlowKey()) && departIds.contains(item.getDepartId())).map(NegativeWork::getDepartId).toList();
+ if (!workDepartIds.isEmpty()) {
+ // 删除 之前work记录,避免重复
+ workService.remove(new LambdaQueryWrapper().eq(NegativeWork::getNegativeId, actionDto.getNegativeId()).in(NegativeWork::getDepartId, workDepartIds));
+ }
+ Integer workId = actionDto.getWorkId();
+ NegativeWork work = workService.getById(workId);
+ List negativeWorks = departIds.stream().map(departId -> {
+ NegativeWork w = new NegativeWork();
+ SupDepart depart = departService.getById(departId);
+ w.setRoleCode(depart.getLevel().equals(DepartLevelEnum.SECOND.getValue()) ? RoleCodeEnum.SECOND_ADMIN.getCode() : RoleCodeEnum.THREE_ADMIN.getCode())
+ .setStatus(WorkStatusEnum.todo.name())
+ .setDepartId(departId)
+ .setNegativeId(actionDto.getNegativeId())
+ .setDepartName(depart.getShortName())
+ .setProblemSourcesCode(work.getProblemSourcesCode())
+ .setCreateTime(LocalDateTime.now())
+ .setUpdateTime(LocalDateTime.now())
+ .setFlowKey("countersign");
+ return w;
+ }).toList();
+ workService.saveBatch(negativeWorks);
+ }
+
+}
diff --git a/src/main/java/com/biutag/supervision/flow/action/CountersignAction.java b/src/main/java/com/biutag/supervision/flow/action/CountersignAction.java
new file mode 100644
index 0000000..d8fb16f
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/flow/action/CountersignAction.java
@@ -0,0 +1,61 @@
+package com.biutag.supervision.flow.action;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.biutag.supervision.constants.enums.CountersignState;
+import com.biutag.supervision.constants.enums.WorkStatusEnum;
+import com.biutag.supervision.pojo.dto.ActionDto;
+import com.biutag.supervision.pojo.dto.flow.CountersignData;
+import com.biutag.supervision.pojo.entity.Negative;
+import com.biutag.supervision.pojo.entity.NegativeCountersign;
+import com.biutag.supervision.pojo.entity.NegativeWork;
+import com.biutag.supervision.service.NegativeCountersignService;
+import com.biutag.supervision.service.NegativeService;
+import com.biutag.supervision.service.NegativeWorkService;
+import com.biutag.supervision.util.JSON;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+@RequiredArgsConstructor
+@Component
+public class CountersignAction implements Action {
+
+ private final NegativeCountersignService countersignService;
+
+ private final NegativeService negativeService;
+
+ private final NegativeWorkService workService;
+
+ @Override
+ public void next(ActionDto actionDto) {
+ CountersignData countersignData = BeanUtil.toBean(actionDto.getData(), CountersignData.class);
+ addWork(actionDto.getWorkId());
+ updateCountersign(actionDto.getNegativeId(), actionDto.getWorkId(), countersignData);
+ }
+
+ public void updateCountersign(String negativeId, Integer workId, CountersignData countersignData) {
+ Negative negative = negativeService.getById(negativeId);
+ NegativeWork work = workService.getById(workId);
+ countersignService.update(new LambdaUpdateWrapper()
+ .eq(NegativeCountersign::getNegativeId, negativeId)
+ .eq(NegativeCountersign::getCountersignApplyId, negative.getCountersignApplyId())
+ .eq(NegativeCountersign::getDepartId, work.getDepartId())
+ .set(NegativeCountersign::getComments, countersignData.getComments())
+ .set(NegativeCountersign::getFiles, Objects.isNull(countersignData.getFiles()) || countersignData.getFiles().isEmpty() ? null :
+ JSON.toJSONString(countersignData.getFiles()))
+ .set(NegativeCountersign::getState, CountersignState.completed.name())
+ .set(NegativeCountersign::getUpdateTime, LocalDateTime.now()));
+ }
+
+ public void addWork(Integer workId) {
+ workService.update(new LambdaUpdateWrapper().eq(NegativeWork::getId, workId).set(NegativeWork::getStatus, WorkStatusEnum.done.name()).set(NegativeWork::getUpdateTime, LocalDateTime.now()));
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/flow/action/FirstExtensionReturnAction.java b/src/main/java/com/biutag/supervision/flow/action/FirstExtensionReturnAction.java
index 0ecbce5..2f40e03 100644
--- a/src/main/java/com/biutag/supervision/flow/action/FirstExtensionReturnAction.java
+++ b/src/main/java/com/biutag/supervision/flow/action/FirstExtensionReturnAction.java
@@ -47,10 +47,12 @@ public class FirstExtensionReturnAction implements Action {
}
public void addExtensionApprove(ActionDto actionDto, String comments) {
+ Negative negative = negativeService.getById(actionDto.getNegativeId());
UserAuth user = UserContextHolder.getCurrentUser();
NegativeWork work = workService.getById(actionDto.getWorkId());
NegativeExtensionApprove extensionApprove = new NegativeExtensionApprove()
.setNegativeId(actionDto.getNegativeId())
+ .setNegativeExtensionApplyId(negative.getNegativeExtensionApplyId())
.setComments(comments)
.setHandlerDepartId(work.getDepartId())
.setHandlerDepartName(work.getDepartName())
diff --git a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java
index 705ee8d..9fcb61e 100644
--- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java
+++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java
@@ -72,8 +72,8 @@ public class SaveAction implements Action {
/**
* 如果涉及不为空,则先删除原有数据,再新增
*/
+ negativeBlameService.remove(negativeId);
if (!verifyData.getBlames().isEmpty()) {
- negativeBlameService.remove(negativeId);
List problemRelations = new ArrayList<>();
List negativeBlames = verifyData.getBlames().stream().map(item -> {
NegativeBlame negativeBlame = new NegativeBlame();
@@ -84,7 +84,7 @@ public class SaveAction implements Action {
BeanUtil.copyProperties(blameLeader, negativeBlame);
}
negativeBlame.setNegativeId(negativeId)
- .setBlameId(IdUtil.fastSimpleUUID())
+ .setBlameId(IdUtil.getSnowflakeNextIdStr())
.setCrtTime(LocalDateTime.now())
.setUpdTime(LocalDateTime.now());
problemRelations.addAll(item.getProblems().stream().map(problem -> {
diff --git a/src/main/java/com/biutag/supervision/flow/action/SecondExtensionReturnAction.java b/src/main/java/com/biutag/supervision/flow/action/SecondExtensionReturnAction.java
index 8f32dae..1004802 100644
--- a/src/main/java/com/biutag/supervision/flow/action/SecondExtensionReturnAction.java
+++ b/src/main/java/com/biutag/supervision/flow/action/SecondExtensionReturnAction.java
@@ -47,10 +47,12 @@ public class SecondExtensionReturnAction implements Action {
}
public void addExtensionApprove(ActionDto actionDto, String comments) {
+ Negative negative = negativeService.getById(actionDto.getNegativeId());
UserAuth user = UserContextHolder.getCurrentUser();
NegativeWork work = workService.getById(actionDto.getWorkId());
NegativeExtensionApprove extensionApprove = new NegativeExtensionApprove()
.setNegativeId(actionDto.getNegativeId())
+ .setNegativeExtensionApplyId(negative.getNegativeExtensionApplyId())
.setComments(comments)
.setHandlerDepartId(work.getDepartId())
.setHandlerDepartName(work.getDepartName())
diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeCountersignApplyMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeCountersignApplyMapper.java
new file mode 100644
index 0000000..8aea92a
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/mapper/NegativeCountersignApplyMapper.java
@@ -0,0 +1,8 @@
+package com.biutag.supervision.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.biutag.supervision.pojo.entity.NegativeCountersignApply;
+
+public interface NegativeCountersignApplyMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/mapper/NegativeCountersignMapper.java b/src/main/java/com/biutag/supervision/mapper/NegativeCountersignMapper.java
new file mode 100644
index 0000000..199f1f1
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/mapper/NegativeCountersignMapper.java
@@ -0,0 +1,8 @@
+package com.biutag.supervision.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.biutag.supervision.pojo.entity.NegativeCountersign;
+
+public interface NegativeCountersignMapper extends BaseMapper {
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/domain/CountersignApply.java b/src/main/java/com/biutag/supervision/pojo/domain/CountersignApply.java
new file mode 100644
index 0000000..d1bd1d6
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/domain/CountersignApply.java
@@ -0,0 +1,35 @@
+package com.biutag.supervision.pojo.domain;
+
+import com.biutag.supervision.pojo.entity.NegativeCountersign;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+@Accessors(chain = true)
+@Setter
+@Getter
+public class CountersignApply {
+
+ private Integer id;
+
+ private String requirement;
+
+ @JsonFormat(pattern = "YYYY-MM-dd HH:mm")
+ private LocalDateTime createTime;
+
+ private String creatorName;
+
+ private String createDepartName;
+
+ private List countersigns = new ArrayList<>();
+
+}
diff --git a/src/main/java/com/biutag/supervision/pojo/domain/ExtensionApply.java b/src/main/java/com/biutag/supervision/pojo/domain/ExtensionApply.java
index f4e7d93..476a1b1 100644
--- a/src/main/java/com/biutag/supervision/pojo/domain/ExtensionApply.java
+++ b/src/main/java/com/biutag/supervision/pojo/domain/ExtensionApply.java
@@ -1,6 +1,7 @@
package com.biutag.supervision.pojo.domain;
-import com.biutag.supervision.pojo.entity.NegativeExtensionApprove;
+import com.biutag.supervision.pojo.model.ExtensionApproveStepModel;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
@@ -14,25 +15,13 @@ import java.util.List;
@Getter
public class ExtensionApply {
- private Integer id;
-
- private String negativeId;
-
- private String handlerDepartId;
-
- private String handlerDepartName;
-
- private String handlerUserName;
-
- private String handlerName;
-
private String comments;
private Integer extensionDays;
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime createTime;
- private List approves = new ArrayList<>();
-
+ private List approveSteps = new ArrayList<>();
}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeDetail.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeDetail.java
index 7b43b21..0df4b43 100644
--- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeDetail.java
+++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeDetail.java
@@ -32,6 +32,8 @@ public class NegativeDetail {
// 延期申请
private ExtensionApply extensionApply;
+ private List countersignApplys = new ArrayList<>();
+
// 是否收藏
private Boolean isFav;
diff --git a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
index 2737e53..1712de6 100644
--- a/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
+++ b/src/main/java/com/biutag/supervision/pojo/domain/NegativeVo.java
@@ -186,6 +186,9 @@ public class NegativeVo {
// 佐证材料情况
private String verifyFileSituation;
+ // 单位会签ID
+ private Integer countersignApplyId;
+
// 涉及人员
private List blames = new ArrayList<>();
diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/ApplyCountersignData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/ApplyCountersignData.java
new file mode 100644
index 0000000..0ee1fdf
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/ApplyCountersignData.java
@@ -0,0 +1,30 @@
+package com.biutag.supervision.pojo.dto.flow;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Size;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+@Setter
+@Getter
+public class ApplyCountersignData {
+
+ @NotBlank(message = "会签具体要求不能为空")
+ private String requirement;
+
+ @Size(min = 1, message = "参与会签单位不能少于1个")
+ private List countersignDeparts = new ArrayList<>();
+
+ @Setter
+ @Getter
+ public class CountersignDepart {
+ private String id;
+ }
+}
diff --git a/src/main/java/com/biutag/supervision/pojo/dto/flow/CountersignData.java b/src/main/java/com/biutag/supervision/pojo/dto/flow/CountersignData.java
new file mode 100644
index 0000000..818a9c0
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/dto/flow/CountersignData.java
@@ -0,0 +1,23 @@
+package com.biutag.supervision.pojo.dto.flow;
+
+import com.biutag.supervision.pojo.vo.FileVo;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wxc
+ * @date 2024/11/26
+ */
+@Setter
+@Getter
+public class CountersignData {
+
+ @NotBlank(message = "会签具体要求不能为空")
+ private String comments;
+
+ private List files;
+
+}
diff --git a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java
index 44c9b3c..4b47ccb 100644
--- a/src/main/java/com/biutag/supervision/pojo/entity/Negative.java
+++ b/src/main/java/com/biutag/supervision/pojo/entity/Negative.java
@@ -267,4 +267,10 @@ public class Negative {
// 佐证材料情况
private String verifyFileSituation;
+ // 单位会签ID
+ private Integer countersignApplyId;
+
+ // 下发的单位层级
+ private Integer crtDepartLevel;
+
}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersign.java b/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersign.java
new file mode 100644
index 0000000..298f8c1
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersign.java
@@ -0,0 +1,61 @@
+package com.biutag.supervision.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDateTime;
+
+@Accessors(chain = true)
+@Setter
+@Getter
+public class NegativeCountersign {
+
+ //
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ //
+ @TableField("countersign_apply_id")
+ private Integer countersignApplyId;
+
+ //
+ @TableField("negative_id")
+ private String negativeId;
+
+ //
+ @TableField("comments")
+ private String comments;
+
+ //
+ @TableField("files")
+ private String files;
+
+ //
+ @TableField("depart_id")
+ private String departId;
+
+ //
+ @TableField("depart_name")
+ private String departName;
+
+ //
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ private LocalDateTime updateTime;
+
+ //
+ @TableField("creator")
+ private String creator;
+
+ //
+ @TableField("creator_name")
+ private String creatorName;
+
+ private String state;
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersignApply.java b/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersignApply.java
new file mode 100644
index 0000000..eeb0c10
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/entity/NegativeCountersignApply.java
@@ -0,0 +1,45 @@
+package com.biutag.supervision.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDateTime;
+
+@Accessors(chain = true)
+@Setter
+@Getter
+public class NegativeCountersignApply {
+
+ //
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ //
+ @TableField("negative_id")
+ private String negativeId;
+
+ //
+ @TableField("requirement")
+ private String requirement;
+
+ //
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ //
+ @TableField("creator")
+ private String creator;
+
+ //
+ @TableField("creator_name")
+ private String creatorName;
+
+ //
+ @TableField("create_depart_name")
+ private String createDepartName;
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/model/ExtensionApproveStepModel.java b/src/main/java/com/biutag/supervision/pojo/model/ExtensionApproveStepModel.java
new file mode 100644
index 0000000..ceed26f
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/pojo/model/ExtensionApproveStepModel.java
@@ -0,0 +1,28 @@
+package com.biutag.supervision.pojo.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author wxc
+ * @date 2024/11/25
+ */
+@AllArgsConstructor
+@Setter
+@Getter
+public class ExtensionApproveStepModel {
+
+ private String title;
+
+ private String comments;
+
+ private String state;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+ private LocalDateTime createTime;
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java b/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java
index 55b10a7..9aef049 100644
--- a/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java
+++ b/src/main/java/com/biutag/supervision/pojo/model/NegativeWorkModel.java
@@ -10,7 +10,9 @@ import java.time.LocalDateTime;
@Getter
public class NegativeWorkModel {
- private Integer id;
+ private Integer workId;
+
+ private String workFlowKey;
private String negativeId;
diff --git a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
index 92135e7..a62024e 100644
--- a/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
+++ b/src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
@@ -60,4 +60,8 @@ public class NegativeQueryParam extends BasePage {
private String order;
private String orderProp;
+ private String specialSupervision;
+
+ private String reportNumber;
+
}
diff --git a/src/main/java/com/biutag/supervision/pojo/param/WorkParam.java b/src/main/java/com/biutag/supervision/pojo/param/WorkParam.java
index 5f624b1..fad10eb 100644
--- a/src/main/java/com/biutag/supervision/pojo/param/WorkParam.java
+++ b/src/main/java/com/biutag/supervision/pojo/param/WorkParam.java
@@ -21,4 +21,6 @@ public class WorkParam extends BasePage {
private String involveDepartId;
private String handleThreeDepartId;
private String processingStatus;
+ private String checkStatus;
+ private List handleResultCode = new ArrayList<>();
}
diff --git a/src/main/java/com/biutag/supervision/service/NegativeCountersignApplyService.java b/src/main/java/com/biutag/supervision/service/NegativeCountersignApplyService.java
new file mode 100644
index 0000000..eecd565
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/service/NegativeCountersignApplyService.java
@@ -0,0 +1,30 @@
+package com.biutag.supervision.service;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.biutag.supervision.pojo.domain.CountersignApply;
+import com.biutag.supervision.pojo.entity.NegativeCountersignApply;
+import com.biutag.supervision.mapper.NegativeCountersignApplyMapper;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@RequiredArgsConstructor
+@Service
+public class NegativeCountersignApplyService extends ServiceImpl {
+
+ private final NegativeCountersignService countersignService;
+
+ public List list(String negativeId) {
+ List list = list(new LambdaQueryWrapper().eq(NegativeCountersignApply::getNegativeId, negativeId));
+ return list.stream().map(apply -> {
+ CountersignApply countersignApply = new CountersignApply();
+ BeanUtil.copyProperties(apply, countersignApply);
+ countersignApply.setCountersigns(countersignService.list(apply.getId()));
+ return countersignApply;
+ }).toList();
+ }
+
+}
diff --git a/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java b/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java
new file mode 100644
index 0000000..3ac9776
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/service/NegativeCountersignService.java
@@ -0,0 +1,19 @@
+package com.biutag.supervision.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.biutag.supervision.pojo.entity.NegativeCountersign;
+import com.biutag.supervision.mapper.NegativeCountersignMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class NegativeCountersignService extends ServiceImpl {
+
+ public List list(Integer countersignApplyId) {
+ return list(new LambdaQueryWrapper().eq(NegativeCountersign::getCountersignApplyId, countersignApplyId)
+ .orderByAsc(NegativeCountersign::getState));
+ }
+
+}
diff --git a/src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java b/src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java
index fcdda0a..1c9ba4b 100644
--- a/src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java
+++ b/src/main/java/com/biutag/supervision/service/NegativeExtensionApplyService.java
@@ -2,24 +2,52 @@ package com.biutag.supervision.service;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.biutag.supervision.constants.enums.ApproveStateEnum;
+import com.biutag.supervision.mapper.NegativeExtensionApplyMapper;
import com.biutag.supervision.pojo.domain.ExtensionApply;
+import com.biutag.supervision.pojo.entity.Negative;
import com.biutag.supervision.pojo.entity.NegativeExtensionApply;
-import com.biutag.supervision.mapper.NegativeExtensionApplyMapper;
+import com.biutag.supervision.pojo.entity.NegativeExtensionApprove;
+import com.biutag.supervision.pojo.model.ExtensionApproveStepModel;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
+import java.util.Comparator;
+import java.util.List;
+
@RequiredArgsConstructor
@Service
public class NegativeExtensionApplyService extends ServiceImpl {
private final NegativeExtensionApproveService extensionApproveService;
- public ExtensionApply get(int id) {
- NegativeExtensionApply extensionApply = getById(id);
+ public ExtensionApply get(Negative negative) {
+ NegativeExtensionApply extensionApply = getById(negative.getNegativeExtensionApplyId());
ExtensionApply apply = new ExtensionApply();
BeanUtil.copyProperties(extensionApply, apply);
- apply.setApproves(extensionApproveService.list(id));
+ List approves = extensionApproveService.list(negative.getNegativeExtensionApplyId());
+ List list = approves.stream().map(NegativeExtensionApprove::getHandlerDepartId).distinct().map(departId -> {
+ return approves.stream().sorted(Comparator.comparing(NegativeExtensionApprove::getCreateTime).reversed())
+ .filter(item -> departId.equals(item.getHandlerDepartId()))
+ .findFirst().get();
+ }).toList();
+ ExtensionApproveStepModel step1 = new ExtensionApproveStepModel("延期申请", "", ApproveStateEnum.approved.name(), null);
+ ExtensionApproveStepModel step2 = new ExtensionApproveStepModel(negative.getHandleSecondDepartName() + "专班审批", "", null, null);
+ ExtensionApproveStepModel step3 = new ExtensionApproveStepModel("市局专班审批", "", null, null);
+ apply.setApproveSteps(List.of(step1, step2, step3));
+ if (!list.isEmpty()) {
+ step2.setComments(list.get(0).getComments());
+ step2.setState(list.get(0).getState());
+ step2.setCreateTime(list.get(0).getCreateTime());
+ }
+ if (list.size() > 1) {
+ step3.setComments(list.get(1).getComments());
+ step3.setState(list.get(1).getState());
+ step3.setCreateTime(list.get(1).getCreateTime());
+ }
return apply;
}
+
+
}
diff --git a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java
index 6c26cfa..cc43a29 100644
--- a/src/main/java/com/biutag/supervision/service/NegativeQueryService.java
+++ b/src/main/java/com/biutag/supervision/service/NegativeQueryService.java
@@ -55,7 +55,9 @@ public class NegativeQueryService {
.eq(StrUtil.isNotBlank(param.getBusinessTypeCode()), Negative::getBusinessTypeCode, param.getBusinessTypeCode())
.eq(StrUtil.isNotBlank(param.getCheckStatus()), Negative::getCheckStatus, param.getCheckStatus())
.in(!param.getCheckStatusList().isEmpty(), Negative::getCheckStatus, param.getCheckStatusList())
- .eq(StrUtil.isNotBlank(param.getIsRectifyCode()), Negative::getIsRectifyCode, param.getIsRectifyCode());
+ .eq(StrUtil.isNotBlank(param.getIsRectifyCode()), Negative::getIsRectifyCode, param.getIsRectifyCode())
+ .eq(StrUtil.isNotBlank(param.getSpecialSupervision()), Negative::getSpecialSupervision, param.getSpecialSupervision())
+ .like(StrUtil.isNotBlank(param.getReportNumber()), Negative::getReportNumber, param.getReportNumber());
if (param.getHappenTime().size() == 2) {
queryWrapper.between(Negative::getHappenTime, param.getHappenTime().get(0), param.getHappenTime().get(1));
}
diff --git a/src/main/java/com/biutag/supervision/service/NegativeService.java b/src/main/java/com/biutag/supervision/service/NegativeService.java
index 2e29a2a..d68e544 100644
--- a/src/main/java/com/biutag/supervision/service/NegativeService.java
+++ b/src/main/java/com/biutag/supervision/service/NegativeService.java
@@ -10,6 +10,7 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.*;
import com.biutag.supervision.flow.FlowService;
@@ -23,6 +24,7 @@ import com.biutag.supervision.pojo.dto.flow.FirstDistributeData;
import com.biutag.supervision.pojo.dto.flow.VerifyData;
import com.biutag.supervision.pojo.dto.jwdc.NegativeApiDto;
import com.biutag.supervision.pojo.entity.*;
+import com.biutag.supervision.pojo.model.UserAuth;
import com.biutag.supervision.util.JSON;
import com.biutag.supervision.util.SpringUtil;
import com.biutag.supervision.util.TimeUtil;
@@ -31,6 +33,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import javax.management.relation.Role;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
@@ -69,9 +72,10 @@ public class NegativeService extends ServiceImpl {
private final NegativeScorePoliceService negativeScorePoliceService;
+ private final NegativeCountersignApplyService countersignApplyService;
+
public NegativeDetail get(String id, Integer workId) {
Negative negative = getById(id);
-
List flows = negativeHistoryService.listByNegativeId(id);
AtomicReference flowKey = new AtomicReference<>(negative.getFlowKey());
List files = fileService.list(id);
@@ -121,8 +125,8 @@ public class NegativeService extends ServiceImpl {
detail.setSignReturns(signReturnService.list(id));
}
// 是否延期申请
- if (Objects.nonNull(negative.getNegativeExtensionApplyId()) && !negative.getExtensionApplyFlag()) {
- detail.setExtensionApply(extensionApplyService.get(negative.getNegativeExtensionApplyId()));
+ if (Objects.nonNull(negative.getNegativeExtensionApplyId()) && FlowNodeEnum.VERIFY.getKey().equals(negative.getFlowKey())) {
+ detail.setExtensionApply(extensionApplyService.get(negative));
}
// 办理剩余时长
if (StrUtil.isNotBlank(negative.getFlowKey())) {
@@ -153,6 +157,8 @@ public class NegativeService extends ServiceImpl {
List scorePolices = negativeScorePoliceService.list(id);
vo.setScorePolices(scorePolices);
}
+ // 单位会签
+ detail.setCountersignApplys(countersignApplyService.list(id));
return detail;
}
@@ -169,9 +175,11 @@ public class NegativeService extends ServiceImpl {
negative.setOriginId(originId); // 如果是空就生成随机的线索源
}
LocalDateTime now = LocalDateTime.now();
+ UserAuth user = UserContextHolder.getCurrentUser();
negative.setId(IdUtil.getSnowflakeNextIdStr()) // negative唯一标识 雪花
.setProcessingStatus(ProcessingStatusEnum.signing.name())
.setFlowKey(FlowNodeEnum.FIRST_DISTRIBUTE.getKey()) // 市局下发
+ .setCrtDepartLevel(user.getRoleCodes().contains(RoleCodeEnum.SECOND_ADMIN.getCode()) ? DepartLevelEnum.SECOND.getValue() : DepartLevelEnum.FIRST.getValue())
.setCrtTime(now)
.setUpdTime(now);
if (Objects.nonNull(negativeDto.getInvolveProblem())) {
@@ -201,7 +209,6 @@ public class NegativeService extends ServiceImpl {
.setCreateTime(now);
workService.save(work); // 添加一条 negative_work 数据 工作状态
-
FirstDistributeData firstDistributeData = new FirstDistributeData();
BeanUtil.copyProperties(negativeDto, firstDistributeData);
ActionDto actionDto = new ActionDto()
diff --git a/src/main/java/com/biutag/supervision/service/NegativeWorkService.java b/src/main/java/com/biutag/supervision/service/NegativeWorkService.java
index 9d69c75..65f9174 100644
--- a/src/main/java/com/biutag/supervision/service/NegativeWorkService.java
+++ b/src/main/java/com/biutag/supervision/service/NegativeWorkService.java
@@ -1,6 +1,7 @@
package com.biutag.supervision.service;
import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -14,6 +15,8 @@ import com.biutag.supervision.util.TimeUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
@Service
public class NegativeWorkService extends ServiceImpl {
@@ -35,6 +38,8 @@ public class NegativeWorkService extends ServiceImpl list(String negativeId) {
+ return list(new LambdaQueryWrapper().eq(NegativeWork::getNegativeId, negativeId));
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/util/WordUtil.java b/src/main/java/com/biutag/supervision/util/WordUtil.java
new file mode 100644
index 0000000..c268af9
--- /dev/null
+++ b/src/main/java/com/biutag/supervision/util/WordUtil.java
@@ -0,0 +1,36 @@
+package com.biutag.supervision.util;
+
+import com.aspose.words.Document;
+import com.aspose.words.License;
+import com.aspose.words.SaveFormat;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+@Slf4j
+public class WordUtil {
+
+ public static InputStream convertDocx(InputStream is) {
+ getLicense();
+ try(ByteArrayOutputStream f = new ByteArrayOutputStream()) {
+ Document doc = new Document(is);
+ doc.save(f, SaveFormat.DOCX);
+ return new ByteArrayInputStream(f.toByteArray());
+ } catch (Exception e) {
+ throw new RuntimeException("docx转换异常:" + e.getMessage());
+ }
+ }
+
+ public static boolean getLicense() {
+ try (InputStream is = WordUtil.class.getResourceAsStream("/license/words.license.xml")){
+ License aposeLic = new License();
+ aposeLic.setLicense(is);
+ return true;
+ } catch (Exception e) {
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+}
diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml
index 8d5ffff..90e7745 100644
--- a/src/main/resources/application-local.yml
+++ b/src/main/resources/application-local.yml
@@ -14,14 +14,14 @@ spring:
password: ip12341234
data:
redis:
- host: 172.31.217.20
+ host: 127.0.0.1
# 端口,默认为6379
- port: 30079
- password: ip1234!@#$
+ port: 6379
+ password: 123456
-#mybatis-plus:
-# configuration:
-# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
fdfs:
tracker-list: #TrackerList参数,支持多个
diff --git a/src/main/resources/license/words.license.xml b/src/main/resources/license/words.license.xml
new file mode 100644
index 0000000..ecd46c1
--- /dev/null
+++ b/src/main/resources/license/words.license.xml
@@ -0,0 +1,13 @@
+
+
+
+ Aspose.Total for Java
+ Aspose.Words for Java
+
+ Enterprise
+ 20991231
+ 20991231
+ 8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7
+
+ sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
+
diff --git a/src/main/resources/mapper/NegativeWorkMapper.xml b/src/main/resources/mapper/NegativeWorkMapper.xml
index dc7df38..194ce0c 100644
--- a/src/main/resources/mapper/NegativeWorkMapper.xml
+++ b/src/main/resources/mapper/NegativeWorkMapper.xml
@@ -5,11 +5,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
\ No newline at end of file
diff --git a/src/test/java/com/biutag/supervision/StrUtil.java b/src/test/java/com/biutag/supervision/StrUtil.java
index 572ac80..2234169 100644
--- a/src/test/java/com/biutag/supervision/StrUtil.java
+++ b/src/test/java/com/biutag/supervision/StrUtil.java
@@ -17,8 +17,6 @@ public class StrUtil {
@Test
public void testSubstr() {
- for (int i = 0; i < 12; i++) {
-
- }
+ System.out.println(StrUtil.class.getSimpleName());
}
}
diff --git a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java
index ffb05e5..882be5f 100644
--- a/src/test/java/com/biutag/supervision/tools/GenCodeTests.java
+++ b/src/test/java/com/biutag/supervision/tools/GenCodeTests.java
@@ -25,7 +25,7 @@ public class GenCodeTests {
@Test
public void genEntity() throws TemplateException, IOException {
- String tableName = "risk_personal_tag";
+ String tableName = "negative_countersign";
String tableSchema = "negative";
boolean genMapper = true;
boolean genService = true;