任务清单增加筛选条件 - 认证进度、当前项目状态。
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.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -75,7 +77,7 @@ public interface IConditionAssessmentEOService extends IService<ConditionAssessm
|
||||
* @param roleCode
|
||||
* @return
|
||||
*/
|
||||
ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser);
|
||||
ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser, ProjectTaskInventoryEO projectTaskInventory);
|
||||
|
||||
/**
|
||||
* 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.system.vo.LoginUser;
|
||||
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.mapper.ConditionAssessmentEOMapper;
|
||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||
@@ -144,11 +145,14 @@ public class ConditionAssessmentEOServiceImpl extends ServiceImpl<ConditionAsses
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode,LoginUser currentUser) {
|
||||
public ConditionAssessmentEO getProjectStatusAssess(String projectLawsInventoryId, String roleCode, LoginUser currentUser, ProjectTaskInventoryEO projectTaskInventory) {
|
||||
ConditionAssessmentEO result = null;
|
||||
|
||||
QueryWrapper<ConditionAssessmentEO> queryWrapper = new QueryWrapper<>();
|
||||
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())){
|
||||
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());
|
||||
QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
|
||||
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);
|
||||
|
||||
//验证当前用户在该项目中是什么角色
|
||||
@@ -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)){
|
||||
@@ -422,7 +427,8 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
public List<ProjectTaskInventoryEO> createTaskInventoryEOList(List<ProjectTaskInventoryEO> projectTaskInventoryEOList,
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList,
|
||||
Integer isProjectRole,
|
||||
LoginUser currentUser)
|
||||
LoginUser currentUser,
|
||||
ProjectTaskInventoryEO projectTaskInventory)
|
||||
{
|
||||
List<ProjectTaskInventoryEO> result = new ArrayList<>();
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
||||
@@ -449,7 +455,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
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){
|
||||
projectTaskInventoryEO.setProjectStatusAssess(projectStatusAssess.getConditionAssessment());
|
||||
projectTaskInventoryEO.setProjectStatusAssessRemark(projectStatusAssess.getRemark());
|
||||
|
||||
Reference in New Issue
Block a user