|
|
@@ -15,15 +15,15 @@ import com.yingpaipay.business.domain.bo.*;
|
|
|
import com.yingpaipay.business.domain.dto.AiAuditDTO;
|
|
|
import com.yingpaipay.business.domain.excel.ProjectExcel;
|
|
|
import com.yingpaipay.business.domain.vo.*;
|
|
|
-import com.yingpaipay.business.enumeration.DocumentStatusEnum;
|
|
|
-import com.yingpaipay.business.enumeration.MailTemplateEnum;
|
|
|
+import com.yingpaipay.business.enums.DocumentStatusEnum;
|
|
|
+import com.yingpaipay.business.enums.MailTemplateEnum;
|
|
|
import com.yingpaipay.business.mapper.DocumentAuditLogMapper;
|
|
|
import com.yingpaipay.business.mapper.DocumentMapper;
|
|
|
import com.yingpaipay.business.service.*;
|
|
|
import com.yingpaipay.business.service.AiAuditService;
|
|
|
import com.yingpaipay.business.service.common.CommonFolderService;
|
|
|
import com.yingpaipay.business.service.common.CommonProjectService;
|
|
|
-import com.yingpaipay.common.file.util.PdfUtils;
|
|
|
+import com.yingpaipay.common.file.utils.PdfUtils;
|
|
|
import com.yingpaipay.common.mabatis.utils.WrapperUtils;
|
|
|
import com.yingpaipay.setting.domain.vo.KeywordSettingVo;
|
|
|
import com.yingpaipay.setting.service.IKeywordSettingService;
|
|
|
@@ -41,7 +41,6 @@ import org.dromara.common.core.utils.MessageUtils;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
import org.dromara.common.core.utils.file.FileUtils;
|
|
|
import org.dromara.common.json.utils.JsonUtils;
|
|
|
-import org.dromara.common.mail.utils.MailUtils;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.mybatis.helper.DataBaseHelper;
|
|
|
@@ -66,7 +65,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import java.io.*;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
-import java.text.MessageFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.ZoneId;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
@@ -205,7 +203,7 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
Document::getUpdateTime, params.get("beginUpdateTime"), params.get("endUpdateTime"));
|
|
|
|
|
|
// 如果为待归档,那么就只能看到自己的上传的
|
|
|
- if (bo.getFolderId().equals(FolderTypeConst.UN_UPLOAD)) {
|
|
|
+ if (bo.getFolderId().equals(FolderTypeConstants.UN_UPLOAD)) {
|
|
|
lqw.eq(Document::getCreateBy, LoginHelper.getUserId());
|
|
|
}
|
|
|
|
|
|
@@ -386,7 +384,7 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
throw new RuntimeException("修改文档状态失败");
|
|
|
}
|
|
|
|
|
|
- boolean logFlag = auditLogMapper.insert(buildLog(document, DocumentAuditorTypeConst.MANUAL, bo)) == 0;
|
|
|
+ boolean logFlag = auditLogMapper.insert(buildLog(document, DocumentAuditorTypeConstants.MANUAL, bo)) == 0;
|
|
|
if (logFlag) {
|
|
|
throw new RuntimeException("新增审核日志失败");
|
|
|
}
|
|
|
@@ -842,7 +840,7 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
document.setStatus(DocumentStatusEnum.UN_AUDIT.getValue());
|
|
|
document.setActualDocument(ossVo.getOssId());
|
|
|
document.setNote(bo.getNote());
|
|
|
- document.setType(DocumentTypeConst.NOT_PLAN);
|
|
|
+ document.setType(DocumentTypeConstants.NOT_PLAN);
|
|
|
document.setSubmitter(LoginHelper.getUserId());
|
|
|
document.setSubmitTime(new Date());
|
|
|
document.setProjectId(bo.getProjectId());
|
|
|
@@ -950,12 +948,12 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
document.setName(bo.getName());
|
|
|
document.setStatus(DocumentStatusEnum.UN_AUDIT.getValue());
|
|
|
document.setActualDocument(ossVo.getOssId());
|
|
|
- document.setType(DocumentTypeConst.NOT_PLAN);
|
|
|
+ document.setType(DocumentTypeConstants.NOT_PLAN);
|
|
|
document.setSubmitter(LoginHelper.getUserId());
|
|
|
document.setSubmitTime(new Date());
|
|
|
document.setProjectId(bo.getProjectId());
|
|
|
document.setEffectiveDate(bo.getEffectiveDate());
|
|
|
- document.setSpecificationType(bo.getFolder() != 0L ? SpecificationTypeConst.CENTER : SpecificationTypeConst.PROJECT);
|
|
|
+ document.setSpecificationType(bo.getFolder() != 0L ? SpecificationTypeConstants.CENTER : SpecificationTypeConstants.PROJECT);
|
|
|
document.setTenantId(TenantHelper.getTenantId());
|
|
|
|
|
|
boolean documentInserFlag = baseMapper.insert(document) == 0;
|
|
|
@@ -978,7 +976,7 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
DocumentAuditLog log = new DocumentAuditLog();
|
|
|
log.setDocumentId(document.getId());
|
|
|
log.setUploadVersion(document.getActualDocument());
|
|
|
- log.setAuditorType(DocumentAuditorTypeConst.AI);
|
|
|
+ log.setAuditorType(DocumentAuditorTypeConstants.AI);
|
|
|
log.setResult(result.getResult() ? DocumentStatusEnum.ARCHIEVED.getValue() : DocumentStatusEnum.AUDIT_REJECT.getValue());
|
|
|
log.setAuditor(0L);
|
|
|
log.setRejectReason(result.getRejectReason());
|
|
|
@@ -1096,7 +1094,7 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
});
|
|
|
ossService.queryListByIds(ossIds).forEach(e -> ossMap.put(e.getOssId(), e));
|
|
|
userService.selectUserByIds(userIds).forEach(e -> userMap.put(e.getUserId(), e));
|
|
|
- dictTypeService.selectDictDataByType(DictTypeConst.PLAN_DOCUMENT_TYPE).forEach(e -> planType.put(e.getDictValue(), e.getDictLabel()));
|
|
|
+ dictTypeService.selectDictDataByType(DictTypeConstants.PLAN_DOCUMENT_TYPE).forEach(e -> planType.put(e.getDictValue(), e.getDictLabel()));
|
|
|
Project project = projectService.queryById(projectId);
|
|
|
List<Folder> folders = folderService.queryByProjectId(projectId);
|
|
|
Map<Long, Folder> folderMap = new HashMap<>();
|
|
|
@@ -1117,12 +1115,12 @@ public class DocumentServiceImpl implements IDocumentService {
|
|
|
if (currentFolder != 0L) {
|
|
|
for (;;) {
|
|
|
Folder folder = folderMap.get(currentFolder);
|
|
|
- if (folder.getType().equals(FolderTypeConst.CENTER)) {
|
|
|
+ if (folder.getType().equals(FolderTypeConstants.CENTER)) {
|
|
|
excel.setCenterId(currentFolder);
|
|
|
excel.setCenterName(folder.getName());
|
|
|
break;
|
|
|
}
|
|
|
- if (folder.getType().equals(FolderTypeConst.NORMAL)) {
|
|
|
+ if (folder.getType().equals(FolderTypeConstants.NORMAL)) {
|
|
|
if (folder.getParentId() != null) {
|
|
|
currentFolder = folder.getParentId();
|
|
|
continue;
|