法规清单--流程状态搜索(平台件数据)
This commit is contained in:
+173
-36
@@ -37,6 +37,7 @@ import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.common.util.PageUtil;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
@@ -12247,34 +12248,34 @@ 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 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);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
|
||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
|
||||
@@ -12284,19 +12285,155 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
this.createQueryPermission(isProjectRole,currentUser,queryWrapper);
|
||||
}
|
||||
|
||||
Page<ProjectLawsInventoryEO> page = new Page<ProjectLawsInventoryEO>(pageNo, pageSize);
|
||||
IPage<ProjectLawsInventoryEO> pageList = this.page(page, queryWrapper);
|
||||
List<ProjectLawsInventoryEO> result = pageList.getRecords();
|
||||
|
||||
List<ProjectLawsInventoryEO> list = this.list(queryWrapper);
|
||||
//关联平台件数据
|
||||
platformDispose(projectLawsInventoryEO, result);
|
||||
platformDispose(projectLawsInventoryEO, list);
|
||||
|
||||
this.dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
||||
this.dataDictDispose(result,projectLawsInventoryEO.getCut());
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(designFlowStatusStr)){
|
||||
for (ProjectLawsInventoryEO lawsInventoryEO : list) {
|
||||
if(designFlowStatusStr.contains(lawsInventoryEO.getDesignFlowStatus())){
|
||||
lawsInventoryEOList.add(lawsInventoryEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(verifyFlowStatusStr)){
|
||||
for (ProjectLawsInventoryEO lawsInventoryEO : list) {
|
||||
if(verifyFlowStatusStr.contains(lawsInventoryEO.getVerifyFlowStatus())){
|
||||
lawsInventoryEOList.add(lawsInventoryEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isBlank(designFlowStatusStr) && StringUtils.isBlank(verifyFlowStatusStr)){
|
||||
lawsInventoryEOList = list;
|
||||
}
|
||||
|
||||
this.dataDispose(lawsInventoryEOList,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
||||
this.dataDictDispose(lawsInventoryEOList,projectLawsInventoryEO.getCut());
|
||||
//表头排序
|
||||
result = this.hearSort(projectLawsInventoryEO, result);
|
||||
lawsInventoryEOList = this.hearSort(projectLawsInventoryEO, lawsInventoryEOList);
|
||||
|
||||
Page pageList = PageUtil.getPages(pageNo, pageSize, lawsInventoryEOList);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
// @Override
|
||||
// public IPage<ProjectLawsInventoryEO> queryPage(ProjectLawsInventoryEO projectLawsInventoryEO, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||
// String dutyTerritoryStr = "";
|
||||
// if (StringUtils.isNotEmpty(projectLawsInventoryEO.getDutyTerritory())) {
|
||||
// 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())){
|
||||
// List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.selectItemsAll();
|
||||
// List<SysDictItem> dutyTerritorys = new ArrayList<>();
|
||||
// Map<String, List<SysDictItem>> firstLevelDTMap = this.sysDictItemServiceImpl.getFirstLevelSysDictItemByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue(), sysDictItems);
|
||||
// String[] firstLevelDTArr = projectLawsInventoryEO.getFirstLevelDutyTerritory().split(",");
|
||||
// for (String firstLevelDT : firstLevelDTArr){
|
||||
// if(CollectionUtils.isNotEmpty(firstLevelDTMap.get(firstLevelDT))){
|
||||
// dutyTerritorys.addAll(firstLevelDTMap.get(firstLevelDT));
|
||||
// }
|
||||
// }
|
||||
// if(CollectionUtils.isNotEmpty(dutyTerritorys)){
|
||||
// dutyTerritoryStr = dutyTerritorys.stream().map(SysDictItem::getItemValue).distinct().collect(Collectors.joining(","));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// QueryWrapper<ProjectLawsInventoryEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryEO, req.getParameterMap());
|
||||
// queryWrapper.orderByDesc("create_time","serial_number");
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(dutyTerritoryStr)) {
|
||||
// String finalDutyTerritoryStr = dutyTerritoryStr.replaceAll("\\*","");
|
||||
// queryWrapper.and(query -> {
|
||||
// query.lambda().like(ProjectLawsInventoryEO::getDutyTerritory, finalDutyTerritoryStr);
|
||||
// if(StringUtils.contains(finalDutyTerritoryStr,",")){
|
||||
// String[] dutyTerritoryArr = finalDutyTerritoryStr.split(",");
|
||||
// for (String duty : dutyTerritoryArr) {
|
||||
// query.or(q -> {
|
||||
// q.like("duty_territory",duty);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// int isProjectRole = Integer.parseInt(projectLawsInventoryEO.getRoleCode());
|
||||
// if (isProjectRole == Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())) {
|
||||
// //查当前用户Viewer对应责任领域
|
||||
// List<String> dutyTerritoryList = this.projectUserDutyTerritoryService.queryDutyTerritoryByUserId(currentUser.getId());
|
||||
// if (ObjectUtils.isNotEmpty(dutyTerritoryList)) {
|
||||
// queryWrapper.and(query -> {
|
||||
// for (String duty : dutyTerritoryList) {
|
||||
// query.or(q -> {
|
||||
// q.like("duty_territory", duty);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// 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);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// if(isProjectRole != Integer.parseInt(ProjectRoleEnum.STUDIO_ENGINEER.getValue())
|
||||
// && isProjectRole != Integer.parseInt(ProjectRoleEnum.MANAGER.getValue())
|
||||
// && isProjectRole != Integer.parseInt(ProjectRoleEnum.ADMIN.getValue())
|
||||
// && isProjectRole != Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())){
|
||||
// // 创建查询权限
|
||||
// this.createQueryPermission(isProjectRole,currentUser,queryWrapper);
|
||||
// }
|
||||
//
|
||||
// Page<ProjectLawsInventoryEO> page = new Page<ProjectLawsInventoryEO>(pageNo, pageSize);
|
||||
// IPage<ProjectLawsInventoryEO> pageList = this.page(page, queryWrapper);
|
||||
// List<ProjectLawsInventoryEO> result = pageList.getRecords();
|
||||
//
|
||||
// //关联平台件数据
|
||||
// platformDispose(projectLawsInventoryEO, result);
|
||||
//
|
||||
// this.dataDispose(result,currentUser,isProjectRole,projectLawsInventoryEO.getCut());
|
||||
// this.dataDictDispose(result,projectLawsInventoryEO.getCut());
|
||||
// //表头排序
|
||||
// result = this.hearSort(projectLawsInventoryEO, result);
|
||||
// return pageList;
|
||||
// }
|
||||
|
||||
public void platformDispose(ProjectLawsInventoryEO projectLawsInventoryEO, List<ProjectLawsInventoryEO> result) {
|
||||
List<String> valueList = FlowStateDesignEnum.getValueInfo();//修改为按高嵩提供的流程顺序
|
||||
|
||||
+5
-22
@@ -2794,42 +2794,25 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
//关联的平台件数据
|
||||
List<ProjectLawsInventoryEO> platformList = projectLawsInventoryPlatFormList.stream()
|
||||
.filter(e -> platformLawsInventoryIdList.contains(e.getId())).collect(Collectors.toList());
|
||||
for (ProjectLawsInventoryEO lawsInventoryEO : platformList) {
|
||||
if(ObjectUtils.isNotEmpty(platformList)){
|
||||
for (String value : valueInfo) {
|
||||
if(value.equals(lawsInventoryEO.getDesignFlowStatus())){
|
||||
List<ProjectLawsInventoryEO> collect1 = platformList.stream().filter(e -> value.equals(e.getDesignFlowStatus())).collect(Collectors.toList());
|
||||
if(ObjectUtils.isNotEmpty(collect1)){
|
||||
projectLawsInventoryEO.setDesignFlowStatus(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (String value : valueInfo) {
|
||||
if(value.equals(lawsInventoryEO.getVerifyFlowStatus())){
|
||||
List<ProjectLawsInventoryEO> collect1 = platformList.stream().filter(e -> value.equals(e.getVerifyFlowStatus())).collect(Collectors.toList());
|
||||
if(ObjectUtils.isNotEmpty(collect1)){
|
||||
projectLawsInventoryEO.setVerifyFlowStatus(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if(ObjectUtils.isNotEmpty(collect)){
|
||||
// yesList.add(projectLawsInventoryEO);
|
||||
// }else{
|
||||
// noList.add(projectLawsInventoryEO);
|
||||
// }
|
||||
}
|
||||
}
|
||||
// if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
||||
// && ObjectUtils.isNotEmpty(yesList)
|
||||
// && yesList.size() != projectLawsInventoryEOList.size()
|
||||
// ){
|
||||
// //法规清单有数据且部分关联平台件数据
|
||||
// projectLawsInventoryEOList = noList;
|
||||
// projectLawsInventoryEOList.addAll(projectLawsInventoryPlatFormList);
|
||||
// }else if(ObjectUtils.isNotEmpty(projectLawsInventoryEOList)
|
||||
// && ObjectUtils.isNotEmpty(yesList)
|
||||
// && yesList.size() == projectLawsInventoryEOList.size()){
|
||||
// //法规清单有数据且全部关联了平台件
|
||||
// projectLawsInventoryEOList = projectLawsInventoryPlatFormList;
|
||||
// }
|
||||
return projectLawsInventoryEOList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user