From ea45679770bdc41e84a66d40f72dd79d87806704 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 03 三月 2025 11:02:26 +0800
Subject: [PATCH] bug
---
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
index 4f24ca5..42058b6 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -7,6 +7,7 @@
import cn.hutool.core.util.ZipUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -153,7 +154,7 @@
* @return
*/
public boolean checkProjectNameAndIdIsUnique(ProjectInfo entity,Long updateId){
- QueryWrapper<ProjectInfo> queryWrapper = new QueryWrapper<ProjectInfo>();
+ LambdaQueryWrapper<ProjectInfo> queryWrapper = new LambdaQueryWrapper<>();
if (updateId == null) {
List<ProjectInfo> list = new LambdaQueryChainWrapper<>(baseMapper)
.eq(ProjectInfo::getProjectName, entity.getProjectName())
@@ -355,8 +356,8 @@
ProjectInfoVO.transform(vo);
ProjectVO projectVO = new ProjectVO();
copyToProjectVO(vo, projectVO);
- List<Long> departmentList = vo.getCompetentDepartmentList();
- projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
+ String competentDepartment = vo.getCompetentDepartment();
+ projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId() + "")));
// 缈昏瘧椤圭洰闃舵
String phase = ProjectCategoryEnum.getPhaseByProjectStatus(projectVO.getProjectPhase());
projectVO.setProjectPhase(phase);
@@ -396,8 +397,8 @@
ProjectInfo entity = baseMapper.getById(id);
Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
ProjectInfoVO vo = ProjectInfoVO.getVoByEntity(entity, null);
- List<Long> departmentList = vo.getCompetentDepartmentList();
- vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
+ String competentDepartment = vo.getCompetentDepartment();
+ vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId() + "")));
QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
fileQueryWrapper.eq("bus_id", vo.getId());
--
Gitblit v1.8.0