修改法规和认证清单流程筛选多选

This commit is contained in:
高嵩
2023-06-28 20:23:52 +08:00
parent 99af6468d1
commit e21a402f73
2 changed files with 59 additions and 0 deletions
@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.modules.system.entity.SysRole;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -59,7 +60,26 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) {
String flowStatusStr = "";
if (StringUtils.isNotEmpty(projectCertificationInventoryEO.getFlowStatus())) {
flowStatusStr = projectCertificationInventoryEO.getFlowStatus();
projectCertificationInventoryEO.setFlowStatus(null);
}
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryEO, req.getParameterMap());
if (StringUtils.isNotEmpty(flowStatusStr)) {
String finalflowStatusStr = flowStatusStr.replaceAll("\\*","");
queryWrapper.and(query -> {
query.lambda().like(ProjectCertificationInventoryEO::getFlowStatus, finalflowStatusStr);
if(StringUtils.contains(finalflowStatusStr,",")){
String[] flowStatusArr = finalflowStatusStr.split(",");
for (String fs : flowStatusArr) {
query.or(q -> {
q.like("flow_status",fs);
});
}
}
});
}
queryWrapper.orderByDesc("create_time");
Page<ProjectCertificationInventoryEO> page = new Page<ProjectCertificationInventoryEO>(pageNo, pageSize);
IPage<ProjectCertificationInventoryEO> pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper,page,projectCertificationInventoryEO,cut);
@@ -13441,6 +13441,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
dutyTerritoryStr = projectLawsInventoryEO.getDutyTerritory();
projectLawsInventoryEO.setDutyTerritory(null);
}
String designFlowStatusStr = "";
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignFlowStatus())) {
designFlowStatusStr = projectLawsInventoryEO.getDesignFlowStatus();
projectLawsInventoryEO.setDesignFlowStatus(null);
}
String verifyFlowStatusStr = "";
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyFlowStatus())) {
verifyFlowStatusStr = projectLawsInventoryEO.getVerifyFlowStatus();
projectLawsInventoryEO.setVerifyFlowStatus(null);
}
// 根据一级责任领域统计节点查询该一级责任领域下所有子责任领域的法规清单数据
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getFirstLevelDutyTerritory())){
@@ -13475,6 +13485,35 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
});
}
if (StringUtils.isNotEmpty(designFlowStatusStr)) {
String finalDesignFlowStatusStr = designFlowStatusStr.replaceAll("\\*","");
queryWrapper.and(query -> {
query.lambda().like(ProjectLawsInventoryEO::getDesignFlowStatus, finalDesignFlowStatusStr);
if(StringUtils.contains(finalDesignFlowStatusStr,",")){
String[] designFlowStatusArr = finalDesignFlowStatusStr.split(",");
for (String dsf : designFlowStatusArr) {
query.or(q -> {
q.like("design_flow_status",dsf);
});
}
}
});
}
if (StringUtils.isNotEmpty(verifyFlowStatusStr)) {
String finalVerifyFlowStatusStr = verifyFlowStatusStr.replaceAll("\\*","");
queryWrapper.and(query -> {
query.lambda().like(ProjectLawsInventoryEO::getVerifyFlowStatus, finalVerifyFlowStatusStr);
if(StringUtils.contains(finalVerifyFlowStatusStr,",")){
String[] verifyFlowStatusArr = finalVerifyFlowStatusStr.split(",");
for (String vsf : verifyFlowStatusArr) {
query.or(q -> {
q.like("verify_flow_status",vsf);
});
}
}
});
}
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())