app,角色,菜单
This commit is contained in:
@ -333,12 +333,13 @@ sse:
|
|||||||
copy: /task/taskCopyList
|
copy: /task/taskCopyList
|
||||||
project: /personnel-management/project
|
project: /personnel-management/project
|
||||||
violationRecord: /safety-management/ai/violationRecord
|
violationRecord: /safety-management/ai/violationRecord
|
||||||
|
drawing: /design-management/volumeCatalog
|
||||||
|
|
||||||
|
|
||||||
--- # websocket
|
--- # websocket
|
||||||
websocket:
|
websocket:
|
||||||
# 如果关闭 需要和前端开关一起关闭
|
# 如果关闭 需要和前端开关一起关闭
|
||||||
enabled: false
|
enabled: true
|
||||||
# 路径
|
# 路径
|
||||||
path: /resource/websocket
|
path: /resource/websocket
|
||||||
# 设置访问源地址
|
# 设置访问源地址
|
||||||
|
@ -27,6 +27,8 @@ public class SseProperties {
|
|||||||
|
|
||||||
private String violationRecord;
|
private String violationRecord;
|
||||||
|
|
||||||
|
private String drawing;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,16 @@ import org.dromara.design.domain.dto.ExcelData;
|
|||||||
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq;
|
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogCreateReq;
|
||||||
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq;
|
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogQueryReq;
|
||||||
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq;
|
import org.dromara.design.domain.dto.volumecatalog.DesVolumeCatalogUpdateReq;
|
||||||
|
import org.dromara.design.domain.vo.CopyUserVo;
|
||||||
import org.dromara.design.domain.vo.DesUserVo;
|
import org.dromara.design.domain.vo.DesUserVo;
|
||||||
import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo;
|
import org.dromara.design.domain.vo.volumecatalog.DesVolumeCatalogVo;
|
||||||
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
import org.dromara.design.domain.vo.volumefile.DesVolumeFileVo;
|
||||||
import org.dromara.design.service.IDesUserService;
|
import org.dromara.design.service.IDesUserService;
|
||||||
import org.dromara.design.service.IDesVolumeCatalogService;
|
import org.dromara.design.service.IDesVolumeCatalogService;
|
||||||
import org.dromara.design.service.IDesVolumeFileService;
|
import org.dromara.design.service.IDesVolumeFileService;
|
||||||
|
import org.dromara.system.domain.bo.SysUserBo;
|
||||||
|
import org.dromara.system.domain.vo.SysUserExportVo;
|
||||||
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -66,6 +70,8 @@ public class DesVolumeCatalogController extends BaseController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IDesUserService desUserService;
|
private IDesUserService desUserService;
|
||||||
|
@Resource
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -172,6 +178,21 @@ public class DesVolumeCatalogController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询抄送人员列表
|
||||||
|
*/
|
||||||
|
// @SaCheckPermission("design:volumeCatalog:copyUserList")
|
||||||
|
@GetMapping("/copyUserList")
|
||||||
|
public R<List<CopyUserVo>> copyUserList() {
|
||||||
|
|
||||||
|
SysUserBo sysUserBo = new SysUserBo();
|
||||||
|
sysUserBo.setExcludeUserIds("1");
|
||||||
|
|
||||||
|
List<SysUserExportVo> sysUserExportVos = sysUserService.selectUserExportList(sysUserBo);
|
||||||
|
List<CopyUserVo> copyUserVos = BeanUtil.copyToList(sysUserExportVos, CopyUserVo.class);
|
||||||
|
return R.ok(copyUserVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设计人员列表
|
* 查询设计人员列表
|
||||||
|
@ -32,7 +32,7 @@ public class DesVolumeFileCreateReq implements Serializable {
|
|||||||
private List<Long> cancellationIds;
|
private List<Long> cancellationIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查阅人id列表
|
* 抄送人id列表
|
||||||
*/
|
*/
|
||||||
private List<Long> userIds;
|
private List<Long> userIds;
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.dromara.design.domain.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CopyUserVo {
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
private String phonenumber;
|
||||||
|
}
|
@ -90,7 +90,7 @@ public interface IDesVolumeFileService extends IService<DesVolumeFile> {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取卷册文件详细信息
|
* 二维码获取卷册文件详细信息
|
||||||
*/
|
*/
|
||||||
DesVolumeFileCodeVo getCodeInfo(Long id);
|
DesVolumeFileCodeVo getCodeInfo(Long id);
|
||||||
}
|
}
|
||||||
|
@ -655,7 +655,10 @@ public class DesDesignChangeServiceImpl extends ServiceImpl<DesDesignChangeMappe
|
|||||||
.eq(DesVolumeFile::getType, DesVolumeFile.BLUEPRINT)
|
.eq(DesVolumeFile::getType, DesVolumeFile.BLUEPRINT)
|
||||||
.orderByDesc(DesVolumeFile::getVersion)
|
.orderByDesc(DesVolumeFile::getVersion)
|
||||||
);
|
);
|
||||||
String version = !list.isEmpty() ? String.valueOf(Integer.valueOf(list.getFirst().getVersion())+1) : "0";
|
|
||||||
|
String lastVersion = list.getFirst().getVersion();
|
||||||
|
int majorVersion = (int) Math.floor(Double.parseDouble(lastVersion)) + 1;
|
||||||
|
String version = majorVersion + ".0";
|
||||||
|
|
||||||
for (SysOssVo ossVo : ossVoList1) {
|
for (SysOssVo ossVo : ossVoList1) {
|
||||||
DesVolumeFile desVolumeFile = new DesVolumeFile();
|
DesVolumeFile desVolumeFile = new DesVolumeFile();
|
||||||
|
@ -3,6 +3,7 @@ package org.dromara.design.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -11,6 +12,7 @@ import io.micrometer.common.util.StringUtils;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
import org.dromara.common.core.domain.dto.UserDTO;
|
||||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
@ -18,6 +20,10 @@ import org.dromara.common.core.enums.BusinessStatusEnum;
|
|||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
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.common.sse.config.SseProperties;
|
||||||
|
import org.dromara.common.sse.dto.SeeMessageContentDto;
|
||||||
|
import org.dromara.common.sse.dto.SseMessageDto;
|
||||||
|
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||||
import org.dromara.design.domain.DesVolumeCatalog;
|
import org.dromara.design.domain.DesVolumeCatalog;
|
||||||
import org.dromara.design.domain.DesVolumeFile;
|
import org.dromara.design.domain.DesVolumeFile;
|
||||||
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
import org.dromara.design.domain.bo.DesVolumeFileBo;
|
||||||
@ -42,6 +48,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卷册文件Service业务层处理
|
* 卷册文件Service业务层处理
|
||||||
@ -72,7 +79,8 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusDrawingreviewReceiptsService busDrawingreviewReceiptsService;
|
private IBusDrawingreviewReceiptsService busDrawingreviewReceiptsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SseProperties sseProperties;
|
||||||
/**
|
/**
|
||||||
* 分页查询卷册文件列表
|
* 分页查询卷册文件列表
|
||||||
*
|
*
|
||||||
@ -125,11 +133,11 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
desVolumeFileCodeVo.setProjectName(byId.getProjectName());
|
desVolumeFileCodeVo.setProjectName(byId.getProjectName());
|
||||||
desVolumeFileCodeVo.setType(desVolumeFile.getType());
|
desVolumeFileCodeVo.setType(desVolumeFile.getType());
|
||||||
|
|
||||||
if("3".equals(desVolumeFile.getType())){
|
if(DesVolumeFile.BLUEPRINT.equals(desVolumeFile.getType())){
|
||||||
//查询图纸最新版
|
//查询图纸最新版
|
||||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||||
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
||||||
.eq(DesVolumeFile::getType, "3")
|
.eq(DesVolumeFile::getType, DesVolumeFile.BLUEPRINT)
|
||||||
.orderByDesc(DesVolumeFile::getVersion));
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
|
|
||||||
if(CollectionUtil.isNotEmpty(existingFiles)){
|
if(CollectionUtil.isNotEmpty(existingFiles)){
|
||||||
@ -145,16 +153,16 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
//查询过程图纸最新版
|
//查询过程图纸最新版
|
||||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||||
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
.eq(DesVolumeFile::getVolumeCatalogId, desVolumeFile.getVolumeCatalogId())
|
||||||
.eq(DesVolumeFile::getType, "1")
|
.eq(DesVolumeFile::getType, DesVolumeFile.PROCESS)
|
||||||
.orderByDesc(DesVolumeFile::getVersion));
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
|
|
||||||
if(!existingFiles.isEmpty()){
|
if(!existingFiles.isEmpty()){
|
||||||
DesVolumeFile first = existingFiles.getFirst();
|
DesVolumeFile first = existingFiles.getFirst();
|
||||||
if ("4".equals(desVolumeFile.getType())) {
|
if (DesVolumeFile.WASTE.equals(desVolumeFile.getType())) {
|
||||||
SysOssVo ossVo = ossService.getById(first.getFileId());
|
SysOssVo ossVo = ossService.getById(first.getFileId());
|
||||||
desVolumeFileCodeVo.setFileUrl(ossVo.getUrl());
|
desVolumeFileCodeVo.setFileUrl(ossVo.getUrl());
|
||||||
}
|
}
|
||||||
if ("1".equals(desVolumeFile.getType())) {
|
if (DesVolumeFile.PROCESS.equals(desVolumeFile.getType())) {
|
||||||
|
|
||||||
if (!first.getId().equals(id)) {
|
if (!first.getId().equals(id)) {
|
||||||
desVolumeFileCodeVo.setIsLatest(false);
|
desVolumeFileCodeVo.setIsLatest(false);
|
||||||
@ -231,6 +239,19 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
throw new ServiceException("新增卷册文件信息异常", HttpStatus.ERROR);
|
throw new ServiceException("新增卷册文件信息异常", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
busDrawingreviewReceiptsService.createReceipts(volumeCatalog, desVolumeFiles);
|
busDrawingreviewReceiptsService.createReceipts(volumeCatalog, desVolumeFiles);
|
||||||
|
|
||||||
|
|
||||||
|
//抄送信息
|
||||||
|
if(CollectionUtil.isNotEmpty(req.getUserIds())){
|
||||||
|
SseMessageDto dto = new SseMessageDto();
|
||||||
|
SeeMessageContentDto contentDto = new SeeMessageContentDto();
|
||||||
|
contentDto.setType(sseProperties.getDrawing());
|
||||||
|
contentDto.setContent("<"+volumeCatalog.getDocumentName()+">"+"的蓝图已上传");
|
||||||
|
dto.setMessage(JSONUtil.toJsonStr(contentDto));
|
||||||
|
dto.setUserIds(req.getUserIds());
|
||||||
|
SseMessageUtils.publishMessage(dto);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +260,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
if (CollectionUtil.isNotEmpty(req.getFileIds())) {
|
if (CollectionUtil.isNotEmpty(req.getFileIds())) {
|
||||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||||
.eq(DesVolumeFile::getVolumeCatalogId, req.getVolumeCatalogId())
|
.eq(DesVolumeFile::getVolumeCatalogId, req.getVolumeCatalogId())
|
||||||
.eq(DesVolumeFile::getType, "3")
|
.eq(DesVolumeFile::getType, DesVolumeFile.BLUEPRINT)
|
||||||
.orderByDesc(DesVolumeFile::getVersion));
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
if (!existingFiles.isEmpty()) {
|
if (!existingFiles.isEmpty()) {
|
||||||
throw new ServiceException("蓝图已上传");
|
throw new ServiceException("蓝图已上传");
|
||||||
@ -249,7 +270,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
if (CollectionUtil.isNotEmpty(req.getCancellationIds())) {
|
if (CollectionUtil.isNotEmpty(req.getCancellationIds())) {
|
||||||
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
List<DesVolumeFile> existingFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||||
.eq(DesVolumeFile::getVolumeCatalogId, req.getVolumeCatalogId())
|
.eq(DesVolumeFile::getVolumeCatalogId, req.getVolumeCatalogId())
|
||||||
.eq(DesVolumeFile::getType, "1")
|
.eq(DesVolumeFile::getType, DesVolumeFile.PROCESS)
|
||||||
.orderByDesc(DesVolumeFile::getVersion));
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
if (!existingFiles.isEmpty()) {
|
if (!existingFiles.isEmpty()) {
|
||||||
DesVolumeFile first = existingFiles.getFirst();
|
DesVolumeFile first = existingFiles.getFirst();
|
||||||
@ -272,7 +293,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
*/
|
*/
|
||||||
private void processFiles(DesVolumeFileCreateReq req, List<Long> fileIds, String type, List<DesVolumeFile> desVolumeFiles) {
|
private void processFiles(DesVolumeFileCreateReq req, List<Long> fileIds, String type, List<DesVolumeFile> desVolumeFiles) {
|
||||||
// 用于记录同一批次中已处理的文件名及对应的版本号
|
// 用于记录同一批次中已处理的文件名及对应的版本号
|
||||||
Map<String, Integer> batchFileVersionMap = new HashMap<>();
|
Map<String, String> batchFileVersionMap = new HashMap<>();
|
||||||
|
|
||||||
for (Long fileId : fileIds) {
|
for (Long fileId : fileIds) {
|
||||||
SysOssVo ossVo = ossService.getById(fileId);
|
SysOssVo ossVo = ossService.getById(fileId);
|
||||||
@ -292,21 +313,82 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
.eq(DesVolumeFile::getFileName, fileName)
|
.eq(DesVolumeFile::getFileName, fileName)
|
||||||
.orderByDesc(DesVolumeFile::getVersion));
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
|
|
||||||
int version = 0;
|
String versionStr = "1.0"; // 默认版本号
|
||||||
if (CollectionUtil.isNotEmpty(existingFiles)) {
|
|
||||||
version = Integer.parseInt(existingFiles.getFirst().getVersion()) + 1;
|
if (DesVolumeFile.BLUEPRINT.equals(type)) {
|
||||||
|
// 蓝图文件:1.0, 2.0, 3.0...
|
||||||
|
if (CollectionUtil.isNotEmpty(existingFiles)) {
|
||||||
|
String lastVersion = existingFiles.getFirst().getVersion();
|
||||||
|
int majorVersion = (int) Math.floor(Double.parseDouble(lastVersion)) + 1;
|
||||||
|
versionStr = majorVersion + ".0";
|
||||||
|
}
|
||||||
|
} else if (DesVolumeFile.PROCESS.equals(type)) {
|
||||||
|
// 过程图纸:基于蓝图版本号,如蓝图是1.0,则过程图为1.1, 1.2...1.9, 1.10
|
||||||
|
// 先查找对应的蓝图文件最新版本
|
||||||
|
List<DesVolumeFile> blueprintFiles = baseMapper.selectList(new LambdaQueryWrapper<DesVolumeFile>()
|
||||||
|
.eq(DesVolumeFile::getType, DesVolumeFile.BLUEPRINT) // 蓝图类型
|
||||||
|
// .eq(DesVolumeFile::getFileName, fileName)
|
||||||
|
.orderByDesc(DesVolumeFile::getVersion));
|
||||||
|
|
||||||
|
String blueprintVersion = "1.0"; // 默认蓝图版本
|
||||||
|
if (CollectionUtil.isNotEmpty(blueprintFiles)) {
|
||||||
|
blueprintVersion = blueprintFiles.getFirst().getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析蓝图版本号
|
||||||
|
String[] blueprintParts = blueprintVersion.split("\\.");
|
||||||
|
int blueprintMajor = Integer.parseInt(blueprintParts[0]);
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(existingFiles)) {
|
||||||
|
// 已存在过程图纸,需要递增次版本号
|
||||||
|
String lastVersion = existingFiles.getFirst().getVersion();
|
||||||
|
String[] parts = lastVersion.split("\\.");
|
||||||
|
int major = Integer.parseInt(parts[0]);
|
||||||
|
int minor = Integer.parseInt(parts[1]);
|
||||||
|
|
||||||
|
if (major == blueprintMajor) {
|
||||||
|
// 同一主版本,次版本号递增
|
||||||
|
minor++;
|
||||||
|
versionStr = major + "." + minor;
|
||||||
|
} else {
|
||||||
|
// 不同主版本,使用蓝图的主版本并从1开始
|
||||||
|
versionStr = blueprintMajor + ".1";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 不存在过程图纸,从蓝图版本的.1开始
|
||||||
|
versionStr = blueprintMajor + ".1";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查同一批次中是否已存在同名文件
|
// 检查同一批次中是否已存在同名文件
|
||||||
if (batchFileVersionMap.containsKey(fileName)) {
|
if (batchFileVersionMap.containsKey(fileName)) {
|
||||||
// 如果存在,则在原有版本号基础上+1
|
String lastBatchVersion = String.valueOf(batchFileVersionMap.get(fileName));
|
||||||
version = Math.max(version, batchFileVersionMap.get(fileName) + 1);
|
if ( DesVolumeFile.BLUEPRINT.equals(type)) {
|
||||||
|
// 蓝图文件批次处理
|
||||||
|
int lastMajor = (int) Math.floor(Double.parseDouble(lastBatchVersion));
|
||||||
|
versionStr = (lastMajor + 1) + ".0";
|
||||||
|
} else if (DesVolumeFile.PROCESS.equals(type)) {
|
||||||
|
// 过程图纸批次处理
|
||||||
|
String[] currentParts = versionStr.split("\\.");
|
||||||
|
String[] batchParts = lastBatchVersion.split("\\.");
|
||||||
|
|
||||||
|
int currentMajor = Integer.parseInt(currentParts[0]);
|
||||||
|
int currentMinor = Integer.parseInt(currentParts[1]);
|
||||||
|
int batchMajor = Integer.parseInt(batchParts[0]);
|
||||||
|
int batchMinor = Integer.parseInt(batchParts[1]);
|
||||||
|
|
||||||
|
if (currentMajor == batchMajor) {
|
||||||
|
// 同一主版本,取较大的次版本号+1
|
||||||
|
int newMinor = Math.max(currentMinor, batchMinor) + 1;
|
||||||
|
versionStr = currentMajor + "." + newMinor;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新批次文件版本映射
|
// 更新批次文件版本映射(存储为字符串形式)
|
||||||
batchFileVersionMap.put(fileName, version);
|
batchFileVersionMap.put(fileName, versionStr);
|
||||||
|
|
||||||
file.setVersion(String.valueOf(version));
|
file.setVersion(versionStr);
|
||||||
file.setFileName(fileName);
|
file.setFileName(fileName);
|
||||||
desVolumeFiles.add(file);
|
desVolumeFiles.add(file);
|
||||||
}
|
}
|
||||||
@ -341,7 +423,7 @@ public class DesVolumeFileServiceImpl extends ServiceImpl<DesVolumeFileMapper, D
|
|||||||
// 关联文件信息
|
// 关联文件信息
|
||||||
Long fileId = volumeFile.getFileId();
|
Long fileId = volumeFile.getFileId();
|
||||||
SysOssVo ossVo = ossService.getById(fileId);
|
SysOssVo ossVo = ossService.getById(fileId);
|
||||||
if (ossVo != null){
|
if(ossVo != null){
|
||||||
vo.setFileUrl(ossVo.getUrl());
|
vo.setFileUrl(ossVo.getUrl());
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
|
@ -102,4 +102,17 @@ public class BusAttendanceRuleController extends BaseController {
|
|||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(busAttendanceRuleService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(busAttendanceRuleService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取考勤打卡规则详细信息
|
||||||
|
*
|
||||||
|
* @param projectId 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("project:attendanceRule:query")
|
||||||
|
@GetMapping("/byProjectId/{projectId}")
|
||||||
|
public R<BusAttendanceRuleVo> getInfoByProjectId(@NotNull(message = "项目Id不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(busAttendanceRuleService.queryByProjectId(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 考勤app
|
* app考勤
|
||||||
*
|
*
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-07-24 11:53
|
* @date 2025-07-24 11:53
|
||||||
|
@ -18,8 +18,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工人员请假申请 app 接口
|
* app请假
|
||||||
*
|
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-07-24 14:51
|
* @date 2025-07-24 14:51
|
||||||
*/
|
*/
|
||||||
|
@ -18,8 +18,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工人员补卡申请 app 接口
|
* app补卡
|
||||||
*
|
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-07-24 14:51
|
* @date 2025-07-24 14:51
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.project.service;
|
package org.dromara.project.service;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.dromara.project.domain.vo.BusAttendanceRuleVo;
|
import org.dromara.project.domain.vo.BusAttendanceRuleVo;
|
||||||
import org.dromara.project.domain.bo.BusAttendanceRuleBo;
|
import org.dromara.project.domain.bo.BusAttendanceRuleBo;
|
||||||
import org.dromara.project.domain.BusAttendanceRule;
|
import org.dromara.project.domain.BusAttendanceRule;
|
||||||
@ -7,6 +8,8 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -72,4 +75,5 @@ public interface IBusAttendanceRuleService extends IService<BusAttendanceRule>{
|
|||||||
* 根据项目id查询
|
* 根据项目id查询
|
||||||
*/
|
*/
|
||||||
BusAttendanceRuleVo queryByProjectId(Long projectId);
|
BusAttendanceRuleVo queryByProjectId(Long projectId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -169,8 +169,7 @@ public class BusAttendanceRuleServiceImpl extends ServiceImpl<BusAttendanceRuleM
|
|||||||
entity.setClockInResultTime(midTime);
|
entity.setClockInResultTime(midTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (entity.getClockOutEndTime() != null) {
|
||||||
if (entity.getClockOutTime() != null) {
|
|
||||||
entity.setClockOutResultTime(entity.getClockOutEndTime());
|
entity.setClockOutResultTime(entity.getClockOutEndTime());
|
||||||
} else {
|
} else {
|
||||||
// 计算下班时间和第二天上班时间的中间时间
|
// 计算下班时间和第二天上班时间的中间时间
|
||||||
@ -193,6 +192,8 @@ public class BusAttendanceRuleServiceImpl extends ServiceImpl<BusAttendanceRuleM
|
|||||||
entity.setClockOutResultTime(midTime);
|
entity.setClockOutResultTime(midTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,119 @@
|
|||||||
|
package org.dromara.quality.controller.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.quality.domain.dto.qualityconstructionlog.QltQualityConstructionLogCreateReq;
|
||||||
|
import org.dromara.quality.domain.dto.qualityconstructionlog.QltQualityConstructionLogQueryReq;
|
||||||
|
import org.dromara.quality.domain.dto.qualityconstructionlog.QltQualityConstructionLogUpdateReq;
|
||||||
|
import org.dromara.quality.domain.vo.qualityconstructionlog.QltQualityConstructionLogVo;
|
||||||
|
import org.dromara.quality.service.IQltQualityConstructionLogService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量-APP施工日志
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-04-16
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/quality/qualityConstructionLog")
|
||||||
|
public class QltQualityConstructionLogAppController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQltQualityConstructionLogService qualityConstructionLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量-施工日志列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<QltQualityConstructionLogVo> list(QltQualityConstructionLogQueryReq req, PageQuery pageQuery) {
|
||||||
|
return qualityConstructionLogService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出质量-施工日志列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:export")
|
||||||
|
@Log(title = "质量-施工日志", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(QltQualityConstructionLogQueryReq req, HttpServletResponse response) {
|
||||||
|
List<QltQualityConstructionLogVo> list = qualityConstructionLogService.queryList(req);
|
||||||
|
ExcelUtil.exportExcel(list, "质量-施工日志", QltQualityConstructionLogVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键导出质量-施工日志
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:exportWord")
|
||||||
|
@Log(title = "质量-施工日志", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export/word")
|
||||||
|
public void exportWordById(@NotNull(message = "主键不能为空") Long id,
|
||||||
|
HttpServletResponse response) {
|
||||||
|
qualityConstructionLogService.exportWordById(id, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取质量-施工日志详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<QltQualityConstructionLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(qualityConstructionLogService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增质量-施工日志
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:add")
|
||||||
|
@Log(title = "质量-施工日志", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Long> add(@Validated(AddGroup.class) @RequestBody QltQualityConstructionLogCreateReq req) {
|
||||||
|
return R.ok(qualityConstructionLogService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改质量-施工日志
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:edit")
|
||||||
|
@Log(title = "质量-施工日志", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QltQualityConstructionLogUpdateReq req) {
|
||||||
|
return toAjax(qualityConstructionLogService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质量-施工日志
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityConstructionLog:remove")
|
||||||
|
@Log(title = "质量-施工日志", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(qualityConstructionLogService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package org.dromara.quality.controller.app;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||||
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
|
||||||
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
||||||
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
||||||
|
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
||||||
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
||||||
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
|
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质量-APP检查工单
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-04-16
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/quality/qualityInspection")
|
||||||
|
public class QltQualityInspectionAppController extends BaseController {
|
||||||
|
|
||||||
|
private final IQltQualityInspectionService qualityInspectionService;
|
||||||
|
|
||||||
|
private final IBusProjectTeamService busProjectTeamService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询质量-检查工单列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<QltQualityInspectionVo> list(QltQualityInspectionQueryReq req, PageQuery pageQuery) {
|
||||||
|
return qualityInspectionService.queryPageList(req, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取质量-检查工单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("quality:qualityInspection:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<QltQualityInspectionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(qualityInspectionService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增质量-检查工单
|
||||||
|
*/
|
||||||
|
@Log(title = "质量-检查工单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Long> add(@Validated @RequestBody QltQualityInspectionCreateReq req) {
|
||||||
|
return R.ok(qualityInspectionService.insertByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改质量-检查工单
|
||||||
|
*/
|
||||||
|
@Log(title = "质量-检查工单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated @RequestBody QltQualityInspectionUpdateReq req) {
|
||||||
|
return toAjax(qualityInspectionService.updateByBo(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除质量-检查工单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@Log(title = "质量-检查工单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(qualityInspectionService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人选择列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/listForeman/{projectId}")
|
||||||
|
public R<List<BusProjectTeamForemanVo>> listForeman(@NotNull(message = "项目id不能为空")
|
||||||
|
@PathVariable Long projectId) {
|
||||||
|
return R.ok(busProjectTeamService.queryForemanListByProjectId(projectId));
|
||||||
|
}
|
||||||
|
}
|
@ -59,6 +59,11 @@ public class QltQualityInspection extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String inspectionFile;
|
private String inspectionFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件
|
||||||
|
*/
|
||||||
|
private String inspectionImgFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改单位(1分包 2班组)
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
@ -99,6 +104,11 @@ public class QltQualityInspection extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String rectificationFile;
|
private String rectificationFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改图片附件
|
||||||
|
*/
|
||||||
|
private String rectificationImgFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证结果
|
* 验证结果
|
||||||
*/
|
*/
|
||||||
|
@ -51,6 +51,12 @@ public class QltQualityInspectionCreateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String inspectionFile;
|
private String inspectionFile;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件
|
||||||
|
*/
|
||||||
|
private String inspectionImgFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改单位(1分包 2班组)
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
|
@ -40,4 +40,12 @@ public class QltQualityInspectionQueryReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long rectificationId;
|
private Long rectificationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改人
|
||||||
|
*/
|
||||||
|
private Long correctorId;
|
||||||
|
|
||||||
|
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,12 @@ public class QltQualityInspectionUpdateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String inspectionFile;
|
private String inspectionFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件
|
||||||
|
*/
|
||||||
|
private String inspectionImgFile;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班组id
|
* 班组id
|
||||||
*/
|
*/
|
||||||
@ -86,6 +92,11 @@ public class QltQualityInspectionUpdateReq implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String rectificationFile;
|
private String rectificationFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改图片附件
|
||||||
|
*/
|
||||||
|
private String rectificationImgFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证结果
|
* 验证结果
|
||||||
*/
|
*/
|
||||||
|
@ -6,6 +6,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.quality.domain.QltQualityInspection;
|
import org.dromara.quality.domain.QltQualityInspection;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
|
|
||||||
@ -46,6 +48,10 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
@ExcelDictFormat(dictType = "quality_inspection_check_type")
|
@ExcelDictFormat(dictType = "quality_inspection_check_type")
|
||||||
private String inspectionType;
|
private String inspectionType;
|
||||||
|
|
||||||
|
|
||||||
|
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "inspectionType",other = "quality_inspection_check_type")
|
||||||
|
private String inspectionTypeName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡检标题
|
* 巡检标题
|
||||||
*/
|
*/
|
||||||
@ -75,6 +81,16 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<SysOssVo> inspectionFileList;
|
private List<SysOssVo> inspectionFileList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件
|
||||||
|
*/
|
||||||
|
private String inspectionImgFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件列表
|
||||||
|
*/
|
||||||
|
private List<SysOssVo> inspectionImgFileList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 整改单位(1分包 2班组)
|
* 整改单位(1分包 2班组)
|
||||||
*/
|
*/
|
||||||
@ -125,6 +141,16 @@ public class QltQualityInspectionVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<SysOssVo> rectificationFileList;
|
private List<SysOssVo> rectificationFileList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改图片附件
|
||||||
|
*/
|
||||||
|
private String rectificationImgFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改图片附件列表
|
||||||
|
*/
|
||||||
|
private List<SysOssVo> rectificationImgFileList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证结果
|
* 验证结果
|
||||||
*/
|
*/
|
||||||
|
@ -318,11 +318,14 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
String rectificationUnit = req.getRectificationUnit();
|
String rectificationUnit = req.getRectificationUnit();
|
||||||
Long rectificationId = req.getRectificationId();
|
Long rectificationId = req.getRectificationId();
|
||||||
// 精确查询
|
// 精确查询
|
||||||
|
lqw.orderByDesc(QltQualityInspection::getCreateTime);
|
||||||
lqw.eq(StringUtils.isNotBlank(inspectionType), QltQualityInspection::getInspectionType, inspectionType);
|
lqw.eq(StringUtils.isNotBlank(inspectionType), QltQualityInspection::getInspectionType, inspectionType);
|
||||||
lqw.eq(StringUtils.isNotBlank(inspectionStatus), QltQualityInspection::getInspectionStatus, inspectionStatus);
|
lqw.eq(StringUtils.isNotBlank(inspectionStatus), QltQualityInspection::getInspectionStatus, inspectionStatus);
|
||||||
lqw.eq(StringUtils.isNotBlank(rectificationUnit), QltQualityInspection::getRectificationUnit, rectificationUnit);
|
lqw.eq(StringUtils.isNotBlank(rectificationUnit), QltQualityInspection::getRectificationUnit, rectificationUnit);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(projectId), QltQualityInspection::getProjectId, projectId);
|
lqw.eq(ObjectUtils.isNotEmpty(projectId), QltQualityInspection::getProjectId, projectId);
|
||||||
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), QltQualityInspection::getRectificationId, rectificationId);
|
lqw.eq(ObjectUtils.isNotEmpty(rectificationId), QltQualityInspection::getRectificationId, rectificationId);
|
||||||
|
lqw.eq(req.getCorrectorId() != null, QltQualityInspection::getCorrectorId, req.getCorrectorId());
|
||||||
|
lqw.eq(req.getCreateBy() != null, QltQualityInspection::getCreateBy, req.getCreateBy());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,6 +361,16 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
List<Long> ossRectificationFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getRectificationFile).filter(StringUtils::isNotBlank)
|
List<Long> ossRectificationFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getRectificationFile).filter(StringUtils::isNotBlank)
|
||||||
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
||||||
ossIdList.addAll(ossRectificationFileIdList);
|
ossIdList.addAll(ossRectificationFileIdList);
|
||||||
|
|
||||||
|
List<Long> ossRectificationImgFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getRectificationImgFile).filter(StringUtils::isNotBlank)
|
||||||
|
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
||||||
|
|
||||||
|
ossIdList.addAll(ossRectificationImgFileIdList);
|
||||||
|
|
||||||
|
List<Long> ossInspectionImgFileIdList = qualityInspectionList.stream().map(QltQualityInspection::getInspectionImgFile).filter(StringUtils::isNotBlank)
|
||||||
|
.flatMap(fileId -> Arrays.stream(fileId.split(",")).map(Long::parseLong)).distinct().toList();
|
||||||
|
ossIdList.addAll(ossInspectionImgFileIdList);
|
||||||
|
|
||||||
Map<Long, List<SysOssVo>> ossMap = ossService.listByIds(ossIdList)
|
Map<Long, List<SysOssVo>> ossMap = ossService.listByIds(ossIdList)
|
||||||
.stream().collect(Collectors.groupingBy(SysOssVo::getOssId));
|
.stream().collect(Collectors.groupingBy(SysOssVo::getOssId));
|
||||||
// 对象列表 => 封装对象列表
|
// 对象列表 => 封装对象列表
|
||||||
@ -401,6 +414,31 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
qualityInspectionVo.setRectificationFileList(rectificationFileList);
|
qualityInspectionVo.setRectificationFileList(rectificationFileList);
|
||||||
|
|
||||||
|
String rectificationImgFile = qualityInspection.getRectificationImgFile();
|
||||||
|
List<SysOssVo> rectificationImgFileList = new ArrayList<>();
|
||||||
|
if (StringUtils.isNotBlank(rectificationImgFile)) {
|
||||||
|
List<Long> rectificationImgFileIdList = Arrays.stream(rectificationImgFile.split(",")).map(Long::parseLong).toList();
|
||||||
|
for (Long id : rectificationImgFileIdList) {
|
||||||
|
if (ossMap.containsKey(id)) {
|
||||||
|
rectificationImgFileList.add(ossMap.get(id).getFirst());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qualityInspectionVo.setRectificationImgFileList(rectificationImgFileList);
|
||||||
|
|
||||||
|
String inspectionImgFile = qualityInspection.getInspectionImgFile();
|
||||||
|
List<SysOssVo> inspectionImgFileList = new ArrayList<>();
|
||||||
|
if (StringUtils.isNotBlank(inspectionImgFile)) {
|
||||||
|
List<Long> inspectionImgFileIdList = Arrays.stream(inspectionImgFile.split(",")).map(Long::parseLong).toList();
|
||||||
|
for (Long id : inspectionImgFileIdList) {
|
||||||
|
if (ossMap.containsKey(id)) {
|
||||||
|
inspectionImgFileList.add(ossMap.get(id).getFirst());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qualityInspectionVo.setInspectionImgFileList(inspectionImgFileList);
|
||||||
|
|
||||||
return qualityInspectionVo;
|
return qualityInspectionVo;
|
||||||
}).toList();
|
}).toList();
|
||||||
qualityInspectionVoPage.setRecords(qualityInspectionVoList);
|
qualityInspectionVoPage.setRecords(qualityInspectionVoList);
|
||||||
|
@ -106,6 +106,12 @@ public class SysMenu extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String parentName;
|
private String parentName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型(menu_source) 1-web2-app
|
||||||
|
*/
|
||||||
|
private String menuSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子菜单
|
* 子菜单
|
||||||
*/
|
*/
|
||||||
|
@ -61,6 +61,11 @@ public class SysRole extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private Boolean deptCheckStrictly;
|
private Boolean deptCheckStrictly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色类型 1-web 2-app
|
||||||
|
*/
|
||||||
|
private String roleSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色状态(0正常 1停用)
|
* 角色状态(0正常 1停用)
|
||||||
*/
|
*/
|
||||||
|
@ -107,4 +107,10 @@ public class SysMenuBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型(menu_source) 1-web2-app
|
||||||
|
*/
|
||||||
|
private String menuSource;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -100,5 +100,9 @@ public class SysRoleBo extends BaseEntity {
|
|||||||
public boolean isSuperAdmin() {
|
public boolean isSuperAdmin() {
|
||||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.roleId);
|
return SystemConstants.SUPER_ADMIN_ID.equals(this.roleId);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 角色类型 1-web 2-app
|
||||||
|
*/
|
||||||
|
private String roleSource;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,12 @@ public class SysMenuVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 菜单类型(menu_source) 1-web2-app
|
||||||
|
*/
|
||||||
|
private String menuSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 子菜单
|
* 子菜单
|
||||||
*/
|
*/
|
||||||
|
@ -72,6 +72,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
|
.like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
|
||||||
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
.eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
|
||||||
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
.eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus())
|
||||||
|
.eq(StringUtils.isNotBlank(menu.getMenuSource()),SysMenu::getMenuSource, menu.getMenuSource())
|
||||||
.orderByAsc(SysMenu::getParentId)
|
.orderByAsc(SysMenu::getParentId)
|
||||||
.orderByAsc(SysMenu::getOrderNum));
|
.orderByAsc(SysMenu::getOrderNum));
|
||||||
} else {
|
} else {
|
||||||
@ -80,6 +81,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||||||
.like(StringUtils.isNotBlank(menu.getMenuName()), "m.menu_name", menu.getMenuName())
|
.like(StringUtils.isNotBlank(menu.getMenuName()), "m.menu_name", menu.getMenuName())
|
||||||
.eq(StringUtils.isNotBlank(menu.getVisible()), "m.visible", menu.getVisible())
|
.eq(StringUtils.isNotBlank(menu.getVisible()), "m.visible", menu.getVisible())
|
||||||
.eq(StringUtils.isNotBlank(menu.getStatus()), "m.status", menu.getStatus())
|
.eq(StringUtils.isNotBlank(menu.getStatus()), "m.status", menu.getStatus())
|
||||||
|
.eq(StringUtils.isNotBlank(menu.getMenuSource()),"m.menu_source", menu.getMenuSource())
|
||||||
.orderByAsc("m.parent_id")
|
.orderByAsc("m.parent_id")
|
||||||
.orderByAsc("m.order_num");
|
.orderByAsc("m.order_num");
|
||||||
List<SysMenu> list = baseMapper.selectMenuListByUserId(wrapper);
|
List<SysMenu> list = baseMapper.selectMenuListByUserId(wrapper);
|
||||||
|
@ -83,6 +83,7 @@ public class SysRoleServiceImpl implements ISysRoleService, RoleService {
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
QueryWrapper<SysRole> wrapper = Wrappers.query();
|
QueryWrapper<SysRole> wrapper = Wrappers.query();
|
||||||
wrapper.eq("r.del_flag", SystemConstants.NORMAL)
|
wrapper.eq("r.del_flag", SystemConstants.NORMAL)
|
||||||
|
.eq(StringUtils.isNotBlank(bo.getRoleSource()), "r.role_source", bo.getRoleSource())
|
||||||
.eq(ObjectUtil.isNotNull(bo.getDeptId()), "r.dept_id", bo.getDeptId())
|
.eq(ObjectUtil.isNotNull(bo.getDeptId()), "r.dept_id", bo.getDeptId())
|
||||||
.eq(ObjectUtil.isNotNull(bo.getIsSpecial()), "r.is_special", bo.getIsSpecial())
|
.eq(ObjectUtil.isNotNull(bo.getIsSpecial()), "r.is_special", bo.getIsSpecial())
|
||||||
.eq(ObjectUtil.isNotNull(bo.getRoleId()), "r.role_id", bo.getRoleId())
|
.eq(ObjectUtil.isNotNull(bo.getRoleId()), "r.role_id", bo.getRoleId())
|
||||||
|
Reference in New Issue
Block a user