任务清单增加筛选条件 - 认证进度、当前项目状态。
This commit is contained in:
+3
-1
@@ -5,6 +5,8 @@ import com.jero.common.system.vo.LoginUser;
|
|||||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||||
import com.jero.modules.project.entity. ConditionAssessmentEO;
|
import com.jero.modules.project.entity. ConditionAssessmentEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@ public interface IConditionAssessmentEOService extends IService<ConditionAssessm
|
|||||||
* @param roleCode
|
* @param roleCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser);
|
ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser, ProjectTaskInventoryEO projectTaskInventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* studio视角下获取项目状态评估
|
* studio视角下获取项目状态评估
|
||||||
|
|||||||
+5
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||||
|
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||||
import com.jero.modules.project.mapper.ConditionAssessmentEOMapper;
|
import com.jero.modules.project.mapper.ConditionAssessmentEOMapper;
|
||||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||||
@@ -144,11 +145,14 @@ public class ConditionAssessmentEOServiceImpl extends ServiceImpl<ConditionAsses
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode,LoginUser currentUser) {
|
public ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser, ProjectTaskInventoryEO projectTaskInventory) {
|
||||||
ConditionAssessmentEO result = null;
|
ConditionAssessmentEO result = null;
|
||||||
|
|
||||||
QueryWrapper<ConditionAssessmentEO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ConditionAssessmentEO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,projectLawsInventoryId);
|
queryWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,projectLawsInventoryId);
|
||||||
|
if(StringUtils.isNotEmpty(projectTaskInventory.getProjectStatusAssess())){
|
||||||
|
queryWrapper.lambda().eq(ConditionAssessmentEO::getConditionAssessment,projectTaskInventory.getProjectStatusAssess());
|
||||||
|
}
|
||||||
|
|
||||||
if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue()) || StringUtils.equals(roleCode,ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
|
if(StringUtils.equals(roleCode,ProjectRoleEnum.REGULATI_ENGINEER.getValue()) || StringUtils.equals(roleCode,ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
|
||||||
queryWrapper.lambda().eq(ConditionAssessmentEO::getCreateBy,currentUser.getUsername());
|
queryWrapper.lambda().eq(ConditionAssessmentEO::getCreateBy,currentUser.getUsername());
|
||||||
|
|||||||
+9
-3
@@ -181,6 +181,11 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
List<String> projectLawsInventoryIdList = projectLawsInventoryEOList.stream().distinct().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
|
List<String> projectLawsInventoryIdList = projectLawsInventoryEOList.stream().distinct().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
|
||||||
QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
|
||||||
taskInventoryQueryWrapper.lambda().in(ProjectTaskInventoryEO::getProjectLawsInventoryId,projectLawsInventoryIdList);
|
taskInventoryQueryWrapper.lambda().in(ProjectTaskInventoryEO::getProjectLawsInventoryId,projectLawsInventoryIdList);
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getCertificationProgress())){
|
||||||
|
taskInventoryQueryWrapper.lambda().in(ProjectTaskInventoryEO::getCertificationProgress,projectTaskInventoryEO.getCertificationProgress());
|
||||||
|
}
|
||||||
|
|
||||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = this.baseMapper.selectList(taskInventoryQueryWrapper);
|
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = this.baseMapper.selectList(taskInventoryQueryWrapper);
|
||||||
|
|
||||||
//验证当前用户在该项目中是什么角色
|
//验证当前用户在该项目中是什么角色
|
||||||
@@ -207,7 +212,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
result = createTaskInventoryEOList(projectTaskInventoryEOList,projectTaskInventoryDetailEOList,isProjectRole,currentUser);
|
result = createTaskInventoryEOList(projectTaskInventoryEOList,projectTaskInventoryDetailEOList,isProjectRole,currentUser,projectTaskInventoryEO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(CollectionUtils.isNotEmpty(result)){
|
if(CollectionUtils.isNotEmpty(result)){
|
||||||
@@ -422,7 +427,8 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
public List<ProjectTaskInventoryEO> createTaskInventoryEOList(List<ProjectTaskInventoryEO> projectTaskInventoryEOList,
|
public List<ProjectTaskInventoryEO> createTaskInventoryEOList(List<ProjectTaskInventoryEO> projectTaskInventoryEOList,
|
||||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList,
|
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList,
|
||||||
Integer isProjectRole,
|
Integer isProjectRole,
|
||||||
LoginUser currentUser)
|
LoginUser currentUser,
|
||||||
|
ProjectTaskInventoryEO projectTaskInventory)
|
||||||
{
|
{
|
||||||
List<ProjectTaskInventoryEO> result = new ArrayList<>();
|
List<ProjectTaskInventoryEO> result = new ArrayList<>();
|
||||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
||||||
@@ -449,7 +455,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
roleCode = ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue();
|
roleCode = ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConditionAssessmentEO projectStatusAssess = conditionAssessmentEOService.getProjectStatusAssess(projectTaskInventoryEO.getProjectLawsInventoryId(),roleCode,currentUser);
|
ConditionAssessmentEO projectStatusAssess = conditionAssessmentEOService.getProjectStatusAssess(projectTaskInventoryEO.getProjectLawsInventoryId(),roleCode,currentUser,projectTaskInventory);
|
||||||
if(projectStatusAssess != null){
|
if(projectStatusAssess != null){
|
||||||
projectTaskInventoryEO.setProjectStatusAssess(projectStatusAssess.getConditionAssessment());
|
projectTaskInventoryEO.setProjectStatusAssess(projectStatusAssess.getConditionAssessment());
|
||||||
projectTaskInventoryEO.setProjectStatusAssessRemark(projectStatusAssess.getRemark());
|
projectTaskInventoryEO.setProjectStatusAssessRemark(projectStatusAssess.getRemark());
|
||||||
|
|||||||
Reference in New Issue
Block a user