|
@@ -35,25 +35,35 @@ public class HouseGuarantyProcessServiceImpl extends ServiceImpl<HouseGuarantyPr
|
|
|
|
|
|
@Override
|
|
|
public List<ProcessVO> getHouseGuarantyProcesses(Long id) {
|
|
|
- List<String> aProcesses = Arrays.stream(BusinessEnum.HouseGuarantyProcess.values()).map(BusinessEnum.HouseGuarantyProcess::getMsg).collect(Collectors.toList());
|
|
|
- HouseGuarantyProcess parent = this.getOne(new LambdaQueryWrapper<HouseGuarantyProcess>().eq(BaseEntity::getId, id).select(HouseGuarantyProcess::getHome));
|
|
|
- Map<String, List<HouseGuarantyProcess>> collect = this.list(new LambdaQueryWrapper<HouseGuarantyProcess>().select(BaseEntity::getId, HouseGuarantyProcess::getHome,
|
|
|
- BaseEntity::getUpdateTime, HouseGuarantyProcess::getProcessName,HouseGuarantyProcess::getDocUrl)
|
|
|
- .eq(HouseGuarantyProcess::getHome, parent.getHome())).stream().collect(Collectors.groupingBy(HouseGuarantyProcess::getProcessName));
|
|
|
+ List<BusinessEnum.HouseGuarantyProcess> aProcesses = Arrays.stream(BusinessEnum.HouseGuarantyProcess.values()).collect(Collectors.toList());
|
|
|
|
|
|
+ if (id != null){
|
|
|
+ HouseGuarantyProcess parent = this.getOne(new LambdaQueryWrapper<HouseGuarantyProcess>().eq(BaseEntity::getId, id).select(HouseGuarantyProcess::getHome));
|
|
|
+ Map<String, List<HouseGuarantyProcess>> collect = this.list(new LambdaQueryWrapper<HouseGuarantyProcess>().select(BaseEntity::getId, HouseGuarantyProcess::getHome,
|
|
|
+ BaseEntity::getUpdateTime, HouseGuarantyProcess::getProcessName,HouseGuarantyProcess::getDocUrl)
|
|
|
+ .eq(HouseGuarantyProcess::getHome, parent.getHome())).stream().collect(Collectors.groupingBy(HouseGuarantyProcess::getProcessName));
|
|
|
+ List<ProcessVO> list = aProcesses.stream().map(x -> {
|
|
|
+ ProcessVO processVO = new ProcessVO();
|
|
|
+ processVO.setName(x.getMsg());
|
|
|
+ processVO.setRouter(x.getRouter());
|
|
|
+ List<HouseGuarantyProcess> houseGuarantyProcesses = collect.get(x.getMsg());
|
|
|
+ if (CollectionUtil.isNotEmpty(houseGuarantyProcesses)){
|
|
|
+ HouseGuarantyProcess process = houseGuarantyProcesses.get(0);
|
|
|
+ if (process != null) {
|
|
|
+ processVO.setId(process.getId());
|
|
|
+ processVO.setUpdateDate(process.getUpdateTime());
|
|
|
+ processVO.setState(Boolean.TRUE);
|
|
|
+ processVO.setDocUrl(process.getDocUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return processVO;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ return list;
|
|
|
+ }
|
|
|
List<ProcessVO> list = aProcesses.stream().map(x -> {
|
|
|
ProcessVO processVO = new ProcessVO();
|
|
|
- processVO.setName(x);
|
|
|
- List<HouseGuarantyProcess> houseGuarantyProcesses = collect.get(x);
|
|
|
- if (CollectionUtil.isNotEmpty(houseGuarantyProcesses)){
|
|
|
- HouseGuarantyProcess process = houseGuarantyProcesses.get(0);
|
|
|
- if (process != null) {
|
|
|
- processVO.setId(process.getId());
|
|
|
- processVO.setUpdateDate(process.getUpdateTime());
|
|
|
- processVO.setState(Boolean.TRUE);
|
|
|
- processVO.setDocUrl(process.getDocUrl());
|
|
|
- }
|
|
|
- }
|
|
|
+ processVO.setName(x.getMsg());
|
|
|
+ processVO.setRouter(x.getRouter());
|
|
|
return processVO;
|
|
|
}).collect(Collectors.toList());
|
|
|
return list;
|