| | |
| | | if (CollectionUtils.isNotEmpty(elementTreeList)) { |
| | | for (ElementTree elementA : elementTreeList) { |
| | | |
| | | List<SafetySelfInspectionItem> selectElementList = itemList.stream().filter(item -> item.getElementA().equals(elementA.getValue())).collect(Collectors.toList()); |
| | | List<SafetySelfInspectionItem> selectElementList = itemList |
| | | .stream() |
| | | .filter(item -> item.getElementA() != null && |
| | | item.getElementA().equals(elementA.getValue())) |
| | | .collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(selectElementList)) { |
| | | SafetySelfInspectionElementRespDTO elementARespDTO = new SafetySelfInspectionElementRespDTO(); |
| | | elementARespDTO.setElementId(elementA.getValue()); |
| | |
| | | //无三级要素过滤出二级要素检查内容 |
| | | List<SafetySelfInspectionItem> sItemList = itemList |
| | | .stream() |
| | | .filter(item -> item.getElementC() == null && item.getElementB().equals(stree.getValue())) |
| | | .filter(item -> item.getElementC() == null |
| | | && item.getElementB() != null |
| | | && item.getElementB().equals(stree.getValue())) |
| | | .collect(Collectors.toList()); |
| | | //填充检查项 |
| | | elementBRespDTO.setItemList(assemblyDeduction(sItemList)); |
| | |
| | | safetySelfInspection.setStatus(2); |
| | | safetySelfInspection.setUpdateTime(date); |
| | | safetySelfInspection.setUpdateBy(username); |
| | | safetySelfInspection.setInspectionEndTime(new Date()); |
| | | safetySelfInspectionMapper.updateById(safetySelfInspection); |
| | | } |
| | | |