diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/template/收集资料清单模板.docx b/xinnengyuan/ruoyi-admin/src/main/resources/template/收集资料清单模板.docx new file mode 100644 index 00000000..d096183f Binary files /dev/null and b/xinnengyuan/ruoyi-admin/src/main/resources/template/收集资料清单模板.docx differ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDesignConstant.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDesignConstant.java index 6125d5a2..1413b4fe 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDesignConstant.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/constant/DesDesignConstant.java @@ -1,6 +1,7 @@ package org.dromara.design.constant; import org.dromara.common.core.utils.DateUtils; +import org.dromara.design.domain.DesCollect; import org.dromara.design.domain.DesDesignChange; import java.text.SimpleDateFormat; @@ -16,11 +17,22 @@ public interface DesDesignConstant { */ String DESIGN_CHANGE_TEMPLATE_PATH = "template/设计变更申请单模版.docx"; + /** + * 收集资料清单模版路径 + */ + String DESIGN_COLLECT_TEMPLATE_PATH = "template/收集资料清单模板.docx"; + + /** * 设计变更申请单文件路径 */ String DESIGN_CHANGE_FILE_URL = "docs/design/change/"; + /** + * 设计变更申请单文件路径 + */ + String DESIGN_COLLECT_FILE_URL = "docs/design/collect/"; + /** * 设计变更申请单文件名 */ @@ -36,4 +48,21 @@ public interface DesDesignConstant { String createDate = DateUtils.formatDate(designChange.getCreateTime()); return String.format("设计变更申请单(%s).docx", createDate); } + + + /** + * 收集清单路径 + */ + static String getDesignCollectFileUrl(DesCollect desCollect) { + String timestamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(desCollect.getUpdateTime()); + return String.format("%s%s/%s", DESIGN_COLLECT_FILE_URL, desCollect.getId(), timestamp); + } + + /** + * 收集清单文件名 + */ + static String getDesignCollectFileName(DesCollect desCollect) { + String createDate = DateUtils.formatDate(desCollect.getCreateTime()); + return String.format("设计变更申请单(%s).docx", createDate); + } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectCatalogueController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectCatalogueController.java new file mode 100644 index 00000000..24defdfe --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectCatalogueController.java @@ -0,0 +1,118 @@ +package org.dromara.design.controller; + +import java.util.List; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.common.core.enums.BusinessStatusEnum; +import org.dromara.design.domain.DesCollect; +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.design.domain.vo.DesCollectVo; +import org.dromara.design.service.IDesCollectService; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesCollectCatalogueVo; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; +import org.dromara.design.service.IDesCollectCatalogueService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 收资清单目录 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/collectCatalogue") +public class DesCollectCatalogueController extends BaseController { + + private final IDesCollectCatalogueService desCollectCatalogueService; + + private final IDesCollectService desCollectService; + + /** + * 查询收资清单目录列表 + */ + @SaCheckPermission("design:collectCatalogue:list") + @GetMapping("/list") + public TableDataInfo list(DesCollectCatalogueBo bo, PageQuery pageQuery) { + DesCollect desCollect = desCollectService.getOne(Wrappers.lambdaQuery(DesCollect.class) + .eq(DesCollect::getProjectId, bo.getProjectId()).last("limit 1")); + if (desCollect == null || !BusinessStatusEnum.FINISH.getStatus().equals(desCollect.getStatus())) { + return TableDataInfo.build(); + } + return desCollectCatalogueService.queryPageList(bo, pageQuery); + } + + /** + * 导出收资清单目录列表 + */ + @SaCheckPermission("design:collectCatalogue:export") + @Log(title = "收资清单目录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesCollectCatalogueBo bo, HttpServletResponse response) { + List list = desCollectCatalogueService.queryList(bo); + ExcelUtil.exportExcel(list, "收资清单目录", DesCollectCatalogueVo.class, response); + } + + /** + * 获取收资清单目录详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:collectCatalogue:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desCollectCatalogueService.queryById(id)); + } + + /** + * 新增收资清单目录 + */ + @SaCheckPermission("design:collectCatalogue:add") + @Log(title = "收资清单目录", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesCollectCatalogueBo bo) { + return toAjax(desCollectCatalogueService.insertByBo(bo)); + } + + /** + * 修改收资清单目录 + */ + @SaCheckPermission("design:collectCatalogue:edit") + @Log(title = "收资清单目录", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesCollectCatalogueBo bo) { + return toAjax(desCollectCatalogueService.updateByBo(bo)); + } + + /** + * 删除收资清单目录 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:collectCatalogue:remove") + @Log(title = "收资清单目录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desCollectCatalogueService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectController.java new file mode 100644 index 00000000..521ef26a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectController.java @@ -0,0 +1,138 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesCollectVo; +import org.dromara.design.domain.bo.DesCollectBo; +import org.dromara.design.service.IDesCollectService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 收资清单 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/collect") +public class DesCollectController extends BaseController { + + private final IDesCollectService desCollectService; + + /** + * 查询收资清单列表 + */ + @SaCheckPermission("design:collect:list") + @GetMapping("/list") + public TableDataInfo list(DesCollectBo bo, PageQuery pageQuery) { + return desCollectService.queryPageList(bo, pageQuery); + } + + /** + * 导出收资清单列表 + */ + @SaCheckPermission("design:collect:export") + @Log(title = "收资清单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesCollectBo bo, HttpServletResponse response) { + List list = desCollectService.queryList(bo); + ExcelUtil.exportExcel(list, "收资清单", DesCollectVo.class, response); + } + + /** + * 获取收资清单详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:collect:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desCollectService.queryById(id)); + } + + /** + * 新增收资清单 + */ + @SaCheckPermission("design:collect:add") + @Log(title = "收资清单", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesCollectBo bo) { + return toAjax(desCollectService.insertByBo(bo)); + } + + /** + * 修改收资清单 + */ + @SaCheckPermission("design:collect:edit") + @Log(title = "收资清单", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesCollectBo bo) { + return toAjax(desCollectService.updateByBo(bo)); + } + + /** + * 删除收资清单 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:collect:remove") + @Log(title = "收资清单", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desCollectService.deleteWithValidByIds(List.of(ids), true)); + } + + /** + * 批量新增或修改 + */ + @RepeatSubmit() + @PostMapping("/batch") + public R batchAddOrUpdate(@RequestBody DesCollectBatchDto dto) { + return toAjax(desCollectService.batchAddOrUpdate(dto)); + } + + /** + * 获取收资清单详细信息 + * + * @param projectId 项目ID + */ + @SaCheckPermission("design:collect:query") + @GetMapping("/byProjectId/{projectId}") + public R getInfoByProjectId(@NotNull(message = "项目ID不能为空") + @PathVariable Long projectId) { + return R.ok(desCollectService.getInfoByProjectId(projectId)); + } + + /** + * 清单导出 + */ + @SaCheckPermission("design:collect:export") + @Log(title = "收资清单", businessType = BusinessType.EXPORT) + @PostMapping("/exportWord") + public void exportWordById(Long id, HttpServletResponse response){ + desCollectService.exportWordById(id, response); + } + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectFileController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectFileController.java new file mode 100644 index 00000000..b96fbc32 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesCollectFileController.java @@ -0,0 +1,119 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.design.domain.bo.DesCollectFileBo; +import org.dromara.design.domain.vo.DesCollectFileVo; +import org.dromara.design.service.IDesCollectFileService; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; + +/** + * 收资文件 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/collectFile") +public class DesCollectFileController extends BaseController { + + private final IDesCollectFileService desCollectFileService; + + /** + * 查询收资文件列表 + */ + @SaCheckPermission("design:collectFile:list") + @GetMapping("/list") + public TableDataInfo list(DesCollectFileBo bo, PageQuery pageQuery) { + return desCollectFileService.queryPageList(bo, pageQuery); + } + + /** + * 导出收资文件列表 + */ + @SaCheckPermission("design:collectFile:export") + @Log(title = "收资文件", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesCollectFileBo bo, HttpServletResponse response) { + List list = desCollectFileService.queryList(bo); + ExcelUtil.exportExcel(list, "收资文件", DesCollectFileVo.class, response); + } + + /** + * 获取收资文件详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:collectFile:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desCollectFileService.queryById(id)); + } + + /** + * 新增收资文件 + */ + @SaCheckPermission("design:collectFile:add") + @Log(title = "收资文件", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesCollectFileBo bo) { + return toAjax(desCollectFileService.insertByBo(bo)); + } + + /** + * 修改收资文件 + */ + @SaCheckPermission("design:collectFile:edit") + @Log(title = "收资文件", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesCollectFileBo bo) { + return toAjax(desCollectFileService.updateByBo(bo)); + } + + /** + * 删除收资文件 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:collectFile:remove") + @Log(title = "收资文件", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desCollectFileService.deleteWithValidByIds(List.of(ids), true)); + } + + + /** + * 上传资料文件 + */ + @SaCheckPermission("design:collectFile:add") + @Log(title = "收资文件", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping("/upload") + public R addFile(MultipartFile file,Long catalogueId,Long projectId) { + return toAjax(desCollectFileService.addFile(file, catalogueId, projectId)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractCatalogueController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractCatalogueController.java new file mode 100644 index 00000000..b687113a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractCatalogueController.java @@ -0,0 +1,105 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesExtractCatalogueVo; +import org.dromara.design.domain.bo.DesExtractCatalogueBo; +import org.dromara.design.service.IDesExtractCatalogueService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 提资清单目录 + * + * @author Lion Li + * @date 2025-08-12 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/extractCatalogue") +public class DesExtractCatalogueController extends BaseController { + + private final IDesExtractCatalogueService desExtractCatalogueService; + + /** + * 查询提资清单目录列表 + */ + @SaCheckPermission("design:extractCatalogue:list") + @GetMapping("/list") + public TableDataInfo list(DesExtractCatalogueBo bo, PageQuery pageQuery) { + return desExtractCatalogueService.queryPageList(bo, pageQuery); + } + + /** + * 导出提资清单目录列表 + */ + @SaCheckPermission("design:extractCatalogue:export") + @Log(title = "提资清单目录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesExtractCatalogueBo bo, HttpServletResponse response) { + List list = desExtractCatalogueService.queryList(bo); + ExcelUtil.exportExcel(list, "提资清单目录", DesExtractCatalogueVo.class, response); + } + + /** + * 获取提资清单目录详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:extractCatalogue:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desExtractCatalogueService.queryById(id)); + } + + /** + * 新增提资清单目录 + */ + @SaCheckPermission("design:extractCatalogue:add") + @Log(title = "提资清单目录", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesExtractCatalogueBo bo) { + return toAjax(desExtractCatalogueService.insertByBo(bo)); + } + + /** + * 修改提资清单目录 + */ + @SaCheckPermission("design:extractCatalogue:edit") + @Log(title = "提资清单目录", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesExtractCatalogueBo bo) { + return toAjax(desExtractCatalogueService.updateByBo(bo)); + } + + /** + * 删除提资清单目录 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:extractCatalogue:remove") + @Log(title = "提资清单目录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desExtractCatalogueService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractController.java new file mode 100644 index 00000000..0813031b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesExtractController.java @@ -0,0 +1,116 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto; +import org.dromara.design.domain.dto.desExtract.DesExtractBatchDto; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesExtractVo; +import org.dromara.design.domain.bo.DesExtractBo; +import org.dromara.design.service.IDesExtractService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 提资清单 + * + * @author Lion Li + * @date 2025-08-12 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/extract") +public class DesExtractController extends BaseController { + + private final IDesExtractService desExtractService; + + /** + * 查询提资清单列表 + */ + @SaCheckPermission("design:extract:list") + @GetMapping("/list") + public TableDataInfo list(DesExtractBo bo, PageQuery pageQuery) { + return desExtractService.queryPageList(bo, pageQuery); + } + + /** + * 导出提资清单列表 + */ + @SaCheckPermission("design:extract:export") + @Log(title = "提资清单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesExtractBo bo, HttpServletResponse response) { + List list = desExtractService.queryList(bo); + ExcelUtil.exportExcel(list, "提资清单", DesExtractVo.class, response); + } + + /** + * 获取提资清单详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:extract:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desExtractService.queryById(id)); + } + + /** + * 新增提资清单 + */ + @SaCheckPermission("design:extract:add") + @Log(title = "提资清单", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesExtractBo bo) { + return toAjax(desExtractService.insertByBo(bo)); + } + + /** + * 修改提资清单 + */ + @SaCheckPermission("design:extract:edit") + @Log(title = "提资清单", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesExtractBo bo) { + return toAjax(desExtractService.updateByBo(bo)); + } + + /** + * 删除提资清单 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:extract:remove") + @Log(title = "提资清单", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desExtractService.deleteWithValidByIds(List.of(ids), true)); + } + + /** + * 批量新增或修改 + */ + @RepeatSubmit() + @PostMapping("/batch") + public R batchAddOrUpdate(@RequestBody DesExtractBatchDto dto) { + return R.ok(desExtractService.batchAddOrUpdate(dto)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesPrelimSchemeController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesPrelimSchemeController.java new file mode 100644 index 00000000..ae77f2b2 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesPrelimSchemeController.java @@ -0,0 +1,131 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesPrelimSchemeVo; +import org.dromara.design.domain.bo.DesPrelimSchemeBo; +import org.dromara.design.service.IDesPrelimSchemeService; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; + +/** + * 设计初步方案 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/prelimScheme") +public class DesPrelimSchemeController extends BaseController { + + private final IDesPrelimSchemeService desPrelimSchemeService; + + /** + * 查询设计初步方案列表 + */ + @SaCheckPermission("design:prelimScheme:list") + @GetMapping("/list") + public TableDataInfo list(DesPrelimSchemeBo bo, PageQuery pageQuery) { + return desPrelimSchemeService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计初步方案列表 + */ + @SaCheckPermission("design:prelimScheme:export") + @Log(title = "设计初步方案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesPrelimSchemeBo bo, HttpServletResponse response) { + List list = desPrelimSchemeService.queryList(bo); + ExcelUtil.exportExcel(list, "设计初步方案", DesPrelimSchemeVo.class, response); + } + + /** + * 获取设计初步方案详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:prelimScheme:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desPrelimSchemeService.queryById(id)); + } + + /** + * 新增设计初步方案 + */ + @SaCheckPermission("design:prelimScheme:add") + @Log(title = "设计初步方案", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesPrelimSchemeBo bo) { + return toAjax(desPrelimSchemeService.insertByBo(bo)); + } + + /** + * 修改设计初步方案 + */ + @SaCheckPermission("design:prelimScheme:edit") + @Log(title = "设计初步方案", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesPrelimSchemeBo bo) { + return toAjax(desPrelimSchemeService.updateByBo(bo)); + } + + /** + * 删除设计初步方案 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:prelimScheme:remove") + @Log(title = "设计初步方案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desPrelimSchemeService.deleteWithValidByIds(List.of(ids), true)); + } + + + /** + * 新增设计初步方案文件 + */ + @SaCheckPermission("design:prelimScheme:add") + @Log(title = "设计初步方案", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping("/upload") + public R addFile(MultipartFile file,Long projectId) { + return R.ok(desPrelimSchemeService.addFile(file, projectId)); + } + + + /** + * 修改设计方案文件 + */ + @SaCheckPermission("design:prelimScheme:add") + @Log(title = "设计初步方案", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PostMapping("/update/{id}") + public R updateFile(MultipartFile file, Long projectId, @NotNull(message = "主键不能为空")@PathVariable Long id) { + return toAjax(desPrelimSchemeService.updateFile(file, projectId,id)); + } + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSchemeController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSchemeController.java new file mode 100644 index 00000000..26a77812 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSchemeController.java @@ -0,0 +1,129 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesSchemeVo; +import org.dromara.design.domain.bo.DesSchemeBo; +import org.dromara.design.service.IDesSchemeService; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; + +/** + * 设计方案 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/scheme") +public class DesSchemeController extends BaseController { + + private final IDesSchemeService desSchemeService; + + /** + * 查询设计方案列表 + */ + @SaCheckPermission("design:scheme:list") + @GetMapping("/list") + public TableDataInfo list(DesSchemeBo bo, PageQuery pageQuery) { + return desSchemeService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计方案列表 + */ + @SaCheckPermission("design:scheme:export") + @Log(title = "设计方案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesSchemeBo bo, HttpServletResponse response) { + List list = desSchemeService.queryList(bo); + ExcelUtil.exportExcel(list, "设计方案", DesSchemeVo.class, response); + } + + /** + * 获取设计方案详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:scheme:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desSchemeService.queryById(id)); + } + + /** + * 新增设计方案 + */ + @SaCheckPermission("design:scheme:add") + @Log(title = "设计方案", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesSchemeBo bo) { + return toAjax(desSchemeService.insertByBo(bo)); + } + + /** + * 修改设计方案 + */ + @SaCheckPermission("design:scheme:edit") + @Log(title = "设计方案", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesSchemeBo bo) { + return toAjax(desSchemeService.updateByBo(bo)); + } + + /** + * 删除设计方案 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:scheme:remove") + @Log(title = "设计方案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desSchemeService.deleteWithValidByIds(List.of(ids), true)); + } + + + /** + * 新增设计方案文件 + */ + @SaCheckPermission("design:scheme:add") + @Log(title = "设计方案", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping("/upload") + public R addFile(MultipartFile file, Long projectId) { + return R.ok(desSchemeService.addFile(file, projectId)); + } + + /** + * 修改设计方案文件 + */ + @SaCheckPermission("design:scheme:edit") + @Log(title = "设计方案", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PostMapping("/update/{id}") + public R updateFile(MultipartFile file, Long projectId, @NotNull(message = "主键不能为空")@PathVariable Long id) { + return toAjax(desSchemeService.updateFile(file, projectId,id)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSubcontractController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSubcontractController.java new file mode 100644 index 00000000..b5c7a05a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesSubcontractController.java @@ -0,0 +1,105 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesSubcontractVo; +import org.dromara.design.domain.bo.DesSubcontractBo; +import org.dromara.design.service.IDesSubcontractService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计分包 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/subcontract") +public class DesSubcontractController extends BaseController { + + private final IDesSubcontractService desSubcontractService; + + /** + * 查询设计分包列表 + */ + @SaCheckPermission("design:subcontract:list") + @GetMapping("/list") + public TableDataInfo list(DesSubcontractBo bo, PageQuery pageQuery) { + return desSubcontractService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计分包列表 + */ + @SaCheckPermission("design:subcontract:export") + @Log(title = "设计分包", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesSubcontractBo bo, HttpServletResponse response) { + List list = desSubcontractService.queryList(bo); + ExcelUtil.exportExcel(list, "设计分包", DesSubcontractVo.class, response); + } + + /** + * 获取设计分包详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:subcontract:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desSubcontractService.queryById(id)); + } + + /** + * 新增设计分包 + */ + @SaCheckPermission("design:subcontract:add") + @Log(title = "设计分包", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesSubcontractBo bo) { + return toAjax(desSubcontractService.insertByBo(bo)); + } + + /** + * 修改设计分包 + */ + @SaCheckPermission("design:subcontract:edit") + @Log(title = "设计分包", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesSubcontractBo bo) { + return toAjax(desSubcontractService.updateByBo(bo)); + } + + /** + * 删除设计分包 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:subcontract:remove") + @Log(title = "设计分包", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desSubcontractService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesUserController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesUserController.java new file mode 100644 index 00000000..c2884648 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/controller/DesUserController.java @@ -0,0 +1,117 @@ +package org.dromara.design.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.design.domain.dto.desUser.DesUserBatchDto; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +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.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.design.domain.vo.DesUserVo; +import org.dromara.design.domain.bo.DesUserBo; +import org.dromara.design.service.IDesUserService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 设计人员 + * + * @author Lion Li + * @date 2025-08-11 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/design/user") +public class DesUserController extends BaseController { + + private final IDesUserService desUserService; + + /** + * 查询设计人员列表 + */ + @SaCheckPermission("design:user:list") + @GetMapping("/list") + public TableDataInfo list(DesUserBo bo, PageQuery pageQuery) { + return desUserService.queryPageList(bo, pageQuery); + } + + /** + * 导出设计人员列表 + */ + @SaCheckPermission("design:user:export") + @Log(title = "设计人员", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(DesUserBo bo, HttpServletResponse response) { + List list = desUserService.queryList(bo); + ExcelUtil.exportExcel(list, "设计人员", DesUserVo.class, response); + } + + /** + * 获取设计人员详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("design:user:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(desUserService.queryById(id)); + } + + /** + * 新增设计人员 + */ + @SaCheckPermission("design:user:add") + @Log(title = "设计人员", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody DesUserBo bo) { + return toAjax(desUserService.insertByBo(bo)); + } + + /** + * 修改设计人员 + */ + @SaCheckPermission("design:user:edit") + @Log(title = "设计人员", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody DesUserBo bo) { + return toAjax(desUserService.updateByBo(bo)); + } + + /** + * 删除设计人员 + * + * @param ids 主键串 + */ + @SaCheckPermission("design:user:remove") + @Log(title = "设计人员", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(desUserService.deleteWithValidByIds(List.of(ids), true)); + } + + /** + * 批量新增或修改 + */ + @RepeatSubmit() + @PostMapping("/batch") + public R batchAddOrUpdate(@RequestBody DesUserBatchDto dto) { + return toAjax(desUserService.batchAddOrUpdate(dto)); + } + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollect.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollect.java new file mode 100644 index 00000000..fdcaf704 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollect.java @@ -0,0 +1,67 @@ +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_collect + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_collect") +public class DesCollect extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 设计人员id + */ + private Long userId; + + /** + * 设计人员姓名 + */ + private String userName; + + /** + * 设计人员专业(des_user_major) + */ + private String userMajor; + + + /** + * 手机号码 + */ + private String phone; + + /** + * 用户邮箱 + */ + private String email; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectCatalogue.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectCatalogue.java new file mode 100644 index 00000000..a9f05bdf --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectCatalogue.java @@ -0,0 +1,56 @@ +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_collect_catalogue + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_collect_catalogue") +public class DesCollectCatalogue extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 收资清单id + */ + private Long collectId; + + /** + * 项目id + */ + private Long projectId; + + /** + * 序号 + */ + private Integer num; + + /** + * 目录名 + */ + private String catalogueName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectFile.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectFile.java new file mode 100644 index 00000000..f6c6a66f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesCollectFile.java @@ -0,0 +1,62 @@ +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_collect_file + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_collect_file") +public class DesCollectFile extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 清单目录ID + */ + private Long catalogueId; + + /** + * 项目id + */ + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + private String status; + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtract.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtract.java new file mode 100644 index 00000000..6b7ef3a9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtract.java @@ -0,0 +1,66 @@ +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_extract + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_extract") +public class DesExtract extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 设计人员id + */ + private Long userId; + + /** + * 设计人员姓名 + */ + private String userName; + + /** + * 人员专业(des_user_major) + */ + private String userMajor; + + /** + * 手机号码 + */ + private String phone; + + /** + * 用户邮箱 + */ + private String email; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtractCatalogue.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtractCatalogue.java new file mode 100644 index 00000000..ff9f7612 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesExtractCatalogue.java @@ -0,0 +1,56 @@ +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_extract_catalogue + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_extract_catalogue") +public class DesExtractCatalogue extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 提资清单id + */ + private Long extractId; + + /** + * 项目id + */ + private Long projectId; + + /** + * 序号 + */ + private Integer num; + + /** + * 目录名 + */ + private String catalogueName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesPrelimScheme.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesPrelimScheme.java new file mode 100644 index 00000000..397f4b34 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesPrelimScheme.java @@ -0,0 +1,56 @@ +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_prelim_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_prelim_scheme") +public class DesPrelimScheme extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesScheme.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesScheme.java new file mode 100644 index 00000000..33fabfe8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesScheme.java @@ -0,0 +1,56 @@ +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_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_scheme") +public class DesScheme extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesSubcontract.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesSubcontract.java new file mode 100644 index 00000000..f96db3d1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesSubcontract.java @@ -0,0 +1,41 @@ +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_subcontract + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_subcontract") +public class DesSubcontract extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 分包内容 + */ + private String subContent; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesUser.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesUser.java new file mode 100644 index 00000000..bb56ae0d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/DesUser.java @@ -0,0 +1,56 @@ +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_user + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("des_user") +public class DesUser extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 项目id + */ + private Long projectId; + + /** + * 设计人员id + */ + private Long userId; + + /** + * 设计人员姓名 + */ + private String userName; + + /** + * 设计人员类型(des_user_type) + */ + private String userType; + + /** + * 设计人员专业(des_user_major) + */ + private String userMajor; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectBo.java new file mode 100644 index 00000000..5e894486 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectBo.java @@ -0,0 +1,69 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesCollect; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 收资清单业务对象 des_collect + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesCollect.class, reverseConvertGenerate = false) +public class DesCollectBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 设计人员id + */ + @NotNull(message = "设计人员id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long userId; + + /** + * 设计人员姓名 + */ + @NotBlank(message = "设计人员姓名不能为空", groups = { AddGroup.class, EditGroup.class }) + private String userName; + + + /** + * 设计人员专业(des_user_major) + */ + private String userMajor; + + /** + * 手机号码 + */ + private String phone; + + /** + * 用户邮箱 + */ + private String email; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectCatalogueBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectCatalogueBo.java new file mode 100644 index 00000000..b26cbacd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectCatalogueBo.java @@ -0,0 +1,58 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 收资清单目录业务对象 des_collect_catalogue + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesCollectCatalogue.class, reverseConvertGenerate = false) +public class DesCollectCatalogueBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 收资清单id + */ + private Long collectId; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 序号 + */ + @NotNull(message = "序号不能为空", groups = { AddGroup.class, EditGroup.class }) + private Integer num; + + /** + * 目录名 + */ + @NotBlank(message = "目录名不能为空", groups = { AddGroup.class, EditGroup.class }) + private String catalogueName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectFileBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectFileBo.java new file mode 100644 index 00000000..304d2f7a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesCollectFileBo.java @@ -0,0 +1,64 @@ +package org.dromara.design.domain.bo; + + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import org.dromara.design.domain.DesCollectFile; + +/** + * 收资文件业务对象 des_collect_file + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesCollectFile.class, reverseConvertGenerate = false) +public class DesCollectFileBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 清单目录ID + */ + @NotNull(message = "清单目录ID不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long catalogueId; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + @NotBlank(message = "审核状态不能为空", groups = { AddGroup.class, EditGroup.class }) + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractBo.java new file mode 100644 index 00000000..3eb9915b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractBo.java @@ -0,0 +1,69 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesExtract; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 提资清单业务对象 des_extract + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesExtract.class, reverseConvertGenerate = false) +public class DesExtractBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 设计人员id + */ + @NotNull(message = "设计人员id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long userId; + + /** + * 设计人员姓名 + */ + @NotBlank(message = "设计人员姓名不能为空", groups = { AddGroup.class, EditGroup.class }) + private String userName; + + /** + * 人员专业(des_user_major) + */ + @NotBlank(message = "人员专业(des_user_major)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String userMajor; + + /** + * 手机号码 + */ + private String phone; + + /** + * 用户邮箱 + */ + private String email; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractCatalogueBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractCatalogueBo.java new file mode 100644 index 00000000..b5df945e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesExtractCatalogueBo.java @@ -0,0 +1,59 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesExtractCatalogue; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 提资清单目录业务对象 des_extract_catalogue + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesExtractCatalogue.class, reverseConvertGenerate = false) +public class DesExtractCatalogueBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 提资清单id + */ + @NotNull(message = "提资清单id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long extractId; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 序号 + */ + @NotNull(message = "序号不能为空", groups = { AddGroup.class, EditGroup.class }) + private Integer num; + + /** + * 目录名 + */ + @NotBlank(message = "目录名不能为空", groups = { AddGroup.class, EditGroup.class }) + private String catalogueName; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesPrelimSchemeBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesPrelimSchemeBo.java new file mode 100644 index 00000000..960eaa13 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesPrelimSchemeBo.java @@ -0,0 +1,56 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesPrelimScheme; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 设计初步方案业务对象 des_prelim_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesPrelimScheme.class, reverseConvertGenerate = false) +public class DesPrelimSchemeBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSchemeBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSchemeBo.java new file mode 100644 index 00000000..cb6a008e --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSchemeBo.java @@ -0,0 +1,56 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesScheme; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 设计方案业务对象 des_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesScheme.class, reverseConvertGenerate = false) +public class DesSchemeBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * ossId + */ + private Long ossId; + + /** + * 文件名称 + */ + private String fileName; + + /** + * 文件访问路径 + */ + private String fileUrl; + + /** + * 审核状态 + */ + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSubcontractBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSubcontractBo.java new file mode 100644 index 00000000..bc033c17 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesSubcontractBo.java @@ -0,0 +1,42 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesSubcontract; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 设计分包业务对象 des_subcontract + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesSubcontract.class, reverseConvertGenerate = false) +public class DesSubcontractBo extends BaseEntity { + + /** + * 主键ID + */ + @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 分包内容 + */ + @NotBlank(message = "分包内容不能为空", groups = { AddGroup.class, EditGroup.class }) + private String subContent; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesUserBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesUserBo.java new file mode 100644 index 00000000..306a53f8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/bo/DesUserBo.java @@ -0,0 +1,59 @@ +package org.dromara.design.domain.bo; + +import org.dromara.design.domain.DesUser; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 设计人员业务对象 des_user + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = DesUser.class, reverseConvertGenerate = false) +public class DesUserBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long projectId; + + /** + * 设计人员id + */ + @NotNull(message = "设计人员id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long userId; + + /** + * 设计人员姓名 + */ + @NotBlank(message = "设计人员姓名不能为空", groups = { AddGroup.class, EditGroup.class }) + private String userName; + + /** + * 设计人员类型(des_user_type) + */ + @NotBlank(message = "设计人员类型(des_user_type)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String userType; + + /** + * 设计人员专业(des_user_major) + */ + private String userMajor; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectBatchDto.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectBatchDto.java new file mode 100644 index 00000000..b3319bab --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectBatchDto.java @@ -0,0 +1,37 @@ +package org.dromara.design.domain.dto.desCollect; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.design.domain.DesCollect; +import org.dromara.design.domain.bo.DesCollectBo; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; + +import java.util.List; + +/** + * 收资清单业务对象 des_collect + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +public class DesCollectBatchDto { + + /** + * 基础信息 + */ + private DesCollectBo desCollectBo; + + /** + * 目录信息 + */ + private List catalogueList; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectCatalogueWordDto.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectCatalogueWordDto.java new file mode 100644 index 00000000..1e559713 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectCatalogueWordDto.java @@ -0,0 +1,13 @@ +package org.dromara.design.domain.dto.desCollect; + + +import lombok.Data; + +@Data +public class DesCollectCatalogueWordDto { + + + private Integer num; + private String catalogueName; + private String remark; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectWordDto.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectWordDto.java new file mode 100644 index 00000000..e23b7d6c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desCollect/DesCollectWordDto.java @@ -0,0 +1,22 @@ +package org.dromara.design.domain.dto.desCollect; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.materials.domain.dto.materialissueitem.MatMaterialIssueItemWordDto; + +import java.util.List; + +@Data +public class DesCollectWordDto { + + private String projectName; + private String userName; + private String majorName; + private String phone; + private String email; + + private List items; +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desExtract/DesExtractBatchDto.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desExtract/DesExtractBatchDto.java new file mode 100644 index 00000000..b2cddeb1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desExtract/DesExtractBatchDto.java @@ -0,0 +1,31 @@ +package org.dromara.design.domain.dto.desExtract; + +import lombok.Data; +import org.dromara.design.domain.bo.DesCollectBo; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; +import org.dromara.design.domain.bo.DesExtractBo; +import org.dromara.design.domain.bo.DesExtractCatalogueBo; + +import java.util.List; + +/** + * 收资清单业务对象 des_collect + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +public class DesExtractBatchDto { + + /** + * 基础信息 + */ + private DesExtractBo desExtractBo; + + /** + * 目录信息 + */ + private List catalogueList; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desUser/DesUserBatchDto.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desUser/DesUserBatchDto.java new file mode 100644 index 00000000..61bc33bb --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/dto/desUser/DesUserBatchDto.java @@ -0,0 +1,39 @@ +package org.dromara.design.domain.dto.desUser; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.design.domain.DesUser; +import org.dromara.design.domain.bo.DesUserBo; + +import java.util.List; + +/** + * 设计人员业务对象 des_user + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data + +public class DesUserBatchDto{ + + /** + * 人员数据 + */ + List list; + + /** + * 项目id + */ + @NotNull(message = "项目id不能为空") + private Long projectId; + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectCatalogueVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectCatalogueVo.java new file mode 100644 index 00000000..b49eb3b6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectCatalogueVo.java @@ -0,0 +1,68 @@ +package org.dromara.design.domain.vo; + +import org.dromara.design.domain.DesCollectCatalogue; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 收资清单目录视图对象 des_collect_catalogue + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesCollectCatalogue.class) +public class DesCollectCatalogueVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 收资清单id + */ + @ExcelProperty(value = "收资清单id") + private Long collectId; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 序号 + */ + @ExcelProperty(value = "序号") + private Integer num; + + /** + * 目录名 + */ + @ExcelProperty(value = "目录名") + private String catalogueName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectFileVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectFileVo.java new file mode 100644 index 00000000..83668a90 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectFileVo.java @@ -0,0 +1,75 @@ +package org.dromara.design.domain.vo; + + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.design.domain.DesCollectFile; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 收资文件视图对象 des_collect_file + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesCollectFile.class) +public class DesCollectFileVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 清单目录ID + */ + @ExcelProperty(value = "清单目录ID") + private Long catalogueId; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * ossId + */ + @ExcelProperty(value = "ossId") + private Long ossId; + + /** + * 文件名称 + */ + @ExcelProperty(value = "文件名称") + private String fileName; + + /** + * 文件访问路径 + */ + @ExcelProperty(value = "文件访问路径") + private String fileUrl; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectVo.java new file mode 100644 index 00000000..2853b799 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesCollectVo.java @@ -0,0 +1,95 @@ +package org.dromara.design.domain.vo; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.design.domain.DesCollect; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 收资清单视图对象 des_collect + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesCollect.class) +public class DesCollectVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 设计人员id + */ + @ExcelProperty(value = "设计人员id") + private Long userId; + + /** + * 设计人员姓名 + */ + @ExcelProperty(value = "设计人员姓名") + private String userName; + + /** + * 手机号码 + */ + @ExcelProperty(value = "手机号码") + private String phone; + + /** + * 用户邮箱 + */ + @ExcelProperty(value = "用户邮箱") + private String email; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String status; + + + /** + * 设计人员专业(des_user_major) + */ + private String userMajor; + + + /** + * 设计人员专业(des_user_major) + */ +// @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "userMajor",other = "des_user_major") +// private String userMajorName; + + + /** + * 卷册目录 + */ + private List catalogueList; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractCatalogueVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractCatalogueVo.java new file mode 100644 index 00000000..99200bd6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractCatalogueVo.java @@ -0,0 +1,68 @@ +package org.dromara.design.domain.vo; + +import org.dromara.design.domain.DesExtractCatalogue; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 提资清单目录视图对象 des_extract_catalogue + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesExtractCatalogue.class) +public class DesExtractCatalogueVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 提资清单id + */ + @ExcelProperty(value = "提资清单id") + private Long extractId; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 序号 + */ + @ExcelProperty(value = "序号") + private Integer num; + + /** + * 目录名 + */ + @ExcelProperty(value = "目录名") + private String catalogueName; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractVo.java new file mode 100644 index 00000000..cfeef73a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesExtractVo.java @@ -0,0 +1,89 @@ +package org.dromara.design.domain.vo; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.design.domain.DesExtract; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 提资清单视图对象 des_extract + * + * @author Lion Li + * @date 2025-08-12 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesExtract.class) +public class DesExtractVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 设计人员id + */ + @ExcelProperty(value = "设计人员id") + private Long userId; + + /** + * 设计人员姓名 + */ + @ExcelProperty(value = "设计人员姓名") + private String userName; + + /** + * 人员专业(des_user_major) + */ + @ExcelProperty(value = "人员专业(des_user_major)") + private String userMajor; + + @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "userMajor",other = "des_user_major") + private String userMajorName; + + /** + * 手机号码 + */ + @ExcelProperty(value = "手机号码") + private String phone; + + /** + * 用户邮箱 + */ + @ExcelProperty(value = "用户邮箱") + private String email; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String status; + + /** + * 资料列表 + */ + private List catalogueList; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesPrelimSchemeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesPrelimSchemeVo.java new file mode 100644 index 00000000..11df98b9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesPrelimSchemeVo.java @@ -0,0 +1,68 @@ +package org.dromara.design.domain.vo; + +import org.dromara.design.domain.DesPrelimScheme; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 设计初步方案视图对象 des_prelim_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesPrelimScheme.class) +public class DesPrelimSchemeVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * ossId + */ + @ExcelProperty(value = "ossId") + private Long ossId; + + /** + * 文件名称 + */ + @ExcelProperty(value = "文件名称") + private String fileName; + + /** + * 文件访问路径 + */ + @ExcelProperty(value = "文件访问路径") + private String fileUrl; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSchemeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSchemeVo.java new file mode 100644 index 00000000..32064f76 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSchemeVo.java @@ -0,0 +1,68 @@ +package org.dromara.design.domain.vo; + +import org.dromara.design.domain.DesScheme; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 设计方案视图对象 des_scheme + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesScheme.class) +public class DesSchemeVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * ossId + */ + @ExcelProperty(value = "ossId") + private Long ossId; + + /** + * 文件名称 + */ + @ExcelProperty(value = "文件名称") + private String fileName; + + /** + * 文件访问路径 + */ + @ExcelProperty(value = "文件访问路径") + private String fileUrl; + + /** + * 审核状态 + */ + @ExcelProperty(value = "审核状态") + private String status; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSubcontractVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSubcontractVo.java new file mode 100644 index 00000000..e399bc99 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesSubcontractVo.java @@ -0,0 +1,50 @@ +package org.dromara.design.domain.vo; + +import org.dromara.design.domain.DesSubcontract; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 设计分包视图对象 des_subcontract + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesSubcontract.class) +public class DesSubcontractVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + @ExcelProperty(value = "主键ID") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 分包内容 + */ + @ExcelProperty(value = "分包内容") + private String subContent; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesUserVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesUserVo.java new file mode 100644 index 00000000..88833425 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/domain/vo/DesUserVo.java @@ -0,0 +1,73 @@ +package org.dromara.design.domain.vo; + +import org.dromara.common.translation.annotation.Translation; +import org.dromara.common.translation.constant.TransConstant; +import org.dromara.design.domain.DesUser; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 设计人员视图对象 des_user + * + * @author Lion Li + * @date 2025-08-11 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = DesUser.class) +public class DesUserVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 项目id + */ + @ExcelProperty(value = "项目id") + private Long projectId; + + /** + * 设计人员id + */ + @ExcelProperty(value = "设计人员id") + private Long userId; + + /** + * 设计人员姓名 + */ + @ExcelProperty(value = "设计人员姓名") + private String userName; + + /** + * 设计人员类型(des_user_type) + */ + @ExcelProperty(value = "设计人员类型(des_user_type)") + private String userType; + + /** + * 设计人员专业(des_user_major) + */ + @ExcelProperty(value = "设计人员专业(des_user_major)") + private String userMajor; + + + @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "userMajor",other = "des_user_major") + private String userMajorName; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectCatalogueMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectCatalogueMapper.java new file mode 100644 index 00000000..cbccb966 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectCatalogueMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.design.domain.vo.DesCollectCatalogueVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 收资清单目录Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesCollectCatalogueMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectFileMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectFileMapper.java new file mode 100644 index 00000000..b0373b0a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectFileMapper.java @@ -0,0 +1,16 @@ +package org.dromara.design.mapper; + + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.design.domain.DesCollectFile; +import org.dromara.design.domain.vo.DesCollectFileVo; + +/** + * 收资文件Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesCollectFileMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectMapper.java new file mode 100644 index 00000000..7232c205 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesCollectMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesCollect; +import org.dromara.design.domain.vo.DesCollectVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 收资清单Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesCollectMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractCatalogueMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractCatalogueMapper.java new file mode 100644 index 00000000..3d6c84fa --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractCatalogueMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesExtractCatalogue; +import org.dromara.design.domain.vo.DesExtractCatalogueVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 提资清单目录Mapper接口 + * + * @author Lion Li + * @date 2025-08-12 + */ +public interface DesExtractCatalogueMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractMapper.java new file mode 100644 index 00000000..9dbf1545 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesExtractMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesExtract; +import org.dromara.design.domain.vo.DesExtractVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 提资清单Mapper接口 + * + * @author Lion Li + * @date 2025-08-12 + */ +public interface DesExtractMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesPrelimSchemeMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesPrelimSchemeMapper.java new file mode 100644 index 00000000..8d836a7f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesPrelimSchemeMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesPrelimScheme; +import org.dromara.design.domain.vo.DesPrelimSchemeVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计初步方案Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesPrelimSchemeMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSchemeMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSchemeMapper.java new file mode 100644 index 00000000..5c8141cb --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSchemeMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesScheme; +import org.dromara.design.domain.vo.DesSchemeVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计初步方案Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesSchemeMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSubcontractMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSubcontractMapper.java new file mode 100644 index 00000000..d619811f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesSubcontractMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesSubcontract; +import org.dromara.design.domain.vo.DesSubcontractVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计分包Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesSubcontractMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesUserMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesUserMapper.java new file mode 100644 index 00000000..3439832f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/mapper/DesUserMapper.java @@ -0,0 +1,15 @@ +package org.dromara.design.mapper; + +import org.dromara.design.domain.DesUser; +import org.dromara.design.domain.vo.DesUserVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 设计人员Mapper接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface DesUserMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectCatalogueService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectCatalogueService.java new file mode 100644 index 00000000..058ce26a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectCatalogueService.java @@ -0,0 +1,75 @@ +package org.dromara.design.service; + +import org.dromara.design.domain.vo.DesCollectCatalogueVo; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 收资清单目录Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesCollectCatalogueService extends IService{ + + /** + * 查询收资清单目录 + * + * @param id 主键 + * @return 收资清单目录 + */ + DesCollectCatalogueVo queryById(Long id); + + /** + * 分页查询收资清单目录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资清单目录分页列表 + */ + TableDataInfo queryPageList(DesCollectCatalogueBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的收资清单目录列表 + * + * @param bo 查询条件 + * @return 收资清单目录列表 + */ + List queryList(DesCollectCatalogueBo bo); + + /** + * 新增收资清单目录 + * + * @param bo 收资清单目录 + * @return 是否新增成功 + */ + Boolean insertByBo(DesCollectCatalogueBo bo); + + /** + * 修改收资清单目录 + * + * @param bo 收资清单目录 + * @return 是否修改成功 + */ + Boolean updateByBo(DesCollectCatalogueBo bo); + + /** + * 校验并批量删除收资清单目录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 批量新增或修改收资清单目录 + */ + Boolean batchAddOrUpdate(List list,Long projectId); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectFileService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectFileService.java new file mode 100644 index 00000000..6feb8f03 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectFileService.java @@ -0,0 +1,83 @@ +package org.dromara.design.service; + + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.dromara.design.domain.DesCollectFile; +import org.dromara.design.domain.bo.DesCollectFileBo; +import org.dromara.design.domain.vo.DesCollectFileVo; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Collection; +import java.util.List; + +/** + * 收资文件Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesCollectFileService extends IService{ + + /** + * 查询收资文件 + * + * @param id 主键 + * @return 收资文件 + */ + DesCollectFileVo queryById(Long id); + + /** + * 分页查询收资文件列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资文件分页列表 + */ + TableDataInfo queryPageList(DesCollectFileBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的收资文件列表 + * + * @param bo 查询条件 + * @return 收资文件列表 + */ + List queryList(DesCollectFileBo bo); + + /** + * 新增收资文件 + * + * @param bo 收资文件 + * @return 是否新增成功 + */ + Boolean insertByBo(DesCollectFileBo bo); + + /** + * 修改收资文件 + * + * @param bo 收资文件 + * @return 是否修改成功 + */ + Boolean updateByBo(DesCollectFileBo bo); + + /** + * 校验并批量删除收资文件信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + + /** + * 批量添加文件 + * @return 是否添加成功 + */ + Boolean addFile(MultipartFile file, Long catalogueId, Long projectId); + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectService.java new file mode 100644 index 00000000..225e9ab5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesCollectService.java @@ -0,0 +1,91 @@ +package org.dromara.design.service; + +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotNull; +import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto; +import org.dromara.design.domain.vo.DesCollectVo; +import org.dromara.design.domain.bo.DesCollectBo; +import org.dromara.design.domain.DesCollect; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.Collection; +import java.util.List; + +/** + * 收资清单Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesCollectService extends IService{ + + /** + * 查询收资清单 + * + * @param id 主键 + * @return 收资清单 + */ + DesCollectVo queryById(Long id); + + /** + * 分页查询收资清单列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资清单分页列表 + */ + TableDataInfo queryPageList(DesCollectBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的收资清单列表 + * + * @param bo 查询条件 + * @return 收资清单列表 + */ + List queryList(DesCollectBo bo); + + /** + * 新增收资清单 + * + * @param bo 收资清单 + * @return 是否新增成功 + */ + Boolean insertByBo(DesCollectBo bo); + + /** + * 修改收资清单 + * + * @param bo 收资清单 + * @return 是否修改成功 + */ + Boolean updateByBo(DesCollectBo bo); + + /** + * 校验并批量删除收资清单信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 批量添加或更新 + */ + Boolean batchAddOrUpdate(@RequestBody DesCollectBatchDto dto) ; + + /** + * 根据项目id查询收资清单 + */ + DesCollectVo getInfoByProjectId(Long projectId); + + /** + * 导出Word + */ + void exportWordById(Long id, HttpServletResponse response); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractCatalogueService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractCatalogueService.java new file mode 100644 index 00000000..721ad949 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractCatalogueService.java @@ -0,0 +1,70 @@ +package org.dromara.design.service; + +import org.dromara.design.domain.vo.DesExtractCatalogueVo; +import org.dromara.design.domain.bo.DesExtractCatalogueBo; +import org.dromara.design.domain.DesExtractCatalogue; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 提资清单目录Service接口 + * + * @author Lion Li + * @date 2025-08-12 + */ +public interface IDesExtractCatalogueService extends IService{ + + /** + * 查询提资清单目录 + * + * @param id 主键 + * @return 提资清单目录 + */ + DesExtractCatalogueVo queryById(Long id); + + /** + * 分页查询提资清单目录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 提资清单目录分页列表 + */ + TableDataInfo queryPageList(DesExtractCatalogueBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的提资清单目录列表 + * + * @param bo 查询条件 + * @return 提资清单目录列表 + */ + List queryList(DesExtractCatalogueBo bo); + + /** + * 新增提资清单目录 + * + * @param bo 提资清单目录 + * @return 是否新增成功 + */ + Boolean insertByBo(DesExtractCatalogueBo bo); + + /** + * 修改提资清单目录 + * + * @param bo 提资清单目录 + * @return 是否修改成功 + */ + Boolean updateByBo(DesExtractCatalogueBo bo); + + /** + * 校验并批量删除提资清单目录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractService.java new file mode 100644 index 00000000..cd258fbf --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesExtractService.java @@ -0,0 +1,78 @@ +package org.dromara.design.service; + +import org.dromara.design.domain.dto.desExtract.DesExtractBatchDto; +import org.dromara.design.domain.vo.DesExtractVo; +import org.dromara.design.domain.bo.DesExtractBo; +import org.dromara.design.domain.DesExtract; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.Collection; +import java.util.List; + +/** + * 提资清单Service接口 + * + * @author Lion Li + * @date 2025-08-12 + */ +public interface IDesExtractService extends IService{ + + /** + * 查询提资清单 + * + * @param id 主键 + * @return 提资清单 + */ + DesExtractVo queryById(Long id); + + /** + * 分页查询提资清单列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 提资清单分页列表 + */ + TableDataInfo queryPageList(DesExtractBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的提资清单列表 + * + * @param bo 查询条件 + * @return 提资清单列表 + */ + List queryList(DesExtractBo bo); + + /** + * 新增提资清单 + * + * @param bo 提资清单 + * @return 是否新增成功 + */ + Boolean insertByBo(DesExtractBo bo); + + /** + * 修改提资清单 + * + * @param bo 提资清单 + * @return 是否修改成功 + */ + Boolean updateByBo(DesExtractBo bo); + + /** + * 校验并批量删除提资清单信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 批量添加或更新提资清单 + */ + Long batchAddOrUpdate(DesExtractBatchDto dto); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesPrelimSchemeService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesPrelimSchemeService.java new file mode 100644 index 00000000..8c3abbe2 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesPrelimSchemeService.java @@ -0,0 +1,84 @@ +package org.dromara.design.service; + +import jakarta.validation.constraints.NotNull; +import org.dromara.design.domain.vo.DesPrelimSchemeVo; +import org.dromara.design.domain.bo.DesPrelimSchemeBo; +import org.dromara.design.domain.DesPrelimScheme; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Collection; +import java.util.List; + +/** + * 设计初步方案Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesPrelimSchemeService extends IService{ + + /** + * 查询设计初步方案 + * + * @param id 主键 + * @return 设计初步方案 + */ + DesPrelimSchemeVo queryById(Long id); + + /** + * 分页查询设计初步方案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计初步方案分页列表 + */ + TableDataInfo queryPageList(DesPrelimSchemeBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计初步方案列表 + * + * @param bo 查询条件 + * @return 设计初步方案列表 + */ + List queryList(DesPrelimSchemeBo bo); + + /** + * 新增设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否新增成功 + */ + Boolean insertByBo(DesPrelimSchemeBo bo); + + /** + * 修改设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否修改成功 + */ + Boolean updateByBo(DesPrelimSchemeBo bo); + + /** + * 校验并批量删除设计初步方案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 添加文件 + */ + Long addFile(MultipartFile file, Long projectId); + + /** + * 修改文件 + */ + Boolean updateFile(MultipartFile file, Long projectId, Long id); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSchemeService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSchemeService.java new file mode 100644 index 00000000..32748bf1 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSchemeService.java @@ -0,0 +1,85 @@ +package org.dromara.design.service; + +import jakarta.validation.constraints.NotNull; +import org.dromara.common.core.domain.R; +import org.dromara.design.domain.vo.DesSchemeVo; +import org.dromara.design.domain.bo.DesSchemeBo; +import org.dromara.design.domain.DesScheme; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Collection; +import java.util.List; + +/** + * 设计初步方案Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesSchemeService extends IService{ + + /** + * 查询设计初步方案 + * + * @param id 主键 + * @return 设计初步方案 + */ + DesSchemeVo queryById(Long id); + + /** + * 分页查询设计初步方案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计初步方案分页列表 + */ + TableDataInfo queryPageList(DesSchemeBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计初步方案列表 + * + * @param bo 查询条件 + * @return 设计初步方案列表 + */ + List queryList(DesSchemeBo bo); + + /** + * 新增设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否新增成功 + */ + Boolean insertByBo(DesSchemeBo bo); + + /** + * 修改设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否修改成功 + */ + Boolean updateByBo(DesSchemeBo bo); + + /** + * 校验并批量删除设计初步方案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 添加文件 + */ + Long addFile(MultipartFile file, Long projectId); + + /** + * 修改文件 + */ + Boolean updateFile(MultipartFile file, Long projectId, Long id); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSubcontractService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSubcontractService.java new file mode 100644 index 00000000..6f412b9d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesSubcontractService.java @@ -0,0 +1,70 @@ +package org.dromara.design.service; + +import org.dromara.design.domain.vo.DesSubcontractVo; +import org.dromara.design.domain.bo.DesSubcontractBo; +import org.dromara.design.domain.DesSubcontract; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 设计分包Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesSubcontractService extends IService{ + + /** + * 查询设计分包 + * + * @param id 主键 + * @return 设计分包 + */ + DesSubcontractVo queryById(Long id); + + /** + * 分页查询设计分包列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计分包分页列表 + */ + TableDataInfo queryPageList(DesSubcontractBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计分包列表 + * + * @param bo 查询条件 + * @return 设计分包列表 + */ + List queryList(DesSubcontractBo bo); + + /** + * 新增设计分包 + * + * @param bo 设计分包 + * @return 是否新增成功 + */ + Boolean insertByBo(DesSubcontractBo bo); + + /** + * 修改设计分包 + * + * @param bo 设计分包 + * @return 是否修改成功 + */ + Boolean updateByBo(DesSubcontractBo bo); + + /** + * 校验并批量删除设计分包信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesUserService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesUserService.java new file mode 100644 index 00000000..3c7307a6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/IDesUserService.java @@ -0,0 +1,81 @@ +package org.dromara.design.service; + +import org.dromara.design.domain.dto.desUser.DesUserBatchDto; +import org.dromara.design.domain.vo.DesUserVo; +import org.dromara.design.domain.bo.DesUserBo; +import org.dromara.design.domain.DesUser; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.Collection; +import java.util.List; + +/** + * 设计人员Service接口 + * + * @author Lion Li + * @date 2025-08-11 + */ +public interface IDesUserService extends IService{ + + /** + * 查询设计人员 + * + * @param id 主键 + * @return 设计人员 + */ + DesUserVo queryById(Long id); + + /** + * 分页查询设计人员列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计人员分页列表 + */ + TableDataInfo queryPageList(DesUserBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的设计人员列表 + * + * @param bo 查询条件 + * @return 设计人员列表 + */ + List queryList(DesUserBo bo); + + /** + * 新增设计人员 + * + * @param bo 设计人员 + * @return 是否新增成功 + */ + Boolean insertByBo(DesUserBo bo); + + /** + * 修改设计人员 + * + * @param bo 设计人员 + * @return 是否修改成功 + */ + Boolean updateByBo(DesUserBo bo); + + /** + * 校验并批量删除设计人员信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + /** + * 批量添加或更新 + * + * @param dto + * @return + */ + Boolean batchAddOrUpdate( DesUserBatchDto dto); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectCatalogueServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectCatalogueServiceImpl.java new file mode 100644 index 00000000..650a3f9c --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectCatalogueServiceImpl.java @@ -0,0 +1,143 @@ +package org.dromara.design.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; +import org.dromara.design.domain.vo.DesCollectCatalogueVo; +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.design.mapper.DesCollectCatalogueMapper; +import org.dromara.design.service.IDesCollectCatalogueService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 收资清单目录Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +public class DesCollectCatalogueServiceImpl extends ServiceImpl implements IDesCollectCatalogueService { + + private final DesCollectCatalogueMapper baseMapper; + + /** + * 查询收资清单目录 + * + * @param id 主键 + * @return 收资清单目录 + */ + @Override + public DesCollectCatalogueVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询收资清单目录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资清单目录分页列表 + */ + @Override + public TableDataInfo queryPageList(DesCollectCatalogueBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的收资清单目录列表 + * + * @param bo 查询条件 + * @return 收资清单目录列表 + */ + @Override + public List queryList(DesCollectCatalogueBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesCollectCatalogueBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesCollectCatalogue::getId); + lqw.eq(bo.getCollectId() != null, DesCollectCatalogue::getCollectId, bo.getCollectId()); + lqw.eq(bo.getProjectId() != null, DesCollectCatalogue::getProjectId, bo.getProjectId()); + lqw.eq(bo.getNum() != null, DesCollectCatalogue::getNum, bo.getNum()); + lqw.like(StringUtils.isNotBlank(bo.getCatalogueName()), DesCollectCatalogue::getCatalogueName, bo.getCatalogueName()); + return lqw; + } + + /** + * 新增收资清单目录 + * + * @param bo 收资清单目录 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesCollectCatalogueBo bo) { + DesCollectCatalogue add = MapstructUtils.convert(bo, DesCollectCatalogue.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改收资清单目录 + * + * @param bo 收资清单目录 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesCollectCatalogueBo bo) { + DesCollectCatalogue update = MapstructUtils.convert(bo, DesCollectCatalogue.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesCollectCatalogue entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除收资清单目录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + public Boolean batchAddOrUpdate(List list, Long projectId) { + baseMapper.delete(Wrappers.lambdaQuery().eq(DesCollectCatalogue::getProjectId, projectId)); + + List convert = MapstructUtils.convert(list, DesCollectCatalogue.class); + return baseMapper.insertBatch(convert); + + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectFileServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectFileServiceImpl.java new file mode 100644 index 00000000..99f9943d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectFileServiceImpl.java @@ -0,0 +1,218 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.convert.Convert; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +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.service.OssService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.DesCollect; +import org.dromara.design.domain.DesCollectFile; +import org.dromara.design.domain.bo.DesCollectFileBo; +import org.dromara.design.domain.vo.DesCollectFileVo; +import org.dromara.design.mapper.DesCollectFileMapper; +import org.dromara.design.service.IDesCollectFileService; +import org.dromara.system.domain.vo.SysOssUploadVo; +import org.dromara.system.domain.vo.SysOssVo; +import org.dromara.system.service.ISysOssService; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Collection; + +import static org.dromara.common.constant.MinioPathConstant.ContactNoticeTemplate; + +/** + * 收资文件Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class DesCollectFileServiceImpl extends ServiceImpl implements IDesCollectFileService { + + private final DesCollectFileMapper baseMapper; + + private final ISysOssService ossService; + + /** + * 查询收资文件 + * + * @param id 主键 + * @return 收资文件 + */ + @Override + public DesCollectFileVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 分页查询收资文件列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资文件分页列表 + */ + @Override + public TableDataInfo queryPageList(DesCollectFileBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的收资文件列表 + * + * @param bo 查询条件 + * @return 收资文件列表 + */ + @Override + public List queryList(DesCollectFileBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesCollectFileBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesCollectFile::getId); + lqw.eq(bo.getCatalogueId() != null, DesCollectFile::getCatalogueId, bo.getCatalogueId()); + lqw.eq(bo.getProjectId() != null, DesCollectFile::getProjectId, bo.getProjectId()); + lqw.eq(bo.getOssId()!= null, DesCollectFile::getOssId, bo.getOssId()); + lqw.like(StringUtils.isNotBlank(bo.getFileName()), DesCollectFile::getFileName, bo.getFileName()); + lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), DesCollectFile::getFileUrl, bo.getFileUrl()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DesCollectFile::getStatus, bo.getStatus()); + return lqw; + } + + /** + * 新增收资文件 + * + * @param bo 收资文件 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesCollectFileBo bo) { + DesCollectFile add = MapstructUtils.convert(bo, DesCollectFile.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改收资文件 + * + * @param bo 收资文件 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesCollectFileBo bo) { + DesCollectFile update = MapstructUtils.convert(bo, DesCollectFile.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesCollectFile entity) { + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除收资文件信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if (isValid) { + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + public Boolean addFile(MultipartFile file, Long catalogueId, Long projectId) { + + SysOssVo upload = ossService.upload(file, ossService.minioFileName(ContactNoticeTemplate, file)); + DesCollectFile desCollectFile = new DesCollectFile(); + desCollectFile.setCatalogueId(catalogueId); + desCollectFile.setProjectId(projectId); + desCollectFile.setOssId(upload.getOssId()); + desCollectFile.setFileName(upload.getOriginalName()); + desCollectFile.setFileUrl(upload.getUrl()); + + return save(desCollectFile); + } + + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @EventListener(condition = "#processEvent.flowCode.endsWith('collectFile')") + public void processHandler(ProcessEvent processEvent) { + log.info("上传资料审核任务执行了{}", processEvent.toString()); + DesCollectFile configFile = this.getById(Convert.toLong(processEvent.getBusinessId())); + configFile.setStatus(processEvent.getStatus()); + if (processEvent.getSubmit()) { + configFile.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } + this.updateById(configFile); + + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @EventListener(condition = "#processTaskEvent.flowCode.endsWith('collectFile')") + public void processTaskHandler(ProcessTaskEvent processTaskEvent) { + log.info("上传资料审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('collectFile')") + public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { + log.info("监听删除流程事件,上传资料审核任务执行了{}", processDeleteEvent.toString()); + } + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectServiceImpl.java new file mode 100644 index 00000000..0ab9a247 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesCollectServiceImpl.java @@ -0,0 +1,365 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.slf4j.Slf4j; +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.service.DictService; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.core.utils.file.FileUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.common.oss.core.OssClient; +import org.dromara.common.oss.exception.OssException; +import org.dromara.common.oss.factory.OssFactory; +import org.dromara.common.utils.DocumentUtil; +import org.dromara.design.constant.DesDesignConstant; +import org.dromara.design.domain.DesCollectCatalogue; +import org.dromara.design.domain.DesDrawing; +import org.dromara.design.domain.bo.DesCollectCatalogueBo; +import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto; +import org.dromara.design.domain.dto.desCollect.DesCollectCatalogueWordDto; +import org.dromara.design.domain.dto.desCollect.DesCollectWordDto; +import org.dromara.design.domain.vo.DesCollectCatalogueVo; +import org.dromara.design.service.IDesCollectCatalogueService; +import org.dromara.materials.constants.MatMaterialsConstant; +import org.dromara.materials.domain.MatMaterialIssue; +import org.dromara.materials.domain.MatMaterialIssueItem; +import org.dromara.materials.domain.dto.materialissue.MatMaterialIssueWordDto; +import org.dromara.materials.domain.dto.materialissueitem.MatMaterialIssueItemWordDto; +import org.dromara.project.service.IBusProjectService; +import org.dromara.system.domain.vo.SysOssVo; +import org.springframework.beans.BeanUtils; +import org.springframework.context.event.EventListener; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesCollectBo; +import org.dromara.design.domain.vo.DesCollectVo; +import org.dromara.design.domain.DesCollect; +import org.dromara.design.mapper.DesCollectMapper; +import org.dromara.design.service.IDesCollectService; +import org.springframework.transaction.annotation.Transactional; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.zip.ZipOutputStream; + +/** + * 收资清单Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class DesCollectServiceImpl extends ServiceImpl implements IDesCollectService { + + private final DesCollectMapper baseMapper; + + private final IDesCollectCatalogueService collectCatalogueService; + + private final IBusProjectService projectService; + + private final DictService dictService; + + /** + * 查询收资清单 + * + * @param id 主键 + * @return 收资清单 + */ + @Override + public DesCollectVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询收资清单列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 收资清单分页列表 + */ + @Override + public TableDataInfo queryPageList(DesCollectBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的收资清单列表 + * + * @param bo 查询条件 + * @return 收资清单列表 + */ + @Override + public List queryList(DesCollectBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesCollectBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesCollect::getId); + lqw.eq(bo.getProjectId() != null, DesCollect::getProjectId, bo.getProjectId()); + lqw.eq(bo.getUserId() != null, DesCollect::getUserId, bo.getUserId()); + lqw.like(StringUtils.isNotBlank(bo.getUserName()), DesCollect::getUserName, bo.getUserName()); + lqw.eq(StringUtils.isNotBlank(bo.getPhone()), DesCollect::getPhone, bo.getPhone()); + lqw.eq(StringUtils.isNotBlank(bo.getEmail()), DesCollect::getEmail, bo.getEmail()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DesCollect::getStatus, bo.getStatus()); + return lqw; + } + + /** + * 新增收资清单 + * + * @param bo 收资清单 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesCollectBo bo) { + DesCollect add = MapstructUtils.convert(bo, DesCollect.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改收资清单 + * + * @param bo 收资清单 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesCollectBo bo) { + DesCollect update = MapstructUtils.convert(bo, DesCollect.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesCollect entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除收资清单信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean batchAddOrUpdate(DesCollectBatchDto dto) { + DesCollect convert = MapstructUtils.convert(dto.getDesCollectBo(), DesCollect.class); + boolean b = super.saveOrUpdate(convert); + if(CollectionUtil.isNotEmpty(dto.getCatalogueList())){ + + dto.getCatalogueList().forEach(item -> { + item.setCollectId(convert.getId()); + item.setProjectId(convert.getProjectId()); + } + ); + collectCatalogueService.batchAddOrUpdate(dto.getCatalogueList(),convert.getProjectId()); + } + return b; + } + + + @Override + public DesCollectVo getInfoByProjectId(Long projectId) { + DesCollectVo desCollectVo = baseMapper.selectVoOne(new LambdaQueryWrapper() + .eq(DesCollect::getProjectId, projectId) + .last("limit 1")); + + if (desCollectVo != null) { + DesCollectCatalogueBo desCollectCatalogueBo = new DesCollectCatalogueBo(); + desCollectCatalogueBo.setCollectId(desCollectVo.getId()); + List catalogueList = collectCatalogueService.queryList(desCollectCatalogueBo); + desCollectVo.setCatalogueList(catalogueList); + } + return desCollectVo; + } + + public void exportWordById(Long id, HttpServletResponse response) { + DesCollect descCollect = this.getById(id); + if (descCollect == null) { + throw new ServiceException("数据不存在"); + } + Path targetDir = Paths.get(DesDesignConstant.getDesignCollectFileUrl(descCollect)); + // 如果存在目录则直接返回,不存在则生成文件并返回 + if (!Files.exists(targetDir)) { + // 清理旧文件 + String baseUrl = DesDesignConstant.DESIGN_COLLECT_FILE_URL + descCollect.getId(); + try { + Path dirPath = Paths.get(baseUrl); + if (Files.exists(dirPath)) { + FileUtils.deleteDirectory(dirPath); + } + } catch (IOException e) { + log.error("文件目录:{},清理失败", baseUrl, e); + } + // 准备数据 + List itemList = collectCatalogueService.list(Wrappers. + lambdaQuery().eq(DesCollectCatalogue::getCollectId, id)); + DesCollectWordDto data = this.getReplacementDto(descCollect, itemList); + // 生成文件 + try (InputStream is = getClass().getClassLoader().getResourceAsStream(DesDesignConstant.DESIGN_COLLECT_TEMPLATE_PATH)) { + if (is == null) { + throw new ServiceException("模板文件不存在"); + } + LoopRowTableRenderPolicy hackLoopTableRenderPolicy = new LoopRowTableRenderPolicy(); + Configure config = Configure.builder().bind("items", hackLoopTableRenderPolicy).build(); + XWPFTemplate template = XWPFTemplate.compile(is, config); + template.render(data); + // 创建目标目录 + if (!Files.exists(targetDir)) { + Files.createDirectories(targetDir); + } + // 组合目标文件名 + String fileName = DesDesignConstant.getDesignCollectFileName(descCollect); + // 保存修改后的文件 + try (FileOutputStream fos = new FileOutputStream(targetDir.resolve(fileName).toFile())) { + template.write(fos); + } + template.close(); + } catch (IOException e) { + throw new OssException("生成Word文件失败,错误信息: " + e.getMessage()); + } + } + // 设置响应头,返回ZIP文件 + response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8"); + try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) { + DocumentUtil.zipDirectory(targetDir, targetDir, zos); + zos.flush(); + } catch (Exception e) { + throw new OssException("生成ZIP文件失败,错误信息: " + e.getMessage()); + } + } + + + + /** + * 根据实体获取替换数据 + */ + private DesCollectWordDto getReplacementDto(DesCollect desCollect, List items) { + DesCollectWordDto dto = new DesCollectWordDto(); + BeanUtils.copyProperties(desCollect, dto); + dto.setProjectName(projectService.getById(desCollect.getProjectId()).getProjectName()); + dto.setMajorName(dictService.getDictLabel("des_user_major", desCollect.getUserMajor())); + + // 明细项信息 + List dtoItems = new ArrayList<>(); + for (DesCollectCatalogue desc : items) { + DesCollectCatalogueWordDto itemDto = new DesCollectCatalogueWordDto(); + BeanUtils.copyProperties(desc, itemDto); + dtoItems.add(itemDto); + } + dto.setItems(dtoItems); + return dto; + } + + + + + + + + + + + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @EventListener(condition = "#processEvent.flowCode.endsWith('collect')") + public void processHandler(ProcessEvent processEvent) { + log.info("收资清单审核任务执行了{}", processEvent.toString()); + DesCollect desCollect = this.getById(Convert.toLong(processEvent.getBusinessId())); + desCollect.setStatus(processEvent.getStatus()); + if (processEvent.getSubmit()) { + desCollect.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } + this.updateById(desCollect); + + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @EventListener(condition = "#processTaskEvent.flowCode.endsWith('collect')") + public void processTaskHandler(ProcessTaskEvent processTaskEvent) { + log.info("收资清单审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('collect')") + public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { + log.info("监听删除流程事件,收资清单审核任务执行了{}", processDeleteEvent.toString()); + } + + + + + + + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractCatalogueServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractCatalogueServiceImpl.java new file mode 100644 index 00000000..a7570252 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractCatalogueServiceImpl.java @@ -0,0 +1,135 @@ +package org.dromara.design.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesExtractCatalogueBo; +import org.dromara.design.domain.vo.DesExtractCatalogueVo; +import org.dromara.design.domain.DesExtractCatalogue; +import org.dromara.design.mapper.DesExtractCatalogueMapper; +import org.dromara.design.service.IDesExtractCatalogueService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 提资清单目录Service业务层处理 + * + * @author Lion Li + * @date 2025-08-12 + */ +@RequiredArgsConstructor +@Service +public class DesExtractCatalogueServiceImpl extends ServiceImpl + implements IDesExtractCatalogueService { + + private final DesExtractCatalogueMapper baseMapper; + + /** + * 查询提资清单目录 + * + * @param id 主键 + * @return 提资清单目录 + */ + @Override + public DesExtractCatalogueVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询提资清单目录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 提资清单目录分页列表 + */ + @Override + public TableDataInfo queryPageList(DesExtractCatalogueBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的提资清单目录列表 + * + * @param bo 查询条件 + * @return 提资清单目录列表 + */ + @Override + public List queryList(DesExtractCatalogueBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesExtractCatalogueBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesExtractCatalogue::getId); + lqw.eq(bo.getExtractId() != null, DesExtractCatalogue::getExtractId, bo.getExtractId()); + lqw.eq(bo.getProjectId() != null, DesExtractCatalogue::getProjectId, bo.getProjectId()); + lqw.eq(bo.getNum() != null, DesExtractCatalogue::getNum, bo.getNum()); + lqw.like(StringUtils.isNotBlank(bo.getCatalogueName()), DesExtractCatalogue::getCatalogueName, bo.getCatalogueName()); + return lqw; + } + + /** + * 新增提资清单目录 + * + * @param bo 提资清单目录 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesExtractCatalogueBo bo) { + DesExtractCatalogue add = MapstructUtils.convert(bo, DesExtractCatalogue.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改提资清单目录 + * + * @param bo 提资清单目录 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesExtractCatalogueBo bo) { + DesExtractCatalogue update = MapstructUtils.convert(bo, DesExtractCatalogue.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesExtractCatalogue entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除提资清单目录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractServiceImpl.java new file mode 100644 index 00000000..3015b866 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesExtractServiceImpl.java @@ -0,0 +1,232 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.convert.Convert; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +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.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.DesCollect; +import org.dromara.design.domain.DesExtractCatalogue; +import org.dromara.design.domain.bo.DesExtractCatalogueBo; +import org.dromara.design.domain.dto.desExtract.DesExtractBatchDto; +import org.dromara.design.domain.vo.DesExtractCatalogueVo; +import org.dromara.design.service.IDesExtractCatalogueService; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesExtractBo; +import org.dromara.design.domain.vo.DesExtractVo; +import org.dromara.design.domain.DesExtract; +import org.dromara.design.mapper.DesExtractMapper; +import org.dromara.design.service.IDesExtractService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 提资清单Service业务层处理 + * + * @author Lion Li + * @date 2025-08-12 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class DesExtractServiceImpl extends ServiceImpl implements IDesExtractService { + + private final DesExtractMapper baseMapper; + + private final IDesExtractCatalogueService extractCatalogueService; + + /** + * 查询提资清单 + * + * @param id 主键 + * @return 提资清单 + */ + @Override + public DesExtractVo queryById(Long id){ + DesExtractVo desExtractVo = baseMapper.selectVoById(id); + DesExtractCatalogueBo desExtractCatalogueBo = new DesExtractCatalogueBo(); + desExtractCatalogueBo.setExtractId(id); + List desExtractCatalogueVos = extractCatalogueService.queryList(desExtractCatalogueBo); + desExtractVo.setCatalogueList(desExtractCatalogueVos); + return desExtractVo; + } + + /** + * 分页查询提资清单列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 提资清单分页列表 + */ + @Override + public TableDataInfo queryPageList(DesExtractBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的提资清单列表 + * + * @param bo 查询条件 + * @return 提资清单列表 + */ + @Override + public List queryList(DesExtractBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesExtractBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesExtract::getId); + lqw.eq(bo.getProjectId() != null, DesExtract::getProjectId, bo.getProjectId()); + lqw.eq(bo.getUserId() != null, DesExtract::getUserId, bo.getUserId()); + lqw.like(StringUtils.isNotBlank(bo.getUserName()), DesExtract::getUserName, bo.getUserName()); + lqw.eq(StringUtils.isNotBlank(bo.getUserMajor()), DesExtract::getUserMajor, bo.getUserMajor()); + lqw.eq(StringUtils.isNotBlank(bo.getPhone()), DesExtract::getPhone, bo.getPhone()); + lqw.eq(StringUtils.isNotBlank(bo.getEmail()), DesExtract::getEmail, bo.getEmail()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DesExtract::getStatus, bo.getStatus()); + return lqw; + } + + /** + * 新增提资清单 + * + * @param bo 提资清单 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesExtractBo bo) { + DesExtract add = MapstructUtils.convert(bo, DesExtract.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改提资清单 + * + * @param bo 提资清单 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesExtractBo bo) { + DesExtract update = MapstructUtils.convert(bo, DesExtract.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesExtract entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除提资清单信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Long batchAddOrUpdate(DesExtractBatchDto dto) { + DesExtract convert = MapstructUtils.convert(dto.getDesExtractBo(), DesExtract.class); + super.saveOrUpdate(convert); + if(CollectionUtil.isNotEmpty(dto.getCatalogueList())){ + extractCatalogueService.remove(Wrappers.lambdaQuery() + .eq(DesExtractCatalogue::getExtractId,convert.getId())); + + dto.getCatalogueList().forEach(item -> { + item.setExtractId(convert.getId()); + item.setProjectId(convert.getProjectId()); + } + ); + extractCatalogueService.saveBatch(MapstructUtils.convert(dto.getCatalogueList(), DesExtractCatalogue.class)); + } + return convert.getId(); + } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @EventListener(condition = "#processEvent.flowCode.endsWith('extract')") + public void processHandler(ProcessEvent processEvent) { + log.info("收资清单审核任务执行了{}", processEvent.toString()); + DesExtract desExtract = this.getById(Convert.toLong(processEvent.getBusinessId())); + desExtract.setStatus(processEvent.getStatus()); + if (processEvent.getSubmit()) { + desExtract.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } + this.updateById(desExtract); + + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @EventListener(condition = "#processTaskEvent.flowCode.endsWith('extract')") + public void processTaskHandler(ProcessTaskEvent processTaskEvent) { + log.info("收资清单审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('extract')") + public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { + log.info("监听删除流程事件,收资清单审核任务执行了{}", processDeleteEvent.toString()); + } + + + + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesPrelimSchemeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesPrelimSchemeServiceImpl.java new file mode 100644 index 00000000..d678db14 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesPrelimSchemeServiceImpl.java @@ -0,0 +1,227 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.convert.Convert; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +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.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.DesScheme; +import org.dromara.system.domain.vo.SysOssUploadVo; +import org.dromara.system.domain.vo.SysOssVo; +import org.dromara.system.service.ISysOssService; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesPrelimSchemeBo; +import org.dromara.design.domain.vo.DesPrelimSchemeVo; +import org.dromara.design.domain.DesPrelimScheme; +import org.dromara.design.mapper.DesPrelimSchemeMapper; +import org.dromara.design.service.IDesPrelimSchemeService; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +import static org.dromara.common.constant.MinioPathConstant.ContactNoticeTemplate; + +/** + * 设计初步方案Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class DesPrelimSchemeServiceImpl extends ServiceImpl implements IDesPrelimSchemeService { + + private final DesPrelimSchemeMapper baseMapper; + + private final ISysOssService ossService; + + /** + * 查询设计初步方案 + * + * @param id 主键 + * @return 设计初步方案 + */ + @Override + public DesPrelimSchemeVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询设计初步方案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计初步方案分页列表 + */ + @Override + public TableDataInfo queryPageList(DesPrelimSchemeBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计初步方案列表 + * + * @param bo 查询条件 + * @return 设计初步方案列表 + */ + @Override + public List queryList(DesPrelimSchemeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesPrelimSchemeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesPrelimScheme::getId); + lqw.eq(bo.getProjectId() != null, DesPrelimScheme::getProjectId, bo.getProjectId()); + lqw.eq(bo.getOssId()!= null, DesPrelimScheme::getOssId, bo.getOssId()); + lqw.like(StringUtils.isNotBlank(bo.getFileName()), DesPrelimScheme::getFileName, bo.getFileName()); + lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), DesPrelimScheme::getFileUrl, bo.getFileUrl()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DesPrelimScheme::getStatus, bo.getStatus()); + return lqw; + } + + /** + * 新增设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesPrelimSchemeBo bo) { + DesPrelimScheme add = MapstructUtils.convert(bo, DesPrelimScheme.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesPrelimSchemeBo bo) { + DesPrelimScheme update = MapstructUtils.convert(bo, DesPrelimScheme.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesPrelimScheme entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计初步方案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + public Long addFile(MultipartFile file, Long projectId) { + SysOssVo upload = ossService.upload(file, ossService.minioFileName(ContactNoticeTemplate, file)); + + DesPrelimScheme desPrelimScheme = new DesPrelimScheme(); + desPrelimScheme.setProjectId(projectId); + desPrelimScheme.setOssId(upload.getOssId()); + desPrelimScheme.setFileName(upload.getOriginalName()); + desPrelimScheme.setFileUrl(upload.getUrl()); + baseMapper.insert(desPrelimScheme); + return desPrelimScheme.getId(); + } + + @Override + public Boolean updateFile(MultipartFile file, Long projectId, Long id) { + + DesPrelimScheme desPrelimScheme = baseMapper.selectById(id); + + if(file != null ){ + SysOssVo upload = ossService.upload(file, ossService.minioFileName(ContactNoticeTemplate, file)); + + desPrelimScheme.setOssId(upload.getOssId()); + desPrelimScheme.setFileName(upload.getFileName()); + desPrelimScheme.setFileUrl(upload.getUrl()); + } + + return baseMapper.updateById(desPrelimScheme)>0; + } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @EventListener(condition = "#processEvent.flowCode.endsWith('prelimScheme')") + public void processHandler(ProcessEvent processEvent) { + log.info("初步设计方案审核任务执行了{}", processEvent.toString()); + DesPrelimScheme prelimScheme = this.getById(Convert.toLong(processEvent.getBusinessId())); + prelimScheme.setStatus(processEvent.getStatus()); + if (processEvent.getSubmit()) { + prelimScheme.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } + this.updateById(prelimScheme); + + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @EventListener(condition = "#processTaskEvent.flowCode.endsWith('prelimScheme')") + public void processTaskHandler(ProcessTaskEvent processTaskEvent) { + log.info("初步设计方案审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('prelimScheme')") + public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { + log.info("监听删除流程事件,初步设计方案审核任务执行了{}", processDeleteEvent.toString()); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSchemeServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSchemeServiceImpl.java new file mode 100644 index 00000000..6e73c6d3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSchemeServiceImpl.java @@ -0,0 +1,236 @@ +package org.dromara.design.service.impl; + +import cn.hutool.core.convert.Convert; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.extern.slf4j.Slf4j; +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.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.common.oss.core.OssClient; +import org.dromara.common.oss.factory.OssFactory; +import org.dromara.design.domain.DesCollectFile; +import org.dromara.design.domain.DesPrelimScheme; +import org.dromara.system.domain.vo.SysOssUploadVo; +import org.dromara.system.domain.vo.SysOssVo; +import org.dromara.system.service.ISysOssService; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesSchemeBo; +import org.dromara.design.domain.vo.DesSchemeVo; +import org.dromara.design.domain.DesScheme; +import org.dromara.design.mapper.DesSchemeMapper; +import org.dromara.design.service.IDesSchemeService; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Collection; + +import static org.dromara.common.constant.MinioPathConstant.ContactNoticeTemplate; + +/** + * 设计初步方案Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class DesSchemeServiceImpl extends ServiceImpl implements IDesSchemeService { + + private final DesSchemeMapper baseMapper; + + private final ISysOssService ossService; + + /** + * 查询设计初步方案 + * + * @param id 主键 + * @return 设计初步方案 + */ + @Override + public DesSchemeVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询设计初步方案列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计初步方案分页列表 + */ + @Override + public TableDataInfo queryPageList(DesSchemeBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计初步方案列表 + * + * @param bo 查询条件 + * @return 设计初步方案列表 + */ + @Override + public List queryList(DesSchemeBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesSchemeBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesScheme::getId); + lqw.eq(bo.getProjectId() != null, DesScheme::getProjectId, bo.getProjectId()); + lqw.eq(bo.getOssId()!= null, DesScheme::getOssId, bo.getOssId()); + lqw.like(StringUtils.isNotBlank(bo.getFileName()), DesScheme::getFileName, bo.getFileName()); + lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), DesScheme::getFileUrl, bo.getFileUrl()); + lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DesScheme::getStatus, bo.getStatus()); + return lqw; + } + + /** + * 新增设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesSchemeBo bo) { + DesScheme add = MapstructUtils.convert(bo, DesScheme.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改设计初步方案 + * + * @param bo 设计初步方案 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesSchemeBo bo) { + DesScheme update = MapstructUtils.convert(bo, DesScheme.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesScheme entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计初步方案信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + public Long addFile(MultipartFile file, Long projectId) { + SysOssVo upload = ossService.upload(file, ossService.minioFileName(ContactNoticeTemplate, file)); + DesScheme scheme = new DesScheme(); + scheme.setProjectId(projectId); + + scheme.setOssId(upload.getOssId()); + scheme.setFileName(upload.getOriginalName()); + scheme.setFileUrl(upload.getUrl()); + + baseMapper.insert(scheme); + return scheme.getId(); + } + + @Override + public Boolean updateFile(MultipartFile file, Long projectId, Long id) { + DesScheme desScheme = baseMapper.selectById(id); + + if(file!=null){ + SysOssVo upload = ossService.upload(file, ossService.minioFileName(ContactNoticeTemplate, file)); + + desScheme.setOssId(upload.getOssId()); + desScheme.setFileName(upload.getOriginalName()); + desScheme.setFileUrl(upload.getUrl()); + } + return baseMapper.updateById(desScheme)>0; + } + + /** + * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) + * 正常使用只需#processEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processEvent 参数 + */ + @EventListener(condition = "#processEvent.flowCode.endsWith('scheme')") + public void processHandler(ProcessEvent processEvent) { + log.info("设计方案审核任务执行了{}", processEvent.toString()); + DesScheme descScheme = this.getById(Convert.toLong(processEvent.getBusinessId())); + descScheme.setStatus(processEvent.getStatus()); + if (processEvent.getSubmit()) { + descScheme.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } + this.updateById(descScheme); + + } + + /** + * 执行任务创建监听 + * 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 + * 在方法中判断流程节点key + * if ("xxx".equals(processTaskEvent.getNodeCode())) { + * //执行业务逻辑 + * } + * + * @param processTaskEvent 参数 + */ + @EventListener(condition = "#processTaskEvent.flowCode.endsWith('scheme')") + public void processTaskHandler(ProcessTaskEvent processTaskEvent) { + log.info("设计方案审核任务创建了{}", processTaskEvent.toString()); + } + + /** + * 监听删除流程事件 + * 正常使用只需#processDeleteEvent.flowCode=='leave1' + * 示例为了方便则使用startsWith匹配了全部示例key + * + * @param processDeleteEvent 参数 + */ + @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('scheme')") + public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { + log.info("监听删除流程事件,设计方案审核任务执行了{}", processDeleteEvent.toString()); + } + + + + + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSubcontractServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSubcontractServiceImpl.java new file mode 100644 index 00000000..3c759fbe --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesSubcontractServiceImpl.java @@ -0,0 +1,132 @@ +package org.dromara.design.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesSubcontractBo; +import org.dromara.design.domain.vo.DesSubcontractVo; +import org.dromara.design.domain.DesSubcontract; +import org.dromara.design.mapper.DesSubcontractMapper; +import org.dromara.design.service.IDesSubcontractService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 设计分包Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +public class DesSubcontractServiceImpl extends ServiceImpl implements IDesSubcontractService { + + private final DesSubcontractMapper baseMapper; + + /** + * 查询设计分包 + * + * @param id 主键 + * @return 设计分包 + */ + @Override + public DesSubcontractVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询设计分包列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计分包分页列表 + */ + @Override + public TableDataInfo queryPageList(DesSubcontractBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计分包列表 + * + * @param bo 查询条件 + * @return 设计分包列表 + */ + @Override + public List queryList(DesSubcontractBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesSubcontractBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesSubcontract::getId); + lqw.eq(bo.getProjectId() != null, DesSubcontract::getProjectId, bo.getProjectId()); + lqw.eq(StringUtils.isNotBlank(bo.getSubContent()), DesSubcontract::getSubContent, bo.getSubContent()); + return lqw; + } + + /** + * 新增设计分包 + * + * @param bo 设计分包 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesSubcontractBo bo) { + DesSubcontract add = MapstructUtils.convert(bo, DesSubcontract.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改设计分包 + * + * @param bo 设计分包 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesSubcontractBo bo) { + DesSubcontract update = MapstructUtils.convert(bo, DesSubcontract.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesSubcontract entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计分包信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesUserServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesUserServiceImpl.java new file mode 100644 index 00000000..af457319 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/design/service/impl/DesUserServiceImpl.java @@ -0,0 +1,144 @@ +package org.dromara.design.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.design.domain.dto.desUser.DesUserBatchDto; +import org.springframework.stereotype.Service; +import org.dromara.design.domain.bo.DesUserBo; +import org.dromara.design.domain.vo.DesUserVo; +import org.dromara.design.domain.DesUser; +import org.dromara.design.mapper.DesUserMapper; +import org.dromara.design.service.IDesUserService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 设计人员Service业务层处理 + * + * @author Lion Li + * @date 2025-08-11 + */ +@RequiredArgsConstructor +@Service +public class DesUserServiceImpl extends ServiceImpl implements IDesUserService { + + private final DesUserMapper baseMapper; + + /** + * 查询设计人员 + * + * @param id 主键 + * @return 设计人员 + */ + @Override + public DesUserVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询设计人员列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 设计人员分页列表 + */ + @Override + public TableDataInfo queryPageList(DesUserBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的设计人员列表 + * + * @param bo 查询条件 + * @return 设计人员列表 + */ + @Override + public List queryList(DesUserBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(DesUserBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(DesUser::getId); + lqw.eq(bo.getProjectId() != null, DesUser::getProjectId, bo.getProjectId()); + lqw.eq(bo.getUserId() != null, DesUser::getUserId, bo.getUserId()); + lqw.like(StringUtils.isNotBlank(bo.getUserName()), DesUser::getUserName, bo.getUserName()); + lqw.eq(StringUtils.isNotBlank(bo.getUserType()), DesUser::getUserType, bo.getUserType()); + lqw.eq(StringUtils.isNotBlank(bo.getUserMajor()), DesUser::getUserMajor, bo.getUserMajor()); + return lqw; + } + + /** + * 新增设计人员 + * + * @param bo 设计人员 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(DesUserBo bo) { + DesUser add = MapstructUtils.convert(bo, DesUser.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改设计人员 + * + * @param bo 设计人员 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(DesUserBo bo) { + DesUser update = MapstructUtils.convert(bo, DesUser.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(DesUser entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除设计人员信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } + + @Override + public Boolean batchAddOrUpdate(DesUserBatchDto dto) { + baseMapper.delete(Wrappers.lambdaQuery().eq(DesUser::getProjectId, dto.getProjectId())); + List desUsers = MapstructUtils.convert(dto.getList(), DesUser.class); + //todo:发消息 + return baseMapper.insertBatch(desUsers); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysOssService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysOssService.java index 8b0ee976..0a1fbd8f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysOssService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysOssService.java @@ -54,6 +54,15 @@ public interface ISysOssService { */ SysOssVo upload(MultipartFile file); + /** + * 上传 MultipartFile 到对象存储服务,保存文件信息到数据库 + * + * @param file 要上传的 MultipartFile 对象 + * @param filePath 文件路径 + * @return 上传成功后的 SysOssVo 对象,包含文件信息 + */ + SysOssVo upload(MultipartFile file,String filePath); + /** * 上传 MultipartFile 到对象存储服务,不保存文件信息到数据库 * diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssServiceImpl.java index 56f52772..669f3ce6 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysOssServiceImpl.java @@ -210,6 +210,29 @@ public class SysOssServiceImpl implements ISysOssService, OssService { return buildResultEntity(originalfileName, suffix, storage.getConfigKey(), uploadResult); } + + /** + * 上传 MultipartFile 到对象存储服务,不保存文件信息到数据库 + * + * @param file 要上传的 MultipartFile 对象 + * @param filePath 文件路径 + * @return 上传成功后的 SysOssVo 对象,包含文件信息 + */ + @Override + public SysOssVo upload(MultipartFile file, String filePath) { + String originalfileName = file.getOriginalFilename(); + String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length()); + OssClient storage = OssFactory.instance(); + UploadResult uploadResult; + try { + uploadResult = storage.uploadFilePath(file.getBytes(), filePath, file.getContentType()); + } catch (IOException e) { + throw new ServiceException(e.getMessage()); + } + // 保存文件信息 + return buildResultEntity(originalfileName, suffix, storage.getConfigKey(), uploadResult); + } + /** * 上传 MultipartFile 到对象存储服务,不保存文件信息到数据库 * diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectCatalogueMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectCatalogueMapper.xml new file mode 100644 index 00000000..4e0a5d63 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectCatalogueMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectFileMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectFileMapper.xml new file mode 100644 index 00000000..18061d66 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectFileMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectMapper.xml new file mode 100644 index 00000000..d90faa66 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesCollectMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesExtractCatalogueMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesExtractCatalogueMapper.xml new file mode 100644 index 00000000..1a93ab61 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesExtractCatalogueMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesPrelimSchemeMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesPrelimSchemeMapper.xml new file mode 100644 index 00000000..b3b4f998 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesPrelimSchemeMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSchemeMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSchemeMapper.xml new file mode 100644 index 00000000..bd5da83a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSchemeMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSubcontractMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSubcontractMapper.xml new file mode 100644 index 00000000..f7a7bee4 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesSubcontractMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesUserMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesUserMapper.xml new file mode 100644 index 00000000..a52cbe88 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/DesUserMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/extract/index.vue b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/extract/index.vue new file mode 100644 index 00000000..75fc6564 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/design/extract/index.vue @@ -0,0 +1,271 @@ + + +