diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml
index a889ef7b..6cba653a 100644
--- a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml
+++ b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml
@@ -236,10 +236,13 @@ springdoc:
packages-to-scan: org.dromara.other
- group: 11.分包模块
packages-to-scan: org.dromara.contractor
- - group: 12.代码生成模块
- packages-to-scan: org.dromara.generator
+ - group: 12.设计模块
+ packages-to-scan: org.dromara.design
- group: 13.工作流模块
packages-to-scan: org.dromara.workflow
+ - group: 20.代码生成模块
+ packages-to-scan: org.dromara.generator
+
# 防止XSS攻击
xss:
diff --git a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java
index 67737c29..fae75919 100644
--- a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java
+++ b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java
@@ -3,6 +3,7 @@ package org.dromara.test;
import cn.hutool.core.io.FileUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
+import org.dromara.design.service.IDesTechnicalStandardService;
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
import org.dromara.project.service.IBusProjectService;
import org.junit.jupiter.api.Test;
@@ -25,6 +26,9 @@ public class DemoTest {
@Resource
private IBusProjectService projectService;
+ @Resource
+ private IDesTechnicalStandardService desTechnicalStandardService;
+
@Test
void test() {
Boolean result = photovoltaicPanelPartsService
@@ -39,13 +43,17 @@ public class DemoTest {
@Test
void testProjectSync() {
- projectService.insertProjectSyncThing(1897160897167638529L)
+ Long id = 1897160897167638529L;
+/* projectService.insertProjectSyncThing(id)
.thenAccept(result -> log.info("项目异步执行数据同步成功"))
.exceptionally(ex -> {
log.error("项目异步执行数据同步失败", ex);
return null;
- });
- ;
+ });*/
+ Boolean saveTechnicalStandard = desTechnicalStandardService.insertFolderByTemplate(id);
+ if (!saveTechnicalStandard) {
+ log.error("同步数据失败,项目[{}]新增技术标准管理文件夹模版失败", id);
+ }
}
@Test
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml
index 784a305b..91bcc716 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/pom.xml
@@ -105,6 +105,11 @@
ruoyi-common-jts
+
+ org.dromara
+ ruoyi-workflow
+
+
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDrawingConstant.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDrawingConstant.java
new file mode 100644
index 00000000..1c7134e2
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDrawingConstant.java
@@ -0,0 +1,23 @@
+package org.dromara.design.constant;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 19:59
+ */
+public interface DesDrawingConstant {
+
+ /**
+ * 对象存储前缀
+ */
+ String OSS_PREFIX = "doc/design/drawing/";
+
+ /**
+ * 获取项目对象存储前缀
+ *
+ * @param projectId 项目id
+ * @return 项目对象存储前缀
+ */
+ static String getProjectOssPrefix(Long projectId) {
+ return String.format("%s%s/", OSS_PREFIX, projectId);
+ }
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesDrawingController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesDrawingController.java
new file mode 100644
index 00000000..552dc2da
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesDrawingController.java
@@ -0,0 +1,95 @@
+package org.dromara.design.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.annotation.Resource;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.design.domain.dto.drawing.DesDrawingCreateReq;
+import org.dromara.design.domain.dto.drawing.DesDrawingQueryReq;
+import org.dromara.design.domain.dto.drawing.DesDrawingUpdateReq;
+import org.dromara.design.domain.vo.drawing.DesDrawingVo;
+import org.dromara.design.service.IDesDrawingService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * 图纸管理
+ *
+ * @author lcj
+ * @date 2025-07-02
+ */
+@Validated
+@RestController
+@RequestMapping("/design/drawing")
+public class DesDrawingController extends BaseController {
+
+ @Resource
+ private IDesDrawingService desDrawingService;
+
+ /**
+ * 查询图纸管理列表
+ */
+ @SaCheckPermission("design:drawing:list")
+ @GetMapping("/list")
+ public TableDataInfo list(DesDrawingQueryReq req, PageQuery pageQuery) {
+ return desDrawingService.queryPageList(req, pageQuery);
+ }
+
+ /**
+ * 获取图纸管理详细信息
+ *
+ * @param id 主键
+ */
+ @SaCheckPermission("design:drawing:query")
+ @GetMapping("/{id}")
+ public R getInfo(@NotNull(message = "主键不能为空")
+ @PathVariable Long id) {
+ return R.ok(desDrawingService.queryById(id));
+ }
+
+ /**
+ * 新增图纸管理
+ */
+ @SaCheckPermission("design:drawing:add")
+ @Log(title = "图纸管理", businessType = BusinessType.INSERT)
+ @RepeatSubmit()
+ @PostMapping()
+ public R add(@RequestPart("file") MultipartFile file, DesDrawingCreateReq req) {
+ return R.ok(desDrawingService.insertByBo(file, req));
+ }
+
+ /**
+ * 修改图纸管理
+ */
+ @SaCheckPermission("design:drawing:edit")
+ @Log(title = "图纸管理", businessType = BusinessType.UPDATE)
+ @RepeatSubmit()
+ @PutMapping()
+ public R edit(@Validated(EditGroup.class) @RequestBody DesDrawingUpdateReq req) {
+ return toAjax(desDrawingService.updateByBo(req));
+ }
+
+ /**
+ * 删除图纸管理
+ *
+ * @param ids 主键串
+ */
+ @SaCheckPermission("design:drawing:remove")
+ @Log(title = "图纸管理", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public R remove(@NotEmpty(message = "主键不能为空")
+ @PathVariable Long[] ids) {
+ return toAjax(desDrawingService.deleteByIds(List.of(ids)));
+ }
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesTechnicalStandardController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesTechnicalStandardController.java
index 246709eb..f1d60e0d 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesTechnicalStandardController.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesTechnicalStandardController.java
@@ -26,7 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
- * 技术管理标准
+ * 技术标准管理
*
* @author lcj
* @date 2025-07-02
@@ -40,7 +40,7 @@ public class DesTechnicalStandardController extends BaseController {
private IDesTechnicalStandardService desTechnicalStandardService;
/**
- * 分页查询技术管理标准文件列表
+ * 分页查询技术标准管理文件列表
*/
@SaCheckPermission("design:technicalStandard:list")
@GetMapping("/file/page")
@@ -49,7 +49,7 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 查询技术管理标准文件列表
+ * 查询技术标准管理文件列表
*/
@SaCheckPermission("design:technicalStandard:list")
@GetMapping("/file/list/{folderId}")
@@ -59,7 +59,7 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 查询技术管理标准文件树列表
+ * 查询技术标准管理文件树列表
*/
@SaCheckPermission("design:technicalStandard:list")
@GetMapping("/folder/tree/list")
@@ -69,7 +69,7 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 查询技术管理标准回收站文件列表
+ * 查询技术标准管理回收站文件列表
*/
@SaCheckPermission("design:technicalStandard:list")
@GetMapping("/recycleBin/list")
@@ -78,7 +78,7 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 获取技术管理标准详细信息
+ * 获取技术标准管理详细信息
*
* @param id 主键
*/
@@ -90,10 +90,10 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 新增技术管理标准文件
+ * 新增技术标准管理文件
*/
@SaCheckPermission("design:technicalStandard:add")
- @Log(title = "技术管理标准", businessType = BusinessType.INSERT)
+ @Log(title = "技术标准管理", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping("/file")
public R add(@RequestPart("file") MultipartFile file, DesTechnicalStandardFileCreateReq req) {
@@ -101,10 +101,10 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 修改技术管理标准
+ * 修改技术标准管理
*/
@SaCheckPermission("design:technicalStandard:edit")
- @Log(title = "技术管理标准", businessType = BusinessType.UPDATE)
+ @Log(title = "技术标准管理", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping("/file")
public R edit(@RequestBody DesTechnicalStandardFileUpdateReq req) {
@@ -112,12 +112,12 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 删除技术管理标准文件
+ * 删除技术标准管理文件
*
* @param id 主键
*/
@SaCheckPermission("design:technicalStandard:remove")
- @Log(title = "技术管理标准", businessType = BusinessType.DELETE)
+ @Log(title = "技术标准管理", businessType = BusinessType.DELETE)
@DeleteMapping("/file/{id}")
public R remove(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
@@ -125,12 +125,12 @@ public class DesTechnicalStandardController extends BaseController {
}
/**
- * 批量删除技术管理标准回收站文件信息
+ * 批量删除技术标准管理回收站文件信息
*
* @param ids 主键串
*/
@SaCheckPermission("design:technicalStandard:remove")
- @Log(title = "技术管理标准", businessType = BusinessType.DELETE)
+ @Log(title = "技术标准管理", businessType = BusinessType.DELETE)
@DeleteMapping("/file/recycleBin/{ids}")
public R removeRecycleBin(@NotNull(message = "主键不能为空")
@PathVariable Long[] ids) {
@@ -141,7 +141,7 @@ public class DesTechnicalStandardController extends BaseController {
* 根据主键id批量恢复
*/
@SaCheckPermission("design:technicalStandard:recovery")
- @Log(title = "技术管理标准", businessType = BusinessType.UPDATE)
+ @Log(title = "技术标准管理", businessType = BusinessType.UPDATE)
@PostMapping("/recovery/{ids}")
public R recoveryBatchById(@NotNull(message = "主键不能为空")
@PathVariable Long[] ids) {
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesDrawing.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesDrawing.java
new file mode 100644
index 00000000..b0a59cf7
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesDrawing.java
@@ -0,0 +1,92 @@
+package org.dromara.design.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+
+import java.io.Serial;
+import java.util.Date;
+
+/**
+ * 图纸管理对象 des_drawing
+ *
+ * @author lcj
+ * @date 2025-07-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("des_drawing")
+public class DesDrawing extends BaseEntity {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键id
+ */
+ @TableId(value = "id")
+ private Long id;
+
+ /**
+ * 项目id
+ */
+ private Long projectId;
+
+ /**
+ * 版本号
+ */
+ private String versionNumber;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 文件访问路径
+ */
+ private String fileUrl;
+
+ /**
+ * 文件类型(1过程图纸 2蓝图 3变更图纸)
+ */
+ private String fileType;
+
+ /**
+ * 文件后缀
+ */
+ private String fileSuffix;
+
+ /**
+ * 状态(0正常 1删除)
+ */
+ private String fileStatus;
+
+ /**
+ * 原文件名
+ */
+ private String originalName;
+
+ /**
+ * 是否最新(0否 1是)
+ */
+ private String newest;
+
+ /**
+ * 审核状态
+ */
+ private String status;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 删除时间
+ */
+ private Date deletedAt;
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesTechnicalStandard.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesTechnicalStandard.java
index 3503383c..0c271aae 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesTechnicalStandard.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesTechnicalStandard.java
@@ -10,7 +10,7 @@ import java.io.Serial;
import java.util.Date;
/**
- * 技术管理标准对象 des_technical_standard
+ * 技术标准管理对象 des_technical_standard
*
* @author lcj
* @date 2025-07-02
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingCreateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingCreateReq.java
new file mode 100644
index 00000000..9dc2ef15
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingCreateReq.java
@@ -0,0 +1,43 @@
+package org.dromara.design.domain.dto.drawing;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 19:31
+ */
+@Data
+public class DesDrawingCreateReq implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 7092100999544181672L;
+
+ /**
+ * 项目id
+ */
+ private Long projectId;
+
+ /**
+ * 版本号
+ */
+ private String versionNumber;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 文件类型(1过程图纸 2蓝图 3变更图纸)
+ */
+ private String fileType;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingQueryReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingQueryReq.java
new file mode 100644
index 00000000..ecbdaf74
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingQueryReq.java
@@ -0,0 +1,48 @@
+package org.dromara.design.domain.dto.drawing;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 19:32
+ */
+@Data
+public class DesDrawingQueryReq implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 8149145849259291103L;
+
+ /**
+ * 项目id
+ */
+ private Long projectId;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 文件类型(1过程图纸 2蓝图 3变更图纸)
+ */
+ private String fileType;
+
+ /**
+ * 状态(0正常 1删除)
+ */
+ private String fileStatus;
+
+ /**
+ * 原文件名
+ */
+ private String originalName;
+
+ /**
+ * 是否最新(0否 1是)
+ */
+ private String newest;
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingUpdateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingUpdateReq.java
new file mode 100644
index 00000000..47053214
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/drawing/DesDrawingUpdateReq.java
@@ -0,0 +1,38 @@
+package org.dromara.design.domain.dto.drawing;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 19:31
+ */
+@Data
+public class DesDrawingUpdateReq implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = -6833934408939323557L;
+
+ /**
+ * 主键id
+ */
+ private Long id;
+
+ /**
+ * 版本号
+ */
+ private String versionNumber;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/drawing/DesDrawingVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/drawing/DesDrawingVo.java
new file mode 100644
index 00000000..05afda18
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/drawing/DesDrawingVo.java
@@ -0,0 +1,79 @@
+package org.dromara.design.domain.vo.drawing;
+
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import org.dromara.design.domain.DesDrawing;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 图纸管理视图对象 des_drawing
+ *
+ * @author lcj
+ * @date 2025-07-02
+ */
+@Data
+@AutoMapper(target = DesDrawing.class)
+public class DesDrawingVo implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键id
+ */
+ private Long id;
+
+ /**
+ * 项目id
+ */
+ private Long projectId;
+
+ /**
+ * 版本号
+ */
+ private String versionNumber;
+
+ /**
+ * 文件名称
+ */
+ private String fileName;
+
+ /**
+ * 文件访问路径
+ */
+ private String fileUrl;
+
+ /**
+ * 文件类型(1过程图纸 2蓝图 3变更图纸)
+ */
+ private String fileType;
+
+ /**
+ * 文件后缀
+ */
+ private String fileSuffix;
+
+ /**
+ * 原文件名
+ */
+ private String originalName;
+
+ /**
+ * 是否最新(0否 1是)
+ */
+ private String newest;
+
+ /**
+ * 审核状态
+ */
+ private String status;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/technicalstandard/DesTechnicalStandardVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/technicalstandard/DesTechnicalStandardVo.java
index caa34128..4ccefa1e 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/technicalstandard/DesTechnicalStandardVo.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/technicalstandard/DesTechnicalStandardVo.java
@@ -9,7 +9,7 @@ import java.io.Serializable;
/**
- * 技术管理标准视图对象 des_technical_standard
+ * 技术标准管理视图对象 des_technical_standard
*
* @author lcj
* @date 2025-07-02
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingFileTypeEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingFileTypeEnum.java
new file mode 100644
index 00000000..40a92e3b
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingFileTypeEnum.java
@@ -0,0 +1,39 @@
+package org.dromara.design.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 20:13
+ */
+@Getter
+public enum DesDrawingFileTypeEnum {
+
+ PROCESS_DRAWING("过程图纸", "1", "changedrawing"),
+ BLUEPRINT("蓝图", "2", "blueprintdrawing"),
+ CHANGE_DRAWING("变更图纸", "3", "processdrawing");
+
+ private final String text;
+
+ private final String value;
+
+ private final String code;
+
+ DesDrawingFileTypeEnum(String text, String value, String code) {
+ this.text = text;
+ this.value = value;
+ this.code = code;
+ }
+
+ // 根据 value 获取对应的 text
+ public static String getTextByValue(String value) {
+ for (DesDrawingFileTypeEnum type : values()) {
+ if (Objects.equals(type.getValue(), value)) {
+ return type.getText();
+ }
+ }
+ return null;
+ }
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingNewestEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingNewestEnum.java
new file mode 100644
index 00000000..eeb0a007
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/enums/DesDrawingNewestEnum.java
@@ -0,0 +1,23 @@
+package org.dromara.design.enums;
+
+import lombok.Getter;
+
+/**
+ * @author lcj
+ * @date 2025/7/2 20:07
+ */
+@Getter
+public enum DesDrawingNewestEnum {
+
+ YES("1", "是"),
+ NO("0", "否");
+
+ private final String code;
+
+ private final String message;
+
+ DesDrawingNewestEnum(String code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesDrawingMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesDrawingMapper.java
new file mode 100644
index 00000000..b7e35df1
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesDrawingMapper.java
@@ -0,0 +1,15 @@
+package org.dromara.design.mapper;
+
+import org.dromara.design.domain.DesDrawing;
+import org.dromara.design.domain.vo.drawing.DesDrawingVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 图纸管理Mapper接口
+ *
+ * @author lcj
+ * @date 2025-07-02
+ */
+public interface DesDrawingMapper extends BaseMapperPlus {
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesTechnicalStandardMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesTechnicalStandardMapper.java
index 80f7c5a2..10c86709 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesTechnicalStandardMapper.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesTechnicalStandardMapper.java
@@ -5,7 +5,7 @@ import org.dromara.design.domain.DesTechnicalStandard;
import org.dromara.design.domain.vo.technicalstandard.DesTechnicalStandardVo;
/**
- * 技术管理标准Mapper接口
+ * 技术标准管理Mapper接口
*
* @author lcj
* @date 2025-07-02
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesDrawingService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesDrawingService.java
new file mode 100644
index 00000000..e9f60158
--- /dev/null
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesDrawingService.java
@@ -0,0 +1,99 @@
+package org.dromara.design.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.design.domain.DesDrawing;
+import org.dromara.design.domain.dto.drawing.DesDrawingCreateReq;
+import org.dromara.design.domain.dto.drawing.DesDrawingQueryReq;
+import org.dromara.design.domain.dto.drawing.DesDrawingUpdateReq;
+import org.dromara.design.domain.vo.drawing.DesDrawingVo;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 图纸管理Service接口
+ *
+ * @author lcj
+ * @date 2025-07-02
+ */
+public interface IDesDrawingService extends IService {
+
+ /**
+ * 查询图纸管理
+ *
+ * @param id 主键
+ * @return 图纸管理
+ */
+ DesDrawingVo queryById(Long id);
+
+ /**
+ * 分页查询图纸管理列表
+ *
+ * @param req 查询条件
+ * @param pageQuery 分页参数
+ * @return 图纸管理分页列表
+ */
+ TableDataInfo queryPageList(DesDrawingQueryReq req, PageQuery pageQuery);
+
+ /**
+ * 查询符合条件的图纸管理列表
+ *
+ * @param req 查询条件
+ * @return 图纸管理列表
+ */
+ List queryList(DesDrawingQueryReq req);
+
+ /**
+ * 新增图纸管理
+ *
+ * @param file 文件
+ * @param req 图纸管理
+ * @return 新增图纸管理主键id
+ */
+ DesDrawingVo insertByBo(MultipartFile file, DesDrawingCreateReq req);
+
+ /**
+ * 修改图纸管理
+ *
+ * @param req 图纸管理
+ * @return 是否修改成功
+ */
+ Boolean updateByBo(DesDrawingUpdateReq req);
+
+ /**
+ * 校验并批量删除图纸管理信息
+ *
+ * @param ids 待删除的主键集合
+ * @return 是否删除成功
+ */
+ Boolean deleteByIds(Collection ids);
+
+ /**
+ * 构建图纸管理封装对象
+ *
+ * @param drawing 图纸管理
+ * @return 图纸管理封装对象
+ */
+ DesDrawingVo getVo(DesDrawing drawing);
+
+ /**
+ * 构建查询条件
+ *
+ * @param req 查询条件
+ * @return 查询条件
+ */
+ LambdaQueryWrapper buildQueryWrapper(DesDrawingQueryReq req);
+
+ /**
+ * 获取图纸管理对象视图
+ *
+ * @param drawingPage 图纸管理对象
+ * @return 图纸管理对象视图
+ */
+ Page getVoPage(Page drawingPage);
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesTechnicalStandardService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesTechnicalStandardService.java
index 4c2c000c..9161c965 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesTechnicalStandardService.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesTechnicalStandardService.java
@@ -19,7 +19,7 @@ import java.util.Collection;
import java.util.List;
/**
- * 技术管理标准Service接口
+ * 技术标准管理Service接口
*
* @author lcj
* @date 2025-07-02
@@ -27,35 +27,35 @@ import java.util.List;
public interface IDesTechnicalStandardService extends IService {
/**
- * 查询技术管理标准
+ * 查询技术标准管理
*
* @param id 主键
- * @return 技术管理标准
+ * @return 技术标准管理
*/
DesTechnicalStandardVo queryById(Long id);
/**
- * 查询技术管理标准文件夹树列表
+ * 查询技术标准管理文件夹树列表
*
* @param req 查询参数
- * @return 技术管理标准文件夹树列表
+ * @return 技术标准管理文件夹树列表
*/
List> queryFolderTreeList(DesTechnicalStandardQueryReq req);
/**
- * 分页查询文件夹下的技术管理标准文件列表
+ * 分页查询文件夹下的技术标准管理文件列表
*
* @param req 查询参数
* @param pageQuery 分页参数
- * @return 技术管理标准文件列表
+ * @return 技术标准管理文件列表
*/
TableDataInfo queryFilePageByFolderId(DesTechnicalStandardFileQueryReq req, PageQuery pageQuery);
/**
- * 查询文件夹下的技术管理标准文件列表
+ * 查询文件夹下的技术标准管理文件列表
*
* @param folderId 文件夹id
- * @return 技术管理标准文件列表
+ * @return 技术标准管理文件列表
*/
List queryFileListByFolderId(Long folderId);
@@ -69,16 +69,16 @@ public interface IDesTechnicalStandardService extends IService queryRecycleBinPageList(DesTechnicalStandardQueryReq req, PageQuery pageQuery);
/**
- * 新增技术管理标准文件
+ * 新增技术标准管理文件
*
* @param file 文件
- * @param req 技术管理标准
+ * @param req 技术标准管理
* @return 是否新增成功
*/
Boolean insertFile(MultipartFile file, DesTechnicalStandardFileCreateReq req);
/**
- * 新增技术管理标准文件夹
+ * 新增技术标准管理文件夹
*
* @param projectId 项目id
* @return 是否新增成功
@@ -86,15 +86,15 @@ public interface IDesTechnicalStandardService extends IService
+ implements IDesDrawingService {
+
+ @Resource
+ private IBusProjectService projectService;
+
+ @Resource
+ private ISysOssService ossService;
+
+ /**
+ * 查询图纸管理
+ *
+ * @param id 主键
+ * @return 图纸管理
+ */
+ @Override
+ public DesDrawingVo queryById(Long id) {
+ DesDrawing drawing = this.getById(id);
+ if (drawing == null) {
+ throw new ServiceException("图纸不存在", HttpStatus.NOT_FOUND);
+ }
+ return this.getVo(drawing);
+ }
+
+ /**
+ * 分页查询图纸管理列表
+ *
+ * @param req 查询条件
+ * @param pageQuery 分页参数
+ * @return 图纸管理分页列表
+ */
+ @Override
+ public TableDataInfo queryPageList(DesDrawingQueryReq req, PageQuery pageQuery) {
+ LambdaQueryWrapper lqw = buildQueryWrapper(req);
+ Page result = this.page(pageQuery.build(), lqw);
+ return TableDataInfo.build(this.getVoPage(result));
+ }
+
+ /**
+ * 查询符合条件的图纸管理列表
+ *
+ * @param req 查询条件
+ * @return 图纸管理列表
+ */
+ @Override
+ public List queryList(DesDrawingQueryReq req) {
+ LambdaQueryWrapper lqw = buildQueryWrapper(req);
+ return this.list(lqw).stream().map(this::getVo).toList();
+ }
+
+ /**
+ * 新增图纸管理
+ *
+ * @param file 文件
+ * @param req 图纸管理
+ * @return 新增图纸管理主键id
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public DesDrawingVo insertByBo(MultipartFile file, DesDrawingCreateReq req) {
+ // 数据校验
+ if (ObjectUtils.isEmpty(file)) {
+ throw new ServiceException("图纸文件不能为空", HttpStatus.BAD_REQUEST);
+ }
+ Long projectId = req.getProjectId();
+ if (projectService.getById(projectId) == null) {
+ throw new ServiceException("项目不存在", HttpStatus.BAD_REQUEST);
+ }
+ String fileType = req.getFileType();
+ String enumText = DesDrawingFileTypeEnum.getTextByValue(fileType);
+ if (StringUtils.isBlank(enumText)) {
+ throw new ServiceException("图纸文件类型错误", HttpStatus.BAD_REQUEST);
+ }
+ // 拼接文件名
+ String originalFilename = file.getOriginalFilename();
+ String suffix = FileUtil.getSuffix(originalFilename);
+ if (StringUtils.isBlank(suffix)) {
+ throw new ServiceException("图纸文件格式错误", HttpStatus.BAD_REQUEST);
+ }
+ String date = DateUtils.getDate();
+ String uuid = IdUtil.fastSimpleUUID();
+ String fileName = String.format("%s_%s.%s", date, uuid, suffix);
+ // 拼接文件路径
+ String filePath = DesDrawingConstant.getProjectOssPrefix(projectId) + fileName;
+ // 上传文件
+ SysOssUploadVo ossUploadVo = ossService.uploadWithNoSave(file, filePath);
+ // 文件信息赋值
+ DesDrawing desDrawing = new DesDrawing();
+ desDrawing.setProjectId(projectId);
+ desDrawing.setOriginalName(originalFilename);
+ String name = req.getFileName();
+ if (StringUtils.isBlank(name)) {
+ name = FileUtil.getPrefix(originalFilename);
+ }
+ desDrawing.setFileName(name);
+ desDrawing.setFileUrl(ossUploadVo.getUrl());
+ desDrawing.setFileSuffix(suffix);
+ desDrawing.setVersionNumber(req.getVersionNumber());
+ desDrawing.setFileType(fileType);
+ desDrawing.setNewest(DesDrawingNewestEnum.YES.getCode());
+ // 修改数据库中最新版本文件状态
+ DesDrawing oldNewestDrawing = this.lambdaQuery()
+ .eq(DesDrawing::getProjectId, projectId)
+ .eq(DesDrawing::getNewest, DesDrawingNewestEnum.YES.getCode())
+ .eq(DesDrawing::getFileType, fileType)
+ .one();
+ if (oldNewestDrawing != null) {
+ oldNewestDrawing.setNewest(DesDrawingNewestEnum.NO.getCode());
+ boolean result = this.updateById(oldNewestDrawing);
+ if (!result) {
+ throw new ServiceException("数据库中图纸状态更新异常");
+ }
+ }
+ boolean result = this.save(desDrawing);
+ if (!result) {
+ throw new ServiceException("保存新图纸失败");
+ }
+ return this.getVo(this.getById(desDrawing.getId()));
+ }
+
+ /**
+ * 修改图纸管理
+ *
+ * @param req 图纸管理
+ * @return 是否修改成功
+ */
+ @Override
+ public Boolean updateByBo(DesDrawingUpdateReq req) {
+ Long id = req.getId();
+ DesDrawing oldDrawing = this.getById(id);
+ if (oldDrawing == null) {
+ throw new ServiceException("图纸不存在", HttpStatus.NOT_FOUND);
+ }
+ DesDrawing desDrawing = new DesDrawing();
+ BeanUtils.copyProperties(req, desDrawing);
+ boolean result = this.updateById(desDrawing);
+ if (!result) {
+ throw new ServiceException("修改图纸失败", HttpStatus.ERROR);
+ }
+ return true;
+ }
+
+ /**
+ * 校验并批量删除图纸管理信息
+ *
+ * @param ids 待删除的主键集合
+ * @return 是否删除成功
+ */
+ @Override
+ public Boolean deleteByIds(Collection ids) {
+ return baseMapper.deleteByIds(ids) > 0;
+ }
+
+ /**
+ * 构建图纸管理封装对象
+ *
+ * @param drawing 图纸管理
+ * @return 图纸管理封装对象
+ */
+ @Override
+ public DesDrawingVo getVo(DesDrawing drawing) {
+ DesDrawingVo vo = new DesDrawingVo();
+ if (drawing == null) {
+ return vo;
+ }
+ BeanUtils.copyProperties(drawing, vo);
+ return vo;
+ }
+
+ /**
+ * 构建查询条件
+ *
+ * @param req 查询条件
+ * @return 查询条件
+ */
+ @Override
+ public LambdaQueryWrapper buildQueryWrapper(DesDrawingQueryReq req) {
+ LambdaQueryWrapper lqw = new LambdaQueryWrapper<>();
+ if (req == null) {
+ return lqw;
+ }
+ Long projectId = req.getProjectId();
+ String fileName = req.getFileName();
+ String fileType = req.getFileType();
+ String fileStatus = req.getFileStatus();
+ String originalName = req.getOriginalName();
+ String newest = req.getNewest();
+ lqw.like(StringUtils.isNotBlank(fileName), DesDrawing::getFileName, fileName);
+ lqw.like(StringUtils.isNotBlank(originalName), DesDrawing::getOriginalName, originalName);
+ lqw.eq(ObjectUtils.isNotEmpty(projectId), DesDrawing::getProjectId, projectId);
+ lqw.eq(StringUtils.isNotBlank(fileType), DesDrawing::getFileType, fileType);
+ lqw.eq(StringUtils.isNotBlank(fileStatus), DesDrawing::getFileStatus, fileStatus);
+ lqw.eq(StringUtils.isNotBlank(newest), DesDrawing::getNewest, newest);
+ return lqw;
+ }
+
+ /**
+ * 获取图纸管理对象视图
+ *
+ * @param drawingPage 图纸管理对象
+ * @return 图纸管理对象视图
+ */
+ @Override
+ public Page getVoPage(Page drawingPage) {
+ List drawingList = drawingPage.getRecords();
+ Page drawingVoPage = new Page<>(
+ drawingPage.getCurrent(),
+ drawingPage.getSize(),
+ drawingPage.getTotal());
+ if (CollUtil.isEmpty(drawingList)) {
+ return drawingVoPage;
+ }
+ List drawingVoList = drawingList.stream().map(entity -> {
+ DesDrawingVo drawingVo = new DesDrawingVo();
+ BeanUtils.copyProperties(entity, drawingVo);
+ return drawingVo;
+ }).toList();
+ drawingVoPage.setRecords(drawingVoList);
+ return drawingVoPage;
+ }
+
+ /**
+ * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
+ * 正常使用只需#processEvent.flowCode=='leave1'
+ * 示例为了方便则使用startsWith匹配了全部示例key
+ *
+ * @param processEvent 参数
+ */
+ @EventListener(condition = "#processEvent.flowCode.endsWith('drawing')")
+ public void processHandler(ProcessEvent processEvent) {
+ log.info("图纸审核任务执行了{}", processEvent.toString());
+ DesDrawing drawing = this.getById(Convert.toLong(processEvent.getBusinessId()));
+ drawing.setStatus(processEvent.getStatus());
+ if (processEvent.getSubmit()) {
+ drawing.setStatus(BusinessStatusEnum.WAITING.getStatus());
+ }
+ this.updateById(drawing);
+ }
+
+ /**
+ * 执行任务创建监听
+ * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
+ * 在方法中判断流程节点key
+ * if ("xxx".equals(processTaskEvent.getNodeCode())) {
+ * //执行业务逻辑
+ * }
+ *
+ * @param processTaskEvent 参数
+ */
+ @EventListener(condition = "#processTaskEvent.flowCode.endsWith('drawing')")
+ public void processTaskHandler(ProcessTaskEvent processTaskEvent) {
+ log.info("图纸审核任务创建了{}", processTaskEvent.toString());
+ }
+
+ /**
+ * 监听删除流程事件
+ * 正常使用只需#processDeleteEvent.flowCode=='leave1'
+ * 示例为了方便则使用startsWith匹配了全部示例key
+ *
+ * @param processDeleteEvent 参数
+ */
+ @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('drawing')")
+ public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) {
+ log.info("监听删除流程事件,图纸审核任务执行了{}", processDeleteEvent.toString());
+ DesDrawing drawing = this.getById(Convert.toLong(processDeleteEvent.getBusinessId()));
+ if (ObjectUtil.isNull(drawing)) {
+ return;
+ }
+ baseMapper.deleteById(drawing.getId());
+ }
+
+}
diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesTechnicalStandardServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesTechnicalStandardServiceImpl.java
index 75944578..c58d02c7 100644
--- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesTechnicalStandardServiceImpl.java
+++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesTechnicalStandardServiceImpl.java
@@ -46,7 +46,7 @@ import java.util.*;
import java.util.stream.Collectors;
/**
- * 技术管理标准Service业务层处理
+ * 技术标准管理Service业务层处理
*
* @author lcj
* @date 2025-07-02
@@ -71,16 +71,16 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl> queryFolderTreeList(DesTechnicalStandardQueryReq req) {
@@ -94,11 +94,11 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl queryFilePageByFolderId(DesTechnicalStandardFileQueryReq req, PageQuery pageQuery) {
@@ -123,10 +123,10 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl queryFileListByFolderId(Long folderId) {
@@ -168,7 +168,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl
+
+
+
+
diff --git a/xinnengyuan/script/sql/menuInitValue.sql b/xinnengyuan/script/sql/menuInitValue.sql
index cb19e5f5..373fbf8b 100644
--- a/xinnengyuan/script/sql/menuInitValue.sql
+++ b/xinnengyuan/script/sql/menuInitValue.sql
@@ -857,3 +857,53 @@ values(1938446866786041861, '分包方物料删除', 1938446866786041857, '4',
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
values(1938446866786041862, '分包方物料导出', 1938446866786041857, '5', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorMaterial:export', '#', 103, 1, sysdate(), null, null, '');
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496193, '技术标准管理', '1940300237524451330', '1', 'technicalStandard', 'design/technicalStandard/index', 1, 0, 'C', '0', '0', 'design:technicalStandard:list', '#', 103, 1, sysdate(), null, null, '技术标准管理菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496194, '技术标准管理查询', 1940302123455496193, '1', '#', '', 1, 0, 'F', '0', '0', 'design:technicalStandard:query', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496195, '技术标准管理新增', 1940302123455496193, '2', '#', '', 1, 0, 'F', '0', '0', 'design:technicalStandard:add', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496196, '技术标准管理修改', 1940302123455496193, '3', '#', '', 1, 0, 'F', '0', '0', 'design:technicalStandard:edit', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496197, '技术标准管理删除', 1940302123455496193, '4', '#', '', 1, 0, 'F', '0', '0', 'design:technicalStandard:remove', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940302123455496198, '技术标准管理导出', 1940302123455496193, '5', '#', '', 1, 0, 'F', '0', '0', 'design:technicalStandard:export', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu values('5', '测试菜单', '0', '5', 'demo', null, '', 1, 0, 'M', '0', '0', '', 'star', 103, 1, sysdate(), null, null, '测试菜单');
+
+-- 请假测试相关按钮
+insert into sys_menu VALUES (11638, '请假申请', 5, 1, 'leave', 'workflow/leave/index', '', 1, 0, 'C', '0', '0', 'workflow:leave:list', '#', 103, 1, sysdate(), NULL, NULL, '请假申请菜单');
+insert into sys_menu VALUES (11639, '请假申请查询', 11638, 1, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:query', '#', 103, 1, sysdate(), NULL, NULL, '');
+insert into sys_menu VALUES (11640, '请假申请新增', 11638, 2, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:add', '#', 103, 1, sysdate(), NULL, NULL, '');
+insert into sys_menu VALUES (11641, '请假申请修改', 11638, 3, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:edit', '#', 103, 1, sysdate(), NULL, NULL, '');
+insert into sys_menu VALUES (11642, '请假申请删除', 11638, 4, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:remove', '#', 103, 1, sysdate(), NULL, NULL, '');
+insert into sys_menu VALUES (11643, '请假申请导出', 11638, 5, '#', '', '', 1, 0, 'F', '0', '0', 'workflow:leave:export', '#', 103, 1, sysdate(), NULL, NULL, '');
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081217, '图纸管理', '1940300237524451330', '1', 'drawing', 'design/drawing/index', 1, 0, 'C', '0', '0', 'design:drawing:list', '#', 103, 1, sysdate(), null, null, '图纸管理菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081218, '图纸管理查询', 1940367276851081217, '1', '#', '', 1, 0, 'F', '0', '0', 'design:drawing:query', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081219, '图纸管理新增', 1940367276851081217, '2', '#', '', 1, 0, 'F', '0', '0', 'design:drawing:add', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081220, '图纸管理修改', 1940367276851081217, '3', '#', '', 1, 0, 'F', '0', '0', 'design:drawing:edit', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081221, '图纸管理删除', 1940367276851081217, '4', '#', '', 1, 0, 'F', '0', '0', 'design:drawing:remove', '#', 103, 1, sysdate(), null, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark)
+values(1940367276851081222, '图纸管理导出', 1940367276851081217, '5', '#', '', 1, 0, 'F', '0', '0', 'design:drawing:export', '#', 103, 1, sysdate(), null, null, '');
diff --git a/xinnengyuan/script/sql/ry_job.sql b/xinnengyuan/script/sql/ry_job.sql
index c6ec01b4..be0f5e1f 100644
--- a/xinnengyuan/script/sql/ry_job.sql
+++ b/xinnengyuan/script/sql/ry_job.sql
@@ -448,7 +448,7 @@ CREATE TABLE `sj_workflow`
`workflow_status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '工作流状态 0、关闭、1、开启',
`trigger_type` tinyint(4) NOT NULL COMMENT '触发类型 1.CRON 表达式 2. 固定时间',
`trigger_interval` varchar(255) NOT NULL COMMENT '间隔时长',
- `next_trigger_at` bigint(13) NOT NULL COMMENT '下次触发时间',
+ `next_trigger_at` bigint NOT NULL COMMENT '下次触发时间',
`block_strategy` tinyint(4) NOT NULL DEFAULT 1 COMMENT '阻塞策略 1、丢弃 2、覆盖 3、并行',
`executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
`description` varchar(256) NOT NULL DEFAULT '' COMMENT '描述',
diff --git a/xinnengyuan/script/sql/xinnengyuan.sql b/xinnengyuan/script/sql/xinnengyuan.sql
index 360aacc1..146ab566 100644
--- a/xinnengyuan/script/sql/xinnengyuan.sql
+++ b/xinnengyuan/script/sql/xinnengyuan.sql
@@ -1360,4 +1360,30 @@ CREATE TABLE `des_technical_standard`
`deleted_at` datetime null comment '删除时间',
primary key (`id`) using btree,
index `idx_project_id` (`project_id` asc) using btree comment '项目id'
-) comment '技术管理标准文档' collate = utf8mb4_unicode_ci;
+) comment '技术标准管理文档' collate = utf8mb4_unicode_ci;
+
+DROP TABLE IF EXISTS `des_drawing`;
+CREATE TABLE `des_drawing`
+(
+ `id` bigint not null auto_increment comment '主键id',
+ `project_id` bigint not null comment '项目id',
+ `version_number` varchar(50) not null comment '版本号',
+ `file_name` varchar(255) not null comment '文件名称',
+ `file_url` varchar(512) null comment '文件访问路径',
+ `file_type` char(1) not null comment '文件类型(1过程图纸 2蓝图 3变更图纸)',
+ `file_suffix` varchar(20) null comment '文件后缀',
+ `file_status` char(1) default '0' not null comment '状态(0正常 1删除)',
+ `original_name` varchar(255) null comment '原文件名',
+ `newest` char(1) default '1' not null comment '是否最新(0否 1是)',
+ `status` varchar(255) null comment '审核状态',
+ `remark` text null comment '备注',
+ `create_by` bigint null comment '创建者',
+ `update_by` bigint null comment '更新者',
+ `create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
+ `update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
+ `deleted_at` datetime null comment '删除时间',
+ primary key (`id`) using btree,
+ UNIQUE KEY `uk_project_type_newest` (`project_id`, `file_type`, `newest`),
+ index `idx_project_id` (`project_id` asc) using btree comment '项目id',
+ index `idx_file_type` (`file_type` asc) using btree comment '文件类型'
+) comment '图纸管理' collate = utf8mb4_unicode_ci;