UAT 问题清单-22、24问题修改。
This commit is contained in:
+8
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.jero.common.api.vo.Result;
|
||||
@@ -234,4 +235,11 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
* @param projectLawsInventoryEOS
|
||||
*/
|
||||
void lawsInventoryEOListSortByVerifyDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS);
|
||||
|
||||
/**
|
||||
* 创建查询权限,2023-04-06 修改UAT问题第22条
|
||||
* @param isProjectRole
|
||||
* @param currentUser
|
||||
*/
|
||||
void createQueryPermission(int isProjectRole, LoginUser currentUser, QueryWrapper<ProjectLawsInventoryEO> projectLawsInventoryEOQueryWrapper);
|
||||
}
|
||||
|
||||
+41
-3
@@ -1402,12 +1402,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
|
||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())
|
||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())){
|
||||
projectLawsInventoryEOQueryWrapper.and(queryWrapper ->{
|
||||
/*projectLawsInventoryEOQueryWrapper.and(queryWrapper ->{
|
||||
queryWrapper.eq("regulation_owner_id",currentUser.getId()).
|
||||
or().eq("engineering_interface_person",currentUser.getId()).
|
||||
or().eq("design_duty_id",currentUser.getId()).
|
||||
or().eq("verify_duty_id",currentUser.getId());
|
||||
});
|
||||
});*/
|
||||
|
||||
// 创建查询权限
|
||||
this.createQueryPermission(isProjectRole,currentUser,projectLawsInventoryEOQueryWrapper);
|
||||
}
|
||||
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
|
||||
log.info("二阶段消耗时间:" + (System.currentTimeMillis() - startTime));
|
||||
@@ -10601,6 +10604,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
sysRoles.add(sysRole);
|
||||
}
|
||||
|
||||
// 认证
|
||||
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))){
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getName());
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getCode());
|
||||
}
|
||||
sysRoles.add(sysRole);
|
||||
}
|
||||
}
|
||||
//相关人员名单中取法规工程师
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnels = projectRelatedPersonnelService.queryPageList(projectLibraryId,null,null,null,null,null);
|
||||
@@ -10682,7 +10697,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
// 责任人
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryDutyPersonCountWrap = new QueryWrapper<>();
|
||||
queryDutyPersonCountWrap.lambda().eq(ProjectLawsInventoryEO::getDesignDutyId,loginUser.getId());
|
||||
queryDutyPersonCountWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectLibraryId);
|
||||
queryDutyPersonCountWrap.and(query -> {
|
||||
query.lambda().eq(ProjectLawsInventoryEO::getDesignDutyId,loginUser.getId());
|
||||
query.or().lambda().eq(ProjectLawsInventoryEO::getVerifyDutyId,loginUser.getId());
|
||||
});
|
||||
Integer dutyPersonCount = this.baseMapper.selectCount(queryDutyPersonCountWrap);
|
||||
if(dutyPersonCount > 0){
|
||||
SysRole sysRole = new SysRole();
|
||||
@@ -11541,6 +11560,25 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createQueryPermission(int isProjectRole, LoginUser currentUser,QueryWrapper<ProjectLawsInventoryEO> queryWrapper) {
|
||||
// 如果是法规工程师,只能看到法规工程师是自己的数据
|
||||
if(isProjectRole == Integer.parseInt(ProjectRoleEnum.REGULATI_ENGINEER.getValue())){
|
||||
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getRegulationOwnerId,currentUser.getId());
|
||||
}
|
||||
// 如果是责任人,只能看到设计符合性或验证符合型 责任人是自己的数据。
|
||||
if(isProjectRole == Integer.parseInt(com.jero.modules.system.enums.ProjectRoleEnum.PERSON_LIABLE1.getValue())){
|
||||
queryWrapper.and(query -> {
|
||||
query.lambda().eq(ProjectLawsInventoryEO::getDesignDutyId,currentUser.getId());
|
||||
query.or().lambda().eq(ProjectLawsInventoryEO::getVerifyDutyId,currentUser.getId());
|
||||
});
|
||||
}
|
||||
// 如果是工程接口人,只能看到工程接口人是自己的数据。
|
||||
if(isProjectRole == Integer.parseInt(com.jero.modules.system.enums.ProjectRoleEnum.INTERFACE_PERSON1.getValue())){
|
||||
queryWrapper.lambda().eq(ProjectLawsInventoryEO::getEngineeringInterfacePerson,currentUser.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统内所有用户验证
|
||||
* @param projectLawsInventoryEO
|
||||
|
||||
Reference in New Issue
Block a user