[add] 图纸管理

This commit is contained in:
lcj
2025-07-03 09:51:35 +08:00
parent 275070a6ae
commit 90c6d9dc69
26 changed files with 1085 additions and 57 deletions

View File

@ -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:

View File

@ -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

View File

@ -105,6 +105,11 @@
<artifactId>ruoyi-common-jts</artifactId>
</dependency>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-workflow</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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);
}
}

View File

@ -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<DesDrawingVo> list(DesDrawingQueryReq req, PageQuery pageQuery) {
return desDrawingService.queryPageList(req, pageQuery);
}
/**
* 获取图纸管理详细信息
*
* @param id 主键
*/
@SaCheckPermission("design:drawing:query")
@GetMapping("/{id}")
public R<DesDrawingVo> 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<DesDrawingVo> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
return toAjax(desDrawingService.deleteByIds(List.of(ids)));
}
}

View File

@ -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<Void> 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<Void> 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<Void> 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<Void> 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<Void> recoveryBatchById(@NotNull(message = "主键不能为空")
@PathVariable Long[] ids) {

View File

@ -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;
}

View File

@ -10,7 +10,7 @@ import java.io.Serial;
import java.util.Date;
/**
* 技术管理标准对象 des_technical_standard
* 技术标准管理对象 des_technical_standard
*
* @author lcj
* @date 2025-07-02

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -9,7 +9,7 @@ import java.io.Serializable;
/**
* 技术管理标准视图对象 des_technical_standard
* 技术标准管理视图对象 des_technical_standard
*
* @author lcj
* @date 2025-07-02

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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<DesDrawing, DesDrawingVo> {
}

View File

@ -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

View File

@ -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<DesDrawing> {
/**
* 查询图纸管理
*
* @param id 主键
* @return 图纸管理
*/
DesDrawingVo queryById(Long id);
/**
* 分页查询图纸管理列表
*
* @param req 查询条件
* @param pageQuery 分页参数
* @return 图纸管理分页列表
*/
TableDataInfo<DesDrawingVo> queryPageList(DesDrawingQueryReq req, PageQuery pageQuery);
/**
* 查询符合条件的图纸管理列表
*
* @param req 查询条件
* @return 图纸管理列表
*/
List<DesDrawingVo> 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<Long> ids);
/**
* 构建图纸管理封装对象
*
* @param drawing 图纸管理
* @return 图纸管理封装对象
*/
DesDrawingVo getVo(DesDrawing drawing);
/**
* 构建查询条件
*
* @param req 查询条件
* @return 查询条件
*/
LambdaQueryWrapper<DesDrawing> buildQueryWrapper(DesDrawingQueryReq req);
/**
* 获取图纸管理对象视图
*
* @param drawingPage 图纸管理对象
* @return 图纸管理对象视图
*/
Page<DesDrawingVo> getVoPage(Page<DesDrawing> drawingPage);
}

View File

@ -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<DesTechnicalStandard> {
/**
* 查询技术管理标准
* 查询技术标准管理
*
* @param id 主键
* @return 技术管理标准
* @return 技术标准管理
*/
DesTechnicalStandardVo queryById(Long id);
/**
* 查询技术管理标准文件夹树列表
* 查询技术标准管理文件夹树列表
*
* @param req 查询参数
* @return 技术管理标准文件夹树列表
* @return 技术标准管理文件夹树列表
*/
List<Tree<Long>> queryFolderTreeList(DesTechnicalStandardQueryReq req);
/**
* 分页查询文件夹下的技术管理标准文件列表
* 分页查询文件夹下的技术标准管理文件列表
*
* @param req 查询参数
* @param pageQuery 分页参数
* @return 技术管理标准文件列表
* @return 技术标准管理文件列表
*/
TableDataInfo<DesTechnicalStandardVo> queryFilePageByFolderId(DesTechnicalStandardFileQueryReq req, PageQuery pageQuery);
/**
* 查询文件夹下的技术管理标准文件列表
* 查询文件夹下的技术标准管理文件列表
*
* @param folderId 文件夹id
* @return 技术管理标准文件列表
* @return 技术标准管理文件列表
*/
List<DesTechnicalStandardVo> queryFileListByFolderId(Long folderId);
@ -69,16 +69,16 @@ public interface IDesTechnicalStandardService extends IService<DesTechnicalStand
TableDataInfo<DesTechnicalStandardVo> 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<DesTechnicalStand
Boolean insertFolderByTemplate(Long projectId);
/**
* 修改技术管理标准文件
* 修改技术标准管理文件
*
* @param req 技术管理标准
* @param req 技术标准管理
* @return 是否修改成功
*/
Boolean updateFile(DesTechnicalStandardFileUpdateReq req);
/**
* 删除技术管理标准文件信息
* 删除技术标准管理文件信息
*
* @param id 待删除文件的主键
* @return 是否删除成功
@ -102,7 +102,7 @@ public interface IDesTechnicalStandardService extends IService<DesTechnicalStand
Boolean deleteFileById(Long id);
/**
* 批量删除技术管理标准回收站文件信息
* 批量删除技术标准管理回收站文件信息
*
* @param ids 待删除文件主键集合
* @return 是否删除成功

View File

@ -0,0 +1,325 @@
package org.dromara.design.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.constant.HttpStatus;
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
import org.dromara.common.core.domain.event.ProcessEvent;
import org.dromara.common.core.domain.event.ProcessTaskEvent;
import org.dromara.common.core.enums.BusinessStatusEnum;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.DateUtils;
import org.dromara.common.core.utils.ObjectUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.design.constant.DesDrawingConstant;
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.dromara.design.enums.DesDrawingFileTypeEnum;
import org.dromara.design.enums.DesDrawingNewestEnum;
import org.dromara.design.mapper.DesDrawingMapper;
import org.dromara.design.service.IDesDrawingService;
import org.dromara.project.service.IBusProjectService;
import org.dromara.system.domain.vo.SysOssUploadVo;
import org.dromara.system.service.ISysOssService;
import org.springframework.beans.BeanUtils;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.util.Collection;
import java.util.List;
/**
* 图纸管理Service业务层处理
*
* @author lcj
* @date 2025-07-02
*/
@Slf4j
@Service
public class DesDrawingServiceImpl extends ServiceImpl<DesDrawingMapper, DesDrawing>
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<DesDrawingVo> queryPageList(DesDrawingQueryReq req, PageQuery pageQuery) {
LambdaQueryWrapper<DesDrawing> lqw = buildQueryWrapper(req);
Page<DesDrawing> result = this.page(pageQuery.build(), lqw);
return TableDataInfo.build(this.getVoPage(result));
}
/**
* 查询符合条件的图纸管理列表
*
* @param req 查询条件
* @return 图纸管理列表
*/
@Override
public List<DesDrawingVo> queryList(DesDrawingQueryReq req) {
LambdaQueryWrapper<DesDrawing> 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<Long> 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<DesDrawing> buildQueryWrapper(DesDrawingQueryReq req) {
LambdaQueryWrapper<DesDrawing> 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<DesDrawingVo> getVoPage(Page<DesDrawing> drawingPage) {
List<DesDrawing> drawingList = drawingPage.getRecords();
Page<DesDrawingVo> drawingVoPage = new Page<>(
drawingPage.getCurrent(),
drawingPage.getSize(),
drawingPage.getTotal());
if (CollUtil.isEmpty(drawingList)) {
return drawingVoPage;
}
List<DesDrawingVo> 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());
}
}

View File

@ -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<DesTechnicalSta
public DesTechnicalStandardVo queryById(Long id) {
DesTechnicalStandard entity = this.getById(id);
if (entity == null) {
throw new ServiceException("质量知识库文件或文件夹不存在", HttpStatus.NOT_FOUND);
throw new ServiceException("技术标准管理文件或文件夹不存在", HttpStatus.NOT_FOUND);
}
return this.getVo(entity);
}
/**
* 查询质量知识库文件夹树列表
* 查询技术标准管理文件夹树列表
*
* @param req 查询参数
* @return 质量知识库文件夹树列表
* @return 技术标准管理文件夹树列表
*/
@Override
public List<Tree<Long>> queryFolderTreeList(DesTechnicalStandardQueryReq req) {
@ -94,11 +94,11 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
}
/**
* 查询文件夹下的质量知识库文件列表
* 查询文件夹下的技术标准管理文件列表
*
* @param req 查询参数
* @param pageQuery 分页参数
* @return 质量知识库文件列表
* @return 技术标准管理文件列表
*/
@Override
public TableDataInfo<DesTechnicalStandardVo> queryFilePageByFolderId(DesTechnicalStandardFileQueryReq req, PageQuery pageQuery) {
@ -123,10 +123,10 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
}
/**
* 查询文件夹下的质量知识库文件列表
* 查询文件夹下的技术标准管理文件列表
*
* @param folderId 文件夹id
* @return 质量知识库文件列表
* @return 技术标准管理文件列表
*/
@Override
public List<DesTechnicalStandardVo> queryFileListByFolderId(Long folderId) {
@ -168,7 +168,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
}
/**
* 新增质量知识库文件
* 新增技术标准管理文件
*
* @param file 文件
* @param req 质量知识库
@ -178,7 +178,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
public Boolean insertFile(MultipartFile file, DesTechnicalStandardFileCreateReq req) {
// 数据校验
if (ObjectUtils.isEmpty(file)) {
throw new ServiceException("文件不能为空", HttpStatus.BAD_REQUEST);
throw new ServiceException("技术标准管理文件不能为空", HttpStatus.BAD_REQUEST);
}
Long projectId = req.getProjectId();
if (projectService.getById(projectId) == null) {
@ -188,7 +188,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
String originalFilename = file.getOriginalFilename();
String suffix = FileUtil.getSuffix(originalFilename);
if (StringUtils.isBlank(suffix)) {
throw new ServiceException("文件格式错误", HttpStatus.BAD_REQUEST);
throw new ServiceException("技术标准管理文件格式错误", HttpStatus.BAD_REQUEST);
}
String date = DateUtils.getDate();
String uuid = IdUtil.fastSimpleUUID();
@ -226,7 +226,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
}
/**
* 新增质量知识库文件夹
* 新增技术标准管理文件夹
*
* @param projectId 项目id
* @return 是否新增成功
@ -263,7 +263,7 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
}
/**
* 修改质量知识库文件
* 修改技术标准管理文件
*
* @param req 质量知识库
* @return 是否修改成功
@ -273,19 +273,19 @@ public class DesTechnicalStandardServiceImpl extends ServiceImpl<DesTechnicalSta
Long id = req.getId();
DesTechnicalStandard oldDocument = this.getById(id);
if (oldDocument == null) {
throw new ServiceException("修改质量知识库文件失败,数据不存在", HttpStatus.NOT_FOUND);
throw new ServiceException("修改技术标准管理文件失败,数据不存在", HttpStatus.NOT_FOUND);
}
DesTechnicalStandard document = new DesTechnicalStandard();
BeanUtils.copyProperties(req, document);
boolean result = this.updateById(document);
if (!result) {
throw new ServiceException("修改质量知识库文件失败", HttpStatus.ERROR);
throw new ServiceException("修改技术标准管理文件失败", HttpStatus.ERROR);
}
return true;
}
/**
* 删除质量知识库文件信息
* 删除技术标准管理文件信息
*
* @param id 待删除文件的主键
* @return 是否删除成功

View File

@ -29,6 +29,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.contractor.domain.SubContractor;
import org.dromara.contractor.service.ISubContractorService;
import org.dromara.design.service.IDesTechnicalStandardService;
import org.dromara.facility.domain.FacMatrix;
import org.dromara.facility.domain.vo.matrix.FacMatrixBySubProjectVo;
import org.dromara.facility.service.IFacMatrixService;
@ -113,6 +114,10 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
@Resource
private IQltKnowledgeDocumentService qltKnowledgeDocumentService;
@Lazy
@Resource
private IDesTechnicalStandardService desTechnicalStandardService;
@Lazy
@Resource
private IBusProjectService self;
@ -432,6 +437,11 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
if (!saveQltKnowledgeDocument) {
log.error("同步数据失败,项目[{}]新增质量知识库文件夹模版失败", id);
}
// 技术标准管理文件夹模版
Boolean saveTechnicalStandard = desTechnicalStandardService.insertFolderByTemplate(id);
if (!saveTechnicalStandard) {
log.error("同步数据失败,项目[{}]新增技术标准管理文件夹模版失败", id);
}
// 新增岗位
Boolean postR = postService.insertPostByDeptId(project.getDeptId());
if (!postR) {

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.design.mapper.DesDrawingMapper">
</mapper>

View File

@ -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, '');

View File

@ -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 '描述',

View File

@ -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;