diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java new file mode 100644 index 00000000..a1180c09 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeCatalogController.java @@ -0,0 +1,112 @@ +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.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.DesVolumeFile; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq; +import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; +import org.dromara.design.service.IDesVolumeCatalogService; +import org.dromara.design.service.IDesVolumeFileService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 卷册目录 + * + * @author lilemy + * @date 2025-07-30 + */ +@Validated +@RestController +@RequestMapping("/design/volumeCatalog") +public class DesVolumeCatalogController extends BaseController { + + @Resource + private IDesVolumeCatalogService desVolumeCatalogService; + + @Resource + private IDesVolumeFileService volumeFileService; + + /** + * 查询卷册目录列表 + */ + @SaCheckPermission("design:volumeCatalog:list") + @GetMapping("/list") + public TableDataInfo list(DesVolumeCatalogQueryReq req, PageQuery pageQuery) { + return desVolumeCatalogService.queryPageList(req, pageQuery); + } + + /** + * 获取卷册目录详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:volumeCatalog:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desVolumeCatalogService.queryById(id)); + } + + /** + * 获取卷册目录文件列表 + * + * @param id 主键 + */ + @SaCheckPermission("design:volumeCatalog:listFile") + @GetMapping("/listFileById/{id}") + public R> listFileById(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + List volumeFiles = desVolumeCatalogService.queryFileListById(id); + return R.ok(volumeFileService.getVoList(volumeFiles)); + } + + /** + * 新增卷册目录 + */ + @SaCheckPermission("design:volumeCatalog:add") + @Log(title = "卷册目录", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated @RequestBody DesVolumeCatalogCreateReq req) { + return toAjax(desVolumeCatalogService.insertByBo(req)); + } + + /** + * 修改卷册目录 + */ + @SaCheckPermission("design:volumeCatalog:edit") + @Log(title = "卷册目录", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated @RequestBody DesVolumeCatalogUpdateReq req) { + return toAjax(desVolumeCatalogService.updateByBo(req)); + } + + /** + * 删除卷册目录 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:volumeCatalog:remove") + @Log(title = "卷册目录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desVolumeCatalogService.deleteByIds(List.of(ids))); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeFileController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeFileController.java new file mode 100644 index 00000000..95e72fb8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesVolumeFileController.java @@ -0,0 +1,71 @@ +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.AddGroup; +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.web.core.BaseController; +import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; +import org.dromara.design.service.IDesVolumeFileService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 卷册文件 + * + * @author lilemy + * @date 2025-07-30 + */ +@Validated +@RestController +@RequestMapping("/design/volumeFile") +public class DesVolumeFileController extends BaseController { + + @Resource + private IDesVolumeFileService desVolumeFileService; + + /** + * 获取卷册文件详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:volumeFile:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desVolumeFileService.queryById(id)); + } + + /** + * 新增卷册文件 + */ + @SaCheckPermission("design:volumeFile:add") + @Log(title = "卷册文件", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesVolumeFileCreateReq req) { + return toAjax(desVolumeFileService.insertByBo(req)); + } + + + /** + * 删除卷册文件 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:volumeFile:remove") + @Log(title = "卷册文件", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desVolumeFileService.deleteByIds(List.of(ids))); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeCatalog.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeCatalog.java new file mode 100644 index 00000000..80aaf348 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeCatalog.java @@ -0,0 +1,56 @@ +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; + +/** + * 卷册目录对象 des_volume_catalog + * + * @author lilemy + * @date 2025-07-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_volume_catalog") +public class DesVolumeCatalog extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 设计子项ID + */ + private Long designSubitemId; + + /** + * 卷册号 + */ + private String volumeNumber; + + /** + * 资料名称 + */ + private String documentName; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFile.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFile.java new file mode 100644 index 00000000..bd0ae0ce --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFile.java @@ -0,0 +1,60 @@ +package org.dromara.design.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 卷册文件对象 des_volume_file + * + * @author lilemy + * @date 2025-07-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_volume_file") +public class DesVolumeFile extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 卷册目录ID + */ + private Long volumeCatalogId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 文件ID + */ + private Long fileId; + + /** + * 说明 + */ + private String explainText; + + /** + * 状态(1正常 2作废) + */ + private String status; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFileViewer.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFileViewer.java new file mode 100644 index 00000000..08b1c02d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesVolumeFileViewer.java @@ -0,0 +1,44 @@ +package org.dromara.design.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 卷册文件查阅人对象 des_volume_file_viewer + * + * @author lilemy + * @date 2025-07-30 + */ +@Data +@TableName("des_volume_file_viewer") +public class DesVolumeFileViewer implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 卷册目录ID + */ + private Long volumeCatalogId; + + /** + * 用户ID + */ + private Long userId; + + /** + * 状态(1未查阅 2已查阅) + */ + private String status; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogCreateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogCreateReq.java new file mode 100644 index 00000000..aace929b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogCreateReq.java @@ -0,0 +1,48 @@ +package org.dromara.design.domain.dto.volumecatalog; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-07-30 17:42 + */ +@Data +public class DesVolumeCatalogCreateReq implements Serializable { + + @Serial + private static final long serialVersionUID = -3744599698793487153L; + + /** + * 项目ID + */ + @NotNull(message = "项目ID不能为空") + private Long projectId; + + /** + * 设计子项ID + */ + private Long designSubitemId; + + /** + * 卷册号 + */ + @NotBlank(message = "卷册号不能为空") + private String volumeNumber; + + /** + * 资料名称 + */ + @NotBlank(message = "资料名称不能为空") + private String documentName; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogQueryReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogQueryReq.java new file mode 100644 index 00000000..dccf0057 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogQueryReq.java @@ -0,0 +1,38 @@ +package org.dromara.design.domain.dto.volumecatalog; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-07-30 17:42 + */ +@Data +public class DesVolumeCatalogQueryReq implements Serializable { + + @Serial + private static final long serialVersionUID = 7351269273770370158L; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 设计子项ID + */ + private Long designSubitemId; + + /** + * 卷册号 + */ + private String volumeNumber; + + /** + * 资料名称 + */ + private String documentName; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogUpdateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogUpdateReq.java new file mode 100644 index 00000000..75616a71 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumecatalog/DesVolumeCatalogUpdateReq.java @@ -0,0 +1,40 @@ +package org.dromara.design.domain.dto.volumecatalog; + +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-07-30 17:42 + */ +@Data +public class DesVolumeCatalogUpdateReq implements Serializable { + + @Serial + private static final long serialVersionUID = -7149075378890527995L; + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空") + private Long id; + + /** + * 卷册号 + */ + private String volumeNumber; + + /** + * 资料名称 + */ + private String documentName; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumefile/DesVolumeFileCreateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumefile/DesVolumeFileCreateReq.java new file mode 100644 index 00000000..6055b524 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/volumefile/DesVolumeFileCreateReq.java @@ -0,0 +1,49 @@ +package org.dromara.design.domain.dto.volumefile; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + +/** + * @author lilemy + * @date 2025-07-30 19:00 + */ +@Data +public class DesVolumeFileCreateReq implements Serializable { + + @Serial + private static final long serialVersionUID = -8891991367976083609L; + + /** + * 卷册目录ID + */ + private Long volumeCatalogId; + + /** + * 文件ID + */ + private Long fileId; + + /** + * 作废文件id列表 + */ + private List cancellationIds; + + /** + * 查阅人id列表 + */ + private List userIds; + + /** + * 说明 + */ + private String explainText; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumecatalog/DesVolumeCatalogVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumecatalog/DesVolumeCatalogVo.java new file mode 100644 index 00000000..734406c3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumecatalog/DesVolumeCatalogVo.java @@ -0,0 +1,72 @@ +package org.dromara.design.domain.vo.volumecatalog; + +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.design.domain.DesVolumeCatalog; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; +import org.dromara.system.domain.vo.SysUserVo; + +import java.io.Serial; +import java.io.Serializable; +import java.util.List; + + +/** + * 卷册目录视图对象 des_volume_catalog + * + * @author lilemy + * @date 2025-07-30 + */ +@Data +@AutoMapper(target = DesVolumeCatalog.class) +public class DesVolumeCatalogVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private Long id; + + /** + * 项目ID + */ + private Long projectId; + + /** + * 设计子项ID + */ + private Long designSubitemId; + + /** + * 卷册号 + */ + private String volumeNumber; + + /** + * 资料名称 + */ + private String documentName; + + /** + * 文件列表 + */ + private List fileVoList; + + /** + * 查阅人列表 + */ + private List viewerList; + + /** + * 未查阅人列表 + */ + private List noViewerList; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefile/DesVolumeFileVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefile/DesVolumeFileVo.java new file mode 100644 index 00000000..ff5f6fc8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefile/DesVolumeFileVo.java @@ -0,0 +1,64 @@ +package org.dromara.design.domain.vo.volumefile; + +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.design.domain.DesVolumeFile; + +import java.io.Serial; +import java.io.Serializable; + + +/** + * 卷册文件视图对象 des_volume_file + * + * @author lilemy + * @date 2025-07-30 + */ +@Data +@AutoMapper(target = DesVolumeFile.class) +public class DesVolumeFileVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private Long id; + + /** + * 卷册目录ID + */ + private Long volumeCatalogId; + + /** + * 文件ID + */ + private Long fileId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 文件路径 + */ + private String fileUrl; + + /** + * 说明 + */ + private String explainText; + + /** + * 状态(1正常 2作废) + */ + private String status; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefileviewer/DesVolumeFileViewerVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefileviewer/DesVolumeFileViewerVo.java new file mode 100644 index 00000000..92e80fdf --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/volumefileviewer/DesVolumeFileViewerVo.java @@ -0,0 +1,37 @@ +package org.dromara.design.domain.vo.volumefileviewer; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-07-30 19:52 + */ +@Data +public class DesVolumeFileViewerVo implements Serializable { + + @Serial + private static final long serialVersionUID = 8098890355435832859L; + + /** + * 主键ID + */ + private Long id; + + /** + * 卷册目录ID + */ + private Long volumeCatalogId; + + /** + * 用户ID + */ + private Long userId; + + /** + * 状态(1未查阅 2已查阅) + */ + private String status; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeCatalogMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeCatalogMapper.java new file mode 100644 index 00000000..463eaf10 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeCatalogMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesVolumeCatalog; +import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 卷册目录Mapper接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface DesVolumeCatalogMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileMapper.java new file mode 100644 index 00000000..021b5924 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesVolumeFile; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 卷册文件Mapper接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface DesVolumeFileMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileViewerMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileViewerMapper.java new file mode 100644 index 00000000..cf21fd9c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesVolumeFileViewerMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.design.domain.DesVolumeFileViewer; +import org.dromara.design.domain.vo.volumefileviewer.DesVolumeFileViewerVo; + +/** + * 卷册文件查阅人Mapper接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface DesVolumeFileViewerMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeCatalogService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeCatalogService.java new file mode 100644 index 00000000..5a4efd8c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeCatalogService.java @@ -0,0 +1,106 @@ +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.DesVolumeCatalog; +import org.dromara.design.domain.DesVolumeFile; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq; +import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo; + +import java.util.Collection; +import java.util.List; + +/** + * 卷册目录Service接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface IDesVolumeCatalogService extends IService { + + /** + * 查询卷册目录 + * + * @param id 主键 + * @return 卷册目录 + */ + DesVolumeCatalogVo queryById(Long id); + + /** + * 分页查询卷册目录列表 + * + * @param req 查询条件 + * @param pageQuery 分页参数 + * @return 卷册目录分页列表 + */ + TableDataInfo queryPageList(DesVolumeCatalogQueryReq req, PageQuery pageQuery); + + /** + * 查询符合条件的卷册目录列表 + * + * @param req 查询条件 + * @return 卷册目录列表 + */ + List queryList(DesVolumeCatalogQueryReq req); + + /** + * 根据id查询卷册目录文件列表 + * + * @param id 卷册目录id + * @return 卷册目录文件列表 + */ + List queryFileListById(Long id); + + /** + * 新增卷册目录 + * + * @param req 卷册目录 + * @return 是否新增成功 + */ + Boolean insertByBo(DesVolumeCatalogCreateReq req); + + /** + * 修改卷册目录 + * + * @param req 卷册目录 + * @return 是否修改成功 + */ + Boolean updateByBo(DesVolumeCatalogUpdateReq req); + + /** + * 批量删除卷册目录信息 + * + * @param ids 待删除的主键集合 + * @return 是否删除成功 + */ + Boolean deleteByIds(Collection ids); + + /** + * 构建卷册目录封装对象 + * + * @param volumeCatalog 卷册目录 + * @return 卷册目录封装对象 + */ + DesVolumeCatalogVo getVo(DesVolumeCatalog volumeCatalog); + + /** + * 构建查询条件 + * + * @param req 查询条件 + * @return 查询条件 + */ + LambdaQueryWrapper buildQueryWrapper(DesVolumeCatalogQueryReq req); + + /** + * 获取卷册目录对象视图 + * + * @param volumeCatalogPage 卷册目录对象 + * @return 卷册目录对象视图 + */ + Page getVoPage(Page volumeCatalogPage); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileService.java new file mode 100644 index 00000000..814e0b18 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileService.java @@ -0,0 +1,67 @@ +package org.dromara.design.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.design.domain.DesVolumeFile; +import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; + +import java.util.Collection; +import java.util.List; + +/** + * 卷册文件Service接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface IDesVolumeFileService extends IService { + + /** + * 查询卷册文件 + * + * @param id 主键 + * @return 卷册文件 + */ + DesVolumeFileVo queryById(Long id); + + /** + * 新增卷册文件 + * + * @param req 卷册文件 + * @return 是否新增成功 + */ + Boolean insertByBo(DesVolumeFileCreateReq req); + + /** + * 批量删除卷册文件信息 + * + * @param ids 待删除的主键集合 + * @return 是否删除成功 + */ + Boolean deleteByIds(Collection ids); + + /** + * 构建卷册目录封装对象 + * + * @param volumeFile 卷册目录 + * @return 卷册目录封装对象 + */ + DesVolumeFileVo getVo(DesVolumeFile volumeFile); + + /** + * 获取卷册目录列表视图 + * + * @param volumeFileList 卷册目录列表 + * @return 卷册目录列表视图 + */ + List getVoList(List volumeFileList); + + /** + * 获取卷册目录对象视图 + * + * @param volumeFilePage 卷册目录对象 + * @return 卷册目录对象视图 + */ + Page getVoPage(Page volumeFilePage); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileViewerService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileViewerService.java new file mode 100644 index 00000000..5b79b861 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesVolumeFileViewerService.java @@ -0,0 +1,14 @@ +package org.dromara.design.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.design.domain.DesVolumeFileViewer; + +/** + * 卷册文件查阅人Service接口 + * + * @author lilemy + * @date 2025-07-30 + */ +public interface IDesVolumeFileViewerService extends IService { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java new file mode 100644 index 00000000..5e521efc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeCatalogServiceImpl.java @@ -0,0 +1,265 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.collection.CollUtil; +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 org.dromara.common.core.constant.HttpStatus; +import org.dromara.common.core.exception.ServiceException; +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.domain.DesVolumeCatalog; +import org.dromara.design.domain.DesVolumeFile; +import org.dromara.design.domain.DesVolumeFileViewer; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq; +import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq; +import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo; +import org.dromara.design.mapper.DesVolumeCatalogMapper; +import org.dromara.design.service.IDesVolumeCatalogService; +import org.dromara.design.service.IDesVolumeFileService; +import org.dromara.design.service.IDesVolumeFileViewerService; +import org.dromara.project.service.IBusProjectService; +import org.springframework.beans.BeanUtils; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Collection; +import java.util.List; + +/** + * 卷册目录Service业务层处理 + * + * @author lilemy + * @date 2025-07-30 + */ +@Service +public class DesVolumeCatalogServiceImpl extends ServiceImpl + implements IDesVolumeCatalogService { + + @Resource + private IBusProjectService projectService; + + @Lazy + @Resource + private IDesVolumeFileService volumeFileService; + + @Resource + private IDesVolumeFileViewerService volumeFileViewerService; + + /** + * 查询卷册目录 + * + * @param id 主键 + * @return 卷册目录 + */ + @Override + public DesVolumeCatalogVo queryById(Long id) { + DesVolumeCatalog volumeCatalog = this.getById(id); + if (volumeCatalog == null) { + throw new ServiceException("卷册目录信息不存在", HttpStatus.NOT_FOUND); + } + return this.getVo(volumeCatalog); + } + + /** + * 分页查询卷册目录列表 + * + * @param req 查询条件 + * @param pageQuery 分页参数 + * @return 卷册目录分页列表 + */ + @Override + public TableDataInfo queryPageList(DesVolumeCatalogQueryReq req, PageQuery pageQuery) { + Page result = this.page(pageQuery.build(), this.buildQueryWrapper(req)); + return TableDataInfo.build(this.getVoPage(result)); + } + + /** + * 查询符合条件的卷册目录列表 + * + * @param req 查询条件 + * @return 卷册目录列表 + */ + @Override + public List queryList(DesVolumeCatalogQueryReq req) { + return this.list(this.buildQueryWrapper(req)).stream().map(this::getVo).toList(); + } + + /** + * 根据id查询卷册目录文件列表 + * + * @param id 卷册目录id + * @return 卷册目录文件列表 + */ + @Override + public List queryFileListById(Long id) { + return volumeFileService.lambdaQuery() + .eq(DesVolumeFile::getVolumeCatalogId, id) + .list(); + } + + /** + * 新增卷册目录 + * + * @param req 卷册目录 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesVolumeCatalogCreateReq req) { + Long projectId = req.getProjectId(); + if (projectService.getById(projectId) == null) { + throw new ServiceException("对应项目不存在", HttpStatus.NOT_FOUND); + } + // 判断是否重名 + Long count = this.lambdaQuery() + .eq(DesVolumeCatalog::getProjectId, projectId) + .and(lqw -> lqw + .eq(DesVolumeCatalog::getVolumeNumber, req.getVolumeNumber()) + .or() + .eq(DesVolumeCatalog::getDocumentName, req.getDocumentName())) + .count(); + if (count > 0) { + throw new ServiceException("卷册目录已存在", HttpStatus.BAD_REQUEST); + } + DesVolumeCatalog volumeCatalog = new DesVolumeCatalog(); + BeanUtils.copyProperties(req, volumeCatalog); + boolean save = this.save(volumeCatalog); + if (!save) { + throw new ServiceException("卷册目录新增失败", HttpStatus.ERROR); + } + return true; + } + + /** + * 修改卷册目录 + * + * @param req 卷册目录 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesVolumeCatalogUpdateReq req) { + // 判断卷册目录是否存在 + DesVolumeCatalog oldVolumeCatalog = this.getById(req.getId()); + if (oldVolumeCatalog == null) { + throw new ServiceException("卷册目录不存在", HttpStatus.ERROR); + } + // 判断是否重名 + Long count = this.lambdaQuery() + .eq(DesVolumeCatalog::getProjectId, oldVolumeCatalog.getProjectId()) + .and(lqw -> lqw + .eq(DesVolumeCatalog::getVolumeNumber, req.getVolumeNumber()) + .or() + .eq(DesVolumeCatalog::getDocumentName, req.getDocumentName())) + .ne(DesVolumeCatalog::getId, req.getId()) + .count(); + if (count > 0) { + throw new ServiceException("卷册目录已存在", HttpStatus.BAD_REQUEST); + } + // 修改数据 + DesVolumeCatalog volumeCatalog = new DesVolumeCatalog(); + BeanUtils.copyProperties(req, volumeCatalog); + boolean update = this.updateById(volumeCatalog); + if (!update) { + throw new ServiceException("卷册目录修改失败", HttpStatus.ERROR); + } + return true; + } + + /** + * 批量删除卷册目录信息 + * + * @param ids 待删除的主键集合 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteByIds(Collection ids) { + // 查询卷册下是否有文件 + Long count = volumeFileService.lambdaQuery() + .in(DesVolumeFile::getVolumeCatalogId, ids) + .count(); + if (count > 0) { + throw new ServiceException("请先删除卷册下的文件", HttpStatus.CONFLICT); + } + // 关联删除查阅人信息 + List viewerList = volumeFileViewerService.lambdaQuery() + .in(DesVolumeFileViewer::getVolumeCatalogId, ids) + .list(); + if (CollUtil.isNotEmpty(viewerList)) { + volumeFileViewerService.removeBatchByIds(viewerList); + } + return this.removeBatchByIds(ids); + } + + /** + * 构建卷册目录封装对象 + * + * @param volumeCatalog 卷册目录 + * @return 卷册目录封装对象 + */ + @Override + public DesVolumeCatalogVo getVo(DesVolumeCatalog volumeCatalog) { + DesVolumeCatalogVo vo = new DesVolumeCatalogVo(); + if (volumeCatalog == null) { + return vo; + } + BeanUtils.copyProperties(volumeCatalog, vo); + // 关联文件信息 + List volumeFiles = this.queryFileListById(volumeCatalog.getId()); + vo.setFileVoList(volumeFileService.getVoList(volumeFiles)); + return vo; + } + + /** + * 构建查询条件 + * + * @param req 查询条件 + * @return 查询条件 + */ + @Override + public LambdaQueryWrapper buildQueryWrapper(DesVolumeCatalogQueryReq req) { + LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); + if (req == null) { + return lqw; + } + Long projectId = req.getProjectId(); + Long designSubitemId = req.getDesignSubitemId(); + String volumeNumber = req.getVolumeNumber(); + String documentName = req.getDocumentName(); + lqw.like(StringUtils.isNotBlank(documentName), DesVolumeCatalog::getDocumentName, documentName); + lqw.eq(StringUtils.isNotBlank(volumeNumber), DesVolumeCatalog::getVolumeNumber, volumeNumber); + lqw.eq(ObjectUtils.isNotEmpty(projectId), DesVolumeCatalog::getProjectId, projectId); + lqw.eq(ObjectUtils.isNotEmpty(designSubitemId), DesVolumeCatalog::getDesignSubitemId, designSubitemId); + return lqw; + } + + /** + * 获取卷册目录对象视图 + * + * @param volumeCatalogPage 卷册目录对象 + * @return 卷册目录对象视图 + */ + @Override + public Page getVoPage(Page volumeCatalogPage) { + List volumeCatalogList = volumeCatalogPage.getRecords(); + Page volumeCatalogVoPage = new Page<>( + volumeCatalogPage.getCurrent(), + volumeCatalogPage.getSize(), + volumeCatalogPage.getTotal()); + if (CollUtil.isEmpty(volumeCatalogList)) { + return volumeCatalogVoPage; + } + List volumeCatalogVoList = volumeCatalogList.stream().map(entity -> { + DesVolumeCatalogVo volumeCatalogVo = new DesVolumeCatalogVo(); + BeanUtils.copyProperties(entity, volumeCatalogVo); + return volumeCatalogVo; + }).toList(); + return volumeCatalogVoPage.setRecords(volumeCatalogVoList); + } + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileServiceImpl.java new file mode 100644 index 00000000..a7cb3884 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileServiceImpl.java @@ -0,0 +1,195 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.collection.CollUtil; +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 org.dromara.common.core.constant.HttpStatus; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.design.domain.DesVolumeCatalog; +import org.dromara.design.domain.DesVolumeFile; +import org.dromara.design.domain.DesVolumeFileViewer; +import org.dromara.design.domain.dto.volumefile.DesVolumeFileCreateReq; +import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo; +import org.dromara.design.mapper.DesVolumeFileMapper; +import org.dromara.design.service.IDesVolumeCatalogService; +import org.dromara.design.service.IDesVolumeFileService; +import org.dromara.design.service.IDesVolumeFileViewerService; +import org.dromara.system.domain.vo.SysOssVo; +import org.dromara.system.service.ISysOssService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.List; + +/** + * 卷册文件Service业务层处理 + * + * @author lilemy + * @date 2025-07-30 + */ +@Service +public class DesVolumeFileServiceImpl extends ServiceImpl + implements IDesVolumeFileService { + + @Resource + private ISysOssService ossService; + + @Resource + private IDesVolumeCatalogService volumeCatalogService; + + @Resource + private IDesVolumeFileViewerService volumeFileViewerService; + + /** + * 查询卷册文件 + * + * @param id 主键 + * @return 卷册文件 + */ + @Override + public DesVolumeFileVo queryById(Long id) { + DesVolumeFile volumeFile = getById(id); + if (volumeFile == null) { + throw new ServiceException("对应卷册文件信息不存在", HttpStatus.NOT_FOUND); + } + return getVo(volumeFile); + } + + /** + * 新增卷册文件 + * + * @param req 卷册文件 + * @return 是否新增成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean insertByBo(DesVolumeFileCreateReq req) { + // 查看卷册是否存在 + Long volumeCatalogId = req.getVolumeCatalogId(); + DesVolumeCatalog volumeCatalog = volumeCatalogService.getById(volumeCatalogId); + if (volumeCatalog == null) { + throw new ServiceException("对应卷册目录不存在", HttpStatus.NOT_FOUND); + } + // 查看文件是否存在 + SysOssVo ossVo = ossService.getById(req.getFileId()); + if (ossVo == null) { + throw new ServiceException("对应文件不存在", HttpStatus.NOT_FOUND); + } + // 判断是否需要废除其他文件 + List cancellationIds = req.getCancellationIds(); + if (CollUtil.isNotEmpty(cancellationIds)) { + List list = this.listByIds(cancellationIds); + list.forEach(item -> { + String name = item.getFileName(); + String modified = name.replaceAll("((\\d{8}))", "($1-已作废)"); + item.setFileName(modified); + item.setStatus("2"); + }); + boolean update = this.updateBatchById(list); + if (!update) { + throw new ServiceException("更新卷册文件信息异常", HttpStatus.ERROR); + } + } + DesVolumeFile file = new DesVolumeFile(); + BeanUtils.copyProperties(req, file); + String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); + file.setFileName(ossVo.getFileName() + "(" + today + ")"); + // 新增审阅人 + List userIds = req.getUserIds(); + List viewerList = userIds.stream().map(userId -> { + DesVolumeFileViewer viewer = new DesVolumeFileViewer(); + viewer.setVolumeCatalogId(volumeCatalogId); + viewer.setUserId(userId); + return viewer; + }).toList(); + if (CollUtil.isNotEmpty(viewerList)) { + // 删除以前的审阅人 + boolean remove = volumeFileViewerService.remove(new LambdaQueryWrapper() + .eq(DesVolumeFileViewer::getVolumeCatalogId, volumeCatalogId)); + if (!remove) { + throw new ServiceException("修改审阅人失败", HttpStatus.ERROR); + } + boolean result = volumeFileViewerService.saveBatch(viewerList); + if (!result) { + throw new ServiceException("修改审阅人失败", HttpStatus.ERROR); + } + } + boolean save = this.save(file); + if (!save) { + throw new ServiceException("新增卷册文件信息异常", HttpStatus.ERROR); + } + return true; + } + + /** + * 批量删除卷册文件信息 + * + * @param ids 待删除的主键集合 + * @return 是否删除成功 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean deleteByIds(Collection ids) { + return this.removeBatchByIds(ids); + } + + /** + * 构建卷册目录封装对象 + * + * @param volumeFile 卷册目录 + * @return 卷册目录封装对象 + */ + @Override + public DesVolumeFileVo getVo(DesVolumeFile volumeFile) { + DesVolumeFileVo vo = new DesVolumeFileVo(); + if (volumeFile == null) { + return vo; + } + BeanUtils.copyProperties(volumeFile, vo); + // 关联文件信息 + Long fileId = volumeFile.getFileId(); + SysOssVo ossVo = ossService.getById(fileId); + vo.setFileUrl(ossVo.getUrl()); + vo.setFileName(ossVo.getFileName()); + return vo; + } + + /** + * 获取卷册目录列表视图 + * + * @param volumeFileList 卷册目录列表 + * @return 卷册目录列表视图 + */ + @Override + public List getVoList(List volumeFileList) { + return volumeFileList.stream().map(this::getVo).toList(); + } + + /** + * 获取卷册目录对象视图 + * + * @param volumeFilePage 卷册目录对象 + * @return 卷册目录对象视图 + */ + @Override + public Page getVoPage(Page volumeFilePage) { + List volumeFileList = volumeFilePage.getRecords(); + Page volumeFileVoPage = new Page<>( + volumeFilePage.getCurrent(), + volumeFilePage.getSize(), + volumeFilePage.getTotal()); + if (CollUtil.isEmpty(volumeFileList)) { + return volumeFileVoPage; + } + List volumeFileVoList = volumeFileList.stream().map(this::getVo).toList(); + volumeFileVoPage.setRecords(volumeFileVoList); + return volumeFileVoPage; + } + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileViewerServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileViewerServiceImpl.java new file mode 100644 index 00000000..0b977265 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesVolumeFileViewerServiceImpl.java @@ -0,0 +1,19 @@ +package org.dromara.design.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.design.domain.DesVolumeFileViewer; +import org.dromara.design.mapper.DesVolumeFileViewerMapper; +import org.dromara.design.service.IDesVolumeFileViewerService; +import org.springframework.stereotype.Service; + +/** + * 卷册文件查阅人Service业务层处理 + * + * @author lilemy + * @date 2025-07-30 + */ +@Service +public class DesVolumeFileViewerServiceImpl extends ServiceImpl + implements IDesVolumeFileViewerService { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java index 755775a7..28e19e3e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/controller/PgsProgressCategoryController.java @@ -6,14 +6,13 @@ import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import org.dromara.common.core.domain.R; -import org.dromara.common.core.validate.AddGroup; import org.dromara.common.core.validate.EditGroup; import org.dromara.common.excel.utils.ExcelUtil; 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.web.core.BaseController; -import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq; +import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreatePriceReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryQueryReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryUpdateReq; import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryCoordinateVo; @@ -110,14 +109,14 @@ public class PgsProgressCategoryController extends BaseController { } /** - * 新增进度类别 + * 新增分项工程单价 */ @SaCheckPermission("progress:progressCategory:add") @Log(title = "进度类别", businessType = BusinessType.INSERT) @RepeatSubmit() - @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody PgsProgressCategoryCreateReq req) { - return R.ok(pgsProgressCategoryService.insertByBo(req)); + @PostMapping("/price") + public R addPrice(@Validated @RequestBody PgsProgressCategoryCreatePriceReq req) { + return toAjax(pgsProgressCategoryService.insertPrice(req)); } /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/PgsProgressCategory.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/PgsProgressCategory.java index c885c5ac..73574b5a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/PgsProgressCategory.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/PgsProgressCategory.java @@ -59,6 +59,21 @@ public class PgsProgressCategory extends BaseEntity { */ private String unitType; + /** + * 计量单位 + */ + private String unit; + + /** + * 综合单价 + */ + private BigDecimal unitPrice; + + /** + * 产值金额 + */ + private BigDecimal outputValue; + /** * 总数量/百分比 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreatePriceReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreatePriceReq.java new file mode 100644 index 00000000..f7d9d286 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreatePriceReq.java @@ -0,0 +1,39 @@ +package org.dromara.progress.domain.dto.progresscategory; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author lilemy + * @date 2025/5/26 9:46 + */ +@Data +public class PgsProgressCategoryCreatePriceReq { + + /** + * 类别id + */ + private Long id; + + /** + * 计量单位 + */ + private String unit; + + /** + * 综合单价 + */ + private BigDecimal unitPrice; + + /** + * 产值金额 + */ + private BigDecimal outputValue; + + /** + * 备注 + */ + private String remark; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreateReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreateReq.java deleted file mode 100644 index a84f7d91..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progresscategory/PgsProgressCategoryCreateReq.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.dromara.progress.domain.dto.progresscategory; - -import lombok.Data; - -/** - * @author lilemy - * @date 2025/5/26 9:46 - */ -@Data -public class PgsProgressCategoryCreateReq { - - /** - * 父类别id - */ - private Long pid; - - /** - * 项目id - */ - private Long projectId; - - /** - * 方阵id - */ - private Long matrixId; - - /** - * 类别名称 - */ - private String name; - - /** - * 计量方式(0无 1数量 2百分比) - */ - private String unitType; - - /** - * 备注 - */ - private String remark; - -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progressplan/PgsProgressPlanCompletionQueryReq.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progressplan/PgsProgressPlanCompletionQueryReq.java new file mode 100644 index 00000000..dce2d050 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/dto/progressplan/PgsProgressPlanCompletionQueryReq.java @@ -0,0 +1,49 @@ +package org.dromara.progress.domain.dto.progressplan; + +import com.fasterxml.jackson.annotation.JsonFormat; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + +/** + * @author lilemy + * @date 2025-07-31 11:09 + */ +@Data +public class PgsProgressPlanCompletionQueryReq implements Serializable { + + @Serial + private static final long serialVersionUID = -164680742400225346L; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空") + private Long projectId; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 进度类型id + */ + private Long progressCategoryId; + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + private Date startDate; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") + private Date endDate; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/vo/progressplan/PgsProgressPlanCompletionVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/vo/progressplan/PgsProgressPlanCompletionVo.java new file mode 100644 index 00000000..c55df83a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/domain/vo/progressplan/PgsProgressPlanCompletionVo.java @@ -0,0 +1,37 @@ +package org.dromara.progress.domain.vo.progressplan; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * @author lilemy + * @date 2025-07-31 11:05 + */ +@Data +public class PgsProgressPlanCompletionVo implements Serializable { + + @Serial + private static final long serialVersionUID = -8747773569107876299L; + + /** + * 子项目id + */ + private Long subProjectId; + + /** + * 子项目名称 + */ + private String subProjectName; + + /** + * 方阵id + */ + private Long matrixId; + + /** + * 方阵名称 + */ + private String matrixName; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/IPgsProgressCategoryService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/IPgsProgressCategoryService.java index 0954ef61..cb3ea984 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/IPgsProgressCategoryService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/IPgsProgressCategoryService.java @@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.IService; import org.dromara.facility.domain.FacMatrix; import org.dromara.progress.domain.PgsProgressCategory; -import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq; +import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreatePriceReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryQueryReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryUpdateReq; import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryCoordinateVo; @@ -48,12 +48,12 @@ public interface IPgsProgressCategoryService extends IService { */ TableDataInfo queryPageList(PgsProgressPlanQueryReq req, PageQuery pageQuery); + /** + * 分项工程完成明细列表 + * + * @param req 查询条件 + * @param pageQuery 分页参数 + * @return 分项工程完成明细列表 + */ + TableDataInfo queryPageCompletionDetailList(PgsProgressPlanCompletionQueryReq req, PageQuery pageQuery); + /** * 查询符合条件的进度计划列表 * diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java index 49842e66..7bd27a54 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java @@ -21,7 +21,7 @@ import org.dromara.progress.domain.PgsProgressCategory; import org.dromara.progress.domain.PgsProgressCategoryTemplate; import org.dromara.progress.domain.PgsProgressPlan; import org.dromara.progress.domain.PgsProgressPlanDetail; -import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq; +import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreatePriceReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryQueryReq; import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryUpdateReq; import org.dromara.progress.domain.enums.PgsCoordinateTypeEnum; @@ -156,24 +156,25 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl queryPageCompletionDetailList(PgsProgressPlanCompletionQueryReq req, PageQuery pageQuery) { + return null; + } + /** * 查询符合条件的进度计划列表 * @@ -353,7 +367,7 @@ public class PgsProgressPlanServiceImpl extends ServiceImpl delayPlanList = this.list(lqw); if (CollUtil.isEmpty(delayPlanList)) { log.info("无新增延期的施工进度"); - return true; + return false; } Map> delayPlanMap = delayPlanList .stream().collect(Collectors.groupingBy(PgsProgressPlan::getProgressCategoryId)); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/BusProject.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/BusProject.java index 09c89b94..8406e8c3 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/BusProject.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/BusProject.java @@ -145,6 +145,11 @@ public class BusProject extends BaseEntity { */ private String showHidden; + /** + * go项目id + */ + private Long goId; + /** * 是否删除(0正常 1删除) */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/project/BusProjectVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/project/BusProjectVo.java index cab90e79..785e5ef9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/project/BusProjectVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/project/BusProjectVo.java @@ -190,4 +190,9 @@ public class BusProjectVo implements Serializable { */ private List punchrangeList; + /** + * go项目id + */ + private Long goId; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/userprojectrelevancy/BusLoginUserProjectRelevancyVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/userprojectrelevancy/BusLoginUserProjectRelevancyVo.java index 30ba9358..a1081903 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/userprojectrelevancy/BusLoginUserProjectRelevancyVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/domain/vo/userprojectrelevancy/BusLoginUserProjectRelevancyVo.java @@ -39,4 +39,9 @@ public class BusLoginUserProjectRelevancyVo implements Serializable { * 项目简称 */ private String shortName; + + /** + * go项目id + */ + private Long goId; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusUserProjectRelevancyServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusUserProjectRelevancyServiceImpl.java index b3b4348e..aa4f8d5d 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusUserProjectRelevancyServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/project/service/impl/BusUserProjectRelevancyServiceImpl.java @@ -303,7 +303,7 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl(); } Map> projectMap = projectService.lambdaQuery() - .select(BusProject::getId, BusProject::getPId, BusProject::getProjectName, BusProject::getShortName) + .select(BusProject::getId, BusProject::getPId, BusProject::getProjectName, BusProject::getShortName, BusProject::getGoId) .in(BusProject::getId, projectIdList) .eq(BusProject::getPId, BusProjectConstant.PARENT_ID) .list() @@ -323,6 +323,7 @@ public class BusUserProjectRelevancyServiceImpl extends ServiceImpl + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileMapper.xml new file mode 100644 index 00000000..d003a6cc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileViewerMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileViewerMapper.xml new file mode 100644 index 00000000..3d84d5dd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesVolumeFileViewerMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/script/sql/menuInitValue.sql b/xinnengyuan/script/sql/menuInitValue.sql index 89f32bd0..52b9b447 100644 --- a/xinnengyuan/script/sql/menuInitValue.sql +++ b/xinnengyuan/script/sql/menuInitValue.sql @@ -1774,3 +1774,83 @@ insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1947491501058625542, '违规记录导出', 1947491501058625537, '5', '#', '', 1, 0, 'F', '0', '0', 'safety:violationRecord: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(1950163012458467329, '分包整改回复', '1937684147828957185', '1', 'contractorRectifyReply', 'contractor/contractorRectifyReply/index', 1, 0, 'C', '0', '0', 'contractor:contractorRectifyReply: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(1950163012458467330, '分包整改回复查询', 1950163012458467329, '1', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorRectifyReply: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(1950163012458467331, '分包整改回复新增', 1950163012458467329, '2', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorRectifyReply: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(1950163012458467332, '分包整改回复修改', 1950163012458467329, '3', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorRectifyReply: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(1950163012458467333, '分包整改回复删除', 1950163012458467329, '4', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorRectifyReply: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(1950163012458467334, '分包整改回复导出', 1950163012458467329, '5', '#', '', 1, 0, 'F', '0', '0', 'contractor:contractorRectifyReply: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(1950487803086331905, '卷册目录', '1940300237524451330', '1', 'volumeCatalog', 'design/volumeCatalog/index', 1, 0, 'C', '0', '0', 'design:volumeCatalog: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(1950487803086331906, '卷册目录查询', 1950487803086331905, '1', '#', '', 1, 0, 'F', '0', '0', 'design:volumeCatalog: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(1950487803086331907, '卷册目录新增', 1950487803086331905, '2', '#', '', 1, 0, 'F', '0', '0', 'design:volumeCatalog: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(1950487803086331908, '卷册目录修改', 1950487803086331905, '3', '#', '', 1, 0, 'F', '0', '0', 'design:volumeCatalog: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(1950487803086331909, '卷册目录删除', 1950487803086331905, '4', '#', '', 1, 0, 'F', '0', '0', 'design:volumeCatalog: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(1950487803086331910, '卷册目录导出', 1950487803086331905, '5', '#', '', 1, 0, 'F', '0', '0', 'design:volumeCatalog: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(1950489109494587393, '卷册文件', '1950487803086331905', '1', 'volumeFile', 'design/volumeFile/index', 1, 0, 'C', '0', '0', 'design:volumeFile: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(1950489109494587394, '卷册文件查询', 1950489109494587393, '1', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFile: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(1950489109494587395, '卷册文件新增', 1950489109494587393, '2', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFile: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(1950489109494587396, '卷册文件修改', 1950489109494587393, '3', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFile: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(1950489109494587397, '卷册文件删除', 1950489109494587393, '4', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFile: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(1950489109494587398, '卷册文件导出', 1950489109494587393, '5', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFile: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(1950489109817548801, '卷册文件查阅人', '1950487803086331905', '1', 'volumeFileViewer', 'design/volumeFileViewer/index', 1, 0, 'C', '0', '0', 'design:volumeFileViewer: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(1950489109817548802, '卷册文件查阅人查询', 1950489109817548801, '1', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer: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(1950489109817548803, '卷册文件查阅人新增', 1950489109817548801, '2', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer: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(1950489109817548804, '卷册文件查阅人修改', 1950489109817548801, '3', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer: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(1950489109817548805, '卷册文件查阅人删除', 1950489109817548801, '4', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer: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(1950489109817548806, '卷册文件查阅人导出', 1950489109817548801, '5', '#', '', 1, 0, 'F', '0', '0', 'design:volumeFileViewer:export', '#', 103, 1, sysdate(), null, null, ''); diff --git a/xinnengyuan/script/sql/xinnengyuan.sql b/xinnengyuan/script/sql/xinnengyuan.sql index 081e4999..43369904 100644 --- a/xinnengyuan/script/sql/xinnengyuan.sql +++ b/xinnengyuan/script/sql/xinnengyuan.sql @@ -1590,3 +1590,108 @@ CREATE TABLE `hse_violation_record` index `idx_project_id` (`project_id` asc) using btree comment '项目id' ) comment '违规记录' collate = utf8mb4_unicode_ci; +DROP TABLE IF EXISTS `sub_contractor_rectify_reply`; +CREATE TABLE `sub_contractor_rectify_reply` +( + `id` bigint not null auto_increment comment '主键id', + `project_id` bigint not null comment '项目id', + `contractor_id` bigint not null comment '分包方id', + `inspection_type` varchar(32) null comment '检查类型', + `violation_type` varchar(32) null comment '违章类型', + `inspection_date` datetime default CURRENT_TIMESTAMP not null comment '检查日期', + `inspector` bigint not null comment '检查人', + `rectifier` bigint null comment '整改人', + `rectify_deadline` date null comment '要求整改期限', + `inspection_description` text null comment '检查内容', + `inspection_attachment` text null comment '检查附件', + `rectify_time` datetime null comment '整改日期', + `rectify_description` text null comment '整改措施及完成情况', + `rectify_attachment` text null comment '整改附件', + `review_type` char(1) null comment '复查状态(1通过 2未通过)', + `reviewer` bigint null comment '复查人', + `review_time` datetime null comment '复查日期', + `review_description` text null comment '复查情况', + `process_type` char(1) default '1' not null comment '处理流程类型(0仅通知 1通知整改复查)', + `status` char(1) default '1' not null comment '工单状态(1通知 2整改 3复查)', + `remark` varchar(255) null comment '备注', + `create_by` bigint null comment '创建者', + `update_by` bigint null comment '更新者', + `create_dept` bigint null comment '创建部门', + `create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间', + `update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', + primary key (`id`) using btree, + index `idx_project_id` (`project_id` asc) using btree comment '项目id', + index `idx_contractor_id` (`contractor_id` asc) using btree comment '分包方id' +) comment '分包整改回复' collate = utf8mb4_unicode_ci; + +drop table if exists bus_design_drawing_plan; +create table bus_design_drawing_plan +( + `id` bigint not null auto_increment comment '主键ID', + `project_id` bigint not null comment '项目ID', + `design_subitem_id` bigint not null comment '设计子项ID', + `discipline` varchar(64) not null comment '专业', + `volume_number` varchar(64) not null comment '卷册号', + `volume_name` varchar(255) not null comment '卷册名称', + `principal_id` bigint not null comment '负责人', + `planned_finish_time` date not null comment '施工图计划完成时间', + `status` char(1) not null comment '状态', + `review_status` char(1) null comment '审核状态', + `remark` varchar(255) null comment '备注', + `create_by` bigint null comment '创建者', + `update_by` bigint null comment '更新者', + `create_dept` bigint null comment '创建部门', + `create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间', + `update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', + primary key (`id`) using btree, + index `idx_project_id` (`project_id` asc) using btree comment '项目ID', + unique index `uk_project_volume_number` (`design_subitem_id`, `volume_number`) +) comment '设计出图计划' collate = utf8mb4_unicode_ci; + +drop table if exists des_volume_catalog; +create table des_volume_catalog +( + `id` bigint not null auto_increment comment '主键ID', + `project_id` bigint not null comment '项目ID', + `design_subitem_id` bigint null comment '设计子项ID', + `volume_number` varchar(64) not null comment '卷册号', + `document_name` varchar(255) not null comment '资料名称', + `remark` varchar(255) null comment '备注', + `create_by` bigint null comment '创建者', + `update_by` bigint null comment '更新者', + `create_dept` bigint null comment '创建部门', + `create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间', + `update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', + primary key (`id`) using btree, + unique index `uk_project_volume_number` (`project_id`, `volume_number`) +) comment '卷册目录' collate = utf8mb4_unicode_ci; + +drop table if exists des_volume_file; +create table des_volume_file +( + `id` bigint not null auto_increment comment '主键ID', + `volume_catalog_id` bigint not null comment '卷册目录ID', + `file_name` varchar(255) not null comment '文件名称', + `file_id` bigint not null comment '文件ID', + `explain_text` varchar(512) null comment '说明', + `status` char(1) default '1' not null comment '状态(1正常 2作废)', + `remark` varchar(255) null comment '备注', + `create_by` bigint null comment '创建者', + `update_by` bigint null comment '更新者', + `create_dept` bigint null comment '创建部门', + `create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间', + `update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', + primary key (`id`) using btree, + index `idx_volume_catalog_id` (`volume_catalog_id` asc) comment '卷册目录ID' +) comment '卷册文件' collate = utf8mb4_unicode_ci; + +drop table if exists des_volume_file_Viewer; +create table des_volume_file_Viewer +( + `id` bigint not null auto_increment comment '主键ID', + `volume_catalog_id` bigint not null comment '卷册目录ID', + `user_id` bigint not null comment '用户ID', + `status` char(1) default '1' not null comment '状态(1未查阅 2已查阅)', + primary key (`id`) using btree, + unique index `uk_volume_user` (`volume_catalog_id`, `user_id`) +) comment '卷册查阅人' collate = utf8mb4_unicode_ci;