设计
This commit is contained in:
Binary file not shown.
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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<DesCollectCatalogueVo> 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<DesCollectCatalogueVo> list = desCollectCatalogueService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "收资清单目录", DesCollectCatalogueVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收资清单目录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:collectCatalogue:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesCollectCatalogueVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desCollectCatalogueService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -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<DesCollectVo> 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<DesCollectVo> list = desCollectService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "收资清单", DesCollectVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收资清单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:collect:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesCollectVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desCollectService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增或修改
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Void> batchAddOrUpdate(@RequestBody DesCollectBatchDto dto) {
|
||||
return toAjax(desCollectService.batchAddOrUpdate(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收资清单详细信息
|
||||
*
|
||||
* @param projectId 项目ID
|
||||
*/
|
||||
@SaCheckPermission("design:collect:query")
|
||||
@GetMapping("/byProjectId/{projectId}")
|
||||
public R<DesCollectVo> 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);
|
||||
}
|
||||
|
||||
}
|
@ -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<DesCollectFileVo> 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<DesCollectFileVo> list = desCollectFileService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "收资文件", DesCollectFileVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收资文件详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:collectFile:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesCollectFileVo> 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<Void> 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<Void> 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<Void> 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<Void> addFile(MultipartFile file,Long catalogueId,Long projectId) {
|
||||
return toAjax(desCollectFileService.addFile(file, catalogueId, projectId));
|
||||
}
|
||||
}
|
@ -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<DesExtractCatalogueVo> 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<DesExtractCatalogueVo> list = desExtractCatalogueService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "提资清单目录", DesExtractCatalogueVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提资清单目录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:extractCatalogue:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesExtractCatalogueVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desExtractCatalogueService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -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<DesExtractVo> 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<DesExtractVo> list = desExtractService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "提资清单", DesExtractVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提资清单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:extract:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesExtractVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desExtractService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增或修改
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Long> batchAddOrUpdate(@RequestBody DesExtractBatchDto dto) {
|
||||
return R.ok(desExtractService.batchAddOrUpdate(dto));
|
||||
}
|
||||
}
|
@ -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<DesPrelimSchemeVo> 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<DesPrelimSchemeVo> list = desPrelimSchemeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计初步方案", DesPrelimSchemeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计初步方案详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:prelimScheme:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesPrelimSchemeVo> 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<Void> 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<Void> 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<Void> 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<Long> 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<Void> updateFile(MultipartFile file, Long projectId, @NotNull(message = "主键不能为空")@PathVariable Long id) {
|
||||
return toAjax(desPrelimSchemeService.updateFile(file, projectId,id));
|
||||
}
|
||||
|
||||
}
|
@ -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<DesSchemeVo> 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<DesSchemeVo> list = desSchemeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计方案", DesSchemeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计方案详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:scheme:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesSchemeVo> 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<Void> 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<Void> 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<Void> 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<Long> 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<Void> updateFile(MultipartFile file, Long projectId, @NotNull(message = "主键不能为空")@PathVariable Long id) {
|
||||
return toAjax(desSchemeService.updateFile(file, projectId,id));
|
||||
}
|
||||
}
|
@ -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<DesSubcontractVo> 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<DesSubcontractVo> list = desSubcontractService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计分包", DesSubcontractVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计分包详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:subcontract:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesSubcontractVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desSubcontractService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -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<DesUserVo> 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<DesUserVo> list = desUserService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设计人员", DesUserVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设计人员详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("design:user:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<DesUserVo> 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<Void> 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<Void> 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<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(desUserService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增或修改
|
||||
*/
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/batch")
|
||||
public R<Void> batchAddOrUpdate(@RequestBody DesUserBatchDto dto) {
|
||||
return toAjax(desUserService.batchAddOrUpdate(dto));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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<DesCollectCatalogueBo> catalogueList;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<DesCollectCatalogueWordDto> items;
|
||||
}
|
@ -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<DesExtractCatalogueBo> catalogueList;
|
||||
|
||||
|
||||
}
|
@ -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<DesUserBo> list;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@NotNull(message = "项目id不能为空")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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<DesCollectCatalogueVo> catalogueList;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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<DesExtractCatalogueVo> catalogueList;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<DesCollectCatalogue, DesCollectCatalogueVo> {
|
||||
|
||||
}
|
@ -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<DesCollectFile, DesCollectFileVo> {
|
||||
|
||||
}
|
@ -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<DesCollect, DesCollectVo> {
|
||||
|
||||
}
|
@ -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<DesExtractCatalogue, DesExtractCatalogueVo> {
|
||||
|
||||
}
|
@ -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<DesExtract, DesExtractVo> {
|
||||
|
||||
}
|
@ -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<DesPrelimScheme, DesPrelimSchemeVo> {
|
||||
|
||||
}
|
@ -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<DesScheme, DesSchemeVo> {
|
||||
|
||||
}
|
@ -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<DesSubcontract, DesSubcontractVo> {
|
||||
|
||||
}
|
@ -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<DesUser, DesUserVo> {
|
||||
|
||||
}
|
@ -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<DesCollectCatalogue>{
|
||||
|
||||
/**
|
||||
* 查询收资清单目录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 收资清单目录
|
||||
*/
|
||||
DesCollectCatalogueVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询收资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 收资清单目录分页列表
|
||||
*/
|
||||
TableDataInfo<DesCollectCatalogueVo> queryPageList(DesCollectCatalogueBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资清单目录列表
|
||||
*/
|
||||
List<DesCollectCatalogueVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量新增或修改收资清单目录
|
||||
*/
|
||||
Boolean batchAddOrUpdate(List<DesCollectCatalogueBo> list,Long projectId);
|
||||
}
|
@ -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<DesCollectFile>{
|
||||
|
||||
/**
|
||||
* 查询收资文件
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 收资文件
|
||||
*/
|
||||
DesCollectFileVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询收资文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 收资文件分页列表
|
||||
*/
|
||||
TableDataInfo<DesCollectFileVo> queryPageList(DesCollectFileBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资文件列表
|
||||
*/
|
||||
List<DesCollectFileVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 批量添加文件
|
||||
* @return 是否添加成功
|
||||
*/
|
||||
Boolean addFile(MultipartFile file, Long catalogueId, Long projectId);
|
||||
|
||||
|
||||
|
||||
}
|
@ -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<DesCollect>{
|
||||
|
||||
/**
|
||||
* 查询收资清单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 收资清单
|
||||
*/
|
||||
DesCollectVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询收资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 收资清单分页列表
|
||||
*/
|
||||
TableDataInfo<DesCollectVo> queryPageList(DesCollectBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资清单列表
|
||||
*/
|
||||
List<DesCollectVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量添加或更新
|
||||
*/
|
||||
Boolean batchAddOrUpdate(@RequestBody DesCollectBatchDto dto) ;
|
||||
|
||||
/**
|
||||
* 根据项目id查询收资清单
|
||||
*/
|
||||
DesCollectVo getInfoByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 导出Word
|
||||
*/
|
||||
void exportWordById(Long id, HttpServletResponse response);
|
||||
}
|
@ -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<DesExtractCatalogue>{
|
||||
|
||||
/**
|
||||
* 查询提资清单目录
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 提资清单目录
|
||||
*/
|
||||
DesExtractCatalogueVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询提资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 提资清单目录分页列表
|
||||
*/
|
||||
TableDataInfo<DesExtractCatalogueVo> queryPageList(DesExtractCatalogueBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的提资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 提资清单目录列表
|
||||
*/
|
||||
List<DesExtractCatalogueVo> 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<Long> ids, Boolean isValid);
|
||||
}
|
@ -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<DesExtract>{
|
||||
|
||||
/**
|
||||
* 查询提资清单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 提资清单
|
||||
*/
|
||||
DesExtractVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询提资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 提资清单分页列表
|
||||
*/
|
||||
TableDataInfo<DesExtractVo> queryPageList(DesExtractBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的提资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 提资清单列表
|
||||
*/
|
||||
List<DesExtractVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量添加或更新提资清单
|
||||
*/
|
||||
Long batchAddOrUpdate(DesExtractBatchDto dto);
|
||||
}
|
@ -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<DesPrelimScheme>{
|
||||
|
||||
/**
|
||||
* 查询设计初步方案
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设计初步方案
|
||||
*/
|
||||
DesPrelimSchemeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设计初步方案分页列表
|
||||
*/
|
||||
TableDataInfo<DesPrelimSchemeVo> queryPageList(DesPrelimSchemeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计初步方案列表
|
||||
*/
|
||||
List<DesPrelimSchemeVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 添加文件
|
||||
*/
|
||||
Long addFile(MultipartFile file, Long projectId);
|
||||
|
||||
/**
|
||||
* 修改文件
|
||||
*/
|
||||
Boolean updateFile(MultipartFile file, Long projectId, Long id);
|
||||
}
|
@ -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<DesScheme>{
|
||||
|
||||
/**
|
||||
* 查询设计初步方案
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设计初步方案
|
||||
*/
|
||||
DesSchemeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设计初步方案分页列表
|
||||
*/
|
||||
TableDataInfo<DesSchemeVo> queryPageList(DesSchemeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计初步方案列表
|
||||
*/
|
||||
List<DesSchemeVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 添加文件
|
||||
*/
|
||||
Long addFile(MultipartFile file, Long projectId);
|
||||
|
||||
/**
|
||||
* 修改文件
|
||||
*/
|
||||
Boolean updateFile(MultipartFile file, Long projectId, Long id);
|
||||
}
|
@ -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<DesSubcontract>{
|
||||
|
||||
/**
|
||||
* 查询设计分包
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设计分包
|
||||
*/
|
||||
DesSubcontractVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设计分包列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设计分包分页列表
|
||||
*/
|
||||
TableDataInfo<DesSubcontractVo> queryPageList(DesSubcontractBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计分包列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计分包列表
|
||||
*/
|
||||
List<DesSubcontractVo> 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<Long> ids, Boolean isValid);
|
||||
}
|
@ -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<DesUser>{
|
||||
|
||||
/**
|
||||
* 查询设计人员
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设计人员
|
||||
*/
|
||||
DesUserVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设计人员列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设计人员分页列表
|
||||
*/
|
||||
TableDataInfo<DesUserVo> queryPageList(DesUserBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计人员列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计人员列表
|
||||
*/
|
||||
List<DesUserVo> 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<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量添加或更新
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Boolean batchAddOrUpdate( DesUserBatchDto dto);
|
||||
}
|
@ -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<DesCollectCatalogueMapper, DesCollectCatalogue> 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<DesCollectCatalogueVo> queryPageList(DesCollectCatalogueBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesCollectCatalogue> lqw = buildQueryWrapper(bo);
|
||||
Page<DesCollectCatalogueVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资清单目录列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesCollectCatalogueVo> queryList(DesCollectCatalogueBo bo) {
|
||||
LambdaQueryWrapper<DesCollectCatalogue> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesCollectCatalogue> buildQueryWrapper(DesCollectCatalogueBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesCollectCatalogue> 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<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchAddOrUpdate(List<DesCollectCatalogueBo> list, Long projectId) {
|
||||
baseMapper.delete(Wrappers.<DesCollectCatalogue>lambdaQuery().eq(DesCollectCatalogue::getProjectId, projectId));
|
||||
|
||||
List<DesCollectCatalogue> convert = MapstructUtils.convert(list, DesCollectCatalogue.class);
|
||||
return baseMapper.insertBatch(convert);
|
||||
|
||||
}
|
||||
}
|
@ -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<DesCollectFileMapper, DesCollectFile> 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<DesCollectFileVo> queryPageList(DesCollectFileBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesCollectFile> lqw = buildQueryWrapper(bo);
|
||||
Page<DesCollectFileVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资文件列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资文件列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesCollectFileVo> queryList(DesCollectFileBo bo) {
|
||||
LambdaQueryWrapper<DesCollectFile> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesCollectFile> buildQueryWrapper(DesCollectFileBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesCollectFile> 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<Long> 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());
|
||||
}
|
||||
|
||||
}
|
@ -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<DesCollectMapper, DesCollect> 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<DesCollectVo> queryPageList(DesCollectBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesCollect> lqw = buildQueryWrapper(bo);
|
||||
Page<DesCollectVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的收资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 收资清单列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesCollectVo> queryList(DesCollectBo bo) {
|
||||
LambdaQueryWrapper<DesCollect> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesCollect> buildQueryWrapper(DesCollectBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesCollect> 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<Long> 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<DesCollect>()
|
||||
.eq(DesCollect::getProjectId, projectId)
|
||||
.last("limit 1"));
|
||||
|
||||
if (desCollectVo != null) {
|
||||
DesCollectCatalogueBo desCollectCatalogueBo = new DesCollectCatalogueBo();
|
||||
desCollectCatalogueBo.setCollectId(desCollectVo.getId());
|
||||
List<DesCollectCatalogueVo> 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<DesCollectCatalogue> itemList = collectCatalogueService.list(Wrappers.
|
||||
<DesCollectCatalogue>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<DesCollectCatalogue> 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<DesCollectCatalogueWordDto> 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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -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<DesExtractCatalogueMapper, DesExtractCatalogue>
|
||||
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<DesExtractCatalogueVo> queryPageList(DesExtractCatalogueBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesExtractCatalogue> lqw = buildQueryWrapper(bo);
|
||||
Page<DesExtractCatalogueVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的提资清单目录列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 提资清单目录列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesExtractCatalogueVo> queryList(DesExtractCatalogueBo bo) {
|
||||
LambdaQueryWrapper<DesExtractCatalogue> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesExtractCatalogue> buildQueryWrapper(DesExtractCatalogueBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesExtractCatalogue> 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<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -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<DesExtractMapper, DesExtract> 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<DesExtractCatalogueVo> desExtractCatalogueVos = extractCatalogueService.queryList(desExtractCatalogueBo);
|
||||
desExtractVo.setCatalogueList(desExtractCatalogueVos);
|
||||
return desExtractVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询提资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 提资清单分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<DesExtractVo> queryPageList(DesExtractBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesExtract> lqw = buildQueryWrapper(bo);
|
||||
Page<DesExtractVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的提资清单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 提资清单列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesExtractVo> queryList(DesExtractBo bo) {
|
||||
LambdaQueryWrapper<DesExtract> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesExtract> buildQueryWrapper(DesExtractBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesExtract> 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<Long> 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.<DesExtractCatalogue>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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -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<DesPrelimSchemeMapper, DesPrelimScheme> 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<DesPrelimSchemeVo> queryPageList(DesPrelimSchemeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesPrelimScheme> lqw = buildQueryWrapper(bo);
|
||||
Page<DesPrelimSchemeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计初步方案列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesPrelimSchemeVo> queryList(DesPrelimSchemeBo bo) {
|
||||
LambdaQueryWrapper<DesPrelimScheme> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesPrelimScheme> buildQueryWrapper(DesPrelimSchemeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesPrelimScheme> 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<Long> 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());
|
||||
}
|
||||
}
|
@ -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<DesSchemeMapper, DesScheme> 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<DesSchemeVo> queryPageList(DesSchemeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesScheme> lqw = buildQueryWrapper(bo);
|
||||
Page<DesSchemeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计初步方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计初步方案列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesSchemeVo> queryList(DesSchemeBo bo) {
|
||||
LambdaQueryWrapper<DesScheme> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesScheme> buildQueryWrapper(DesSchemeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesScheme> 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<Long> 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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -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<DesSubcontractMapper, DesSubcontract> 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<DesSubcontractVo> queryPageList(DesSubcontractBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesSubcontract> lqw = buildQueryWrapper(bo);
|
||||
Page<DesSubcontractVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计分包列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计分包列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesSubcontractVo> queryList(DesSubcontractBo bo) {
|
||||
LambdaQueryWrapper<DesSubcontract> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesSubcontract> buildQueryWrapper(DesSubcontractBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesSubcontract> 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<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -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<DesUserMapper, DesUser> 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<DesUserVo> queryPageList(DesUserBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DesUser> lqw = buildQueryWrapper(bo);
|
||||
Page<DesUserVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设计人员列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设计人员列表
|
||||
*/
|
||||
@Override
|
||||
public List<DesUserVo> queryList(DesUserBo bo) {
|
||||
LambdaQueryWrapper<DesUser> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DesUser> buildQueryWrapper(DesUserBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DesUser> 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<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchAddOrUpdate(DesUserBatchDto dto) {
|
||||
baseMapper.delete(Wrappers.<DesUser>lambdaQuery().eq(DesUser::getProjectId, dto.getProjectId()));
|
||||
List<DesUser> desUsers = MapstructUtils.convert(dto.getList(), DesUser.class);
|
||||
//todo:发消息
|
||||
return baseMapper.insertBatch(desUsers);
|
||||
}
|
||||
}
|
@ -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 到对象存储服务,不保存文件信息到数据库
|
||||
*
|
||||
|
@ -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 到对象存储服务,不保存文件信息到数据库
|
||||
*
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesCollectCatalogueMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="design.mapper.DesCollectFileMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesCollectMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesExtractCatalogueMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesPrelimSchemeMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesSchemeMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesSubcontractMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.design.mapper.DesUserMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="项目id" prop="projectId">
|
||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计人员id" prop="userId">
|
||||
<el-input v-model="queryParams.userId" placeholder="请输入设计人员id" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计人员姓名" prop="userName">
|
||||
<el-input v-model="queryParams.userName" placeholder="请输入设计人员姓名" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人员专业(des_user_major)" prop="userMajor">
|
||||
<el-input v-model="queryParams.userMajor" placeholder="请输入人员专业(des_user_major)" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input v-model="queryParams.phone" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户邮箱" prop="email">
|
||||
<el-input v-model="queryParams.email" placeholder="请输入用户邮箱" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:extract:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['design:extract:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['design:extract:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['design:extract:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="extractList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="项目id" align="center" prop="projectId" />
|
||||
<el-table-column label="设计人员id" align="center" prop="userId" />
|
||||
<el-table-column label="设计人员姓名" align="center" prop="userName" />
|
||||
<el-table-column label="人员专业(des_user_major)" align="center" prop="userMajor" />
|
||||
<el-table-column label="手机号码" align="center" prop="phone" />
|
||||
<el-table-column label="用户邮箱" align="center" prop="email" />
|
||||
<el-table-column label="审核状态" align="center" prop="status" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:extract:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['design:extract:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改提资清单对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="extractFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目id" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计人员id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入设计人员id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计人员姓名" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入设计人员姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人员专业(des_user_major)" prop="userMajor">
|
||||
<el-input v-model="form.userMajor" placeholder="请输入人员专业(des_user_major)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入手机号码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入用户邮箱" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Extract" lang="ts">
|
||||
import { listExtract, getExtract, delExtract, addExtract, updateExtract } from '@/api/design/extract';
|
||||
import { ExtractVO, ExtractQuery, ExtractForm } from '@/api/design/extract/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const extractList = ref<ExtractVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const extractFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: ExtractForm = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
userId: undefined,
|
||||
userName: undefined,
|
||||
userMajor: undefined,
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: undefined,
|
||||
}
|
||||
const data = reactive<PageData<ExtractForm, ExtractQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
userId: undefined,
|
||||
userName: undefined,
|
||||
userMajor: undefined,
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: undefined,
|
||||
params: {
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
projectId: [
|
||||
{ required: true, message: "项目id不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "设计人员id不能为空", trigger: "blur" }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: "设计人员姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
userMajor: [
|
||||
{ required: true, message: "人员专业(des_user_major)不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询提资清单列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listExtract(queryParams.value);
|
||||
extractList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {...initFormData};
|
||||
extractFormRef.value?.resetFields();
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: ExtractVO[]) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加提资清单";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: ExtractVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0]
|
||||
const res = await getExtract(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改提资清单";
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
extractFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateExtract(form.value).finally(() => buttonLoading.value = false);
|
||||
} else {
|
||||
await addExtract(form.value).finally(() => buttonLoading.value = false);
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: ExtractVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除提资清单编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
||||
await delExtract(_ids);
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
await getList();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download('design/extract/export', {
|
||||
...queryParams.value
|
||||
}, `extract_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user