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