| | |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<CaseInfoWechatDTO> pageQueryWechat(String userId, PageRequest page, Map<String, Object> terms){ |
| | | List<CaseInfoWechatDTO> list = new ArrayList<>(); |
| | | public Page<CaseInfoWeChatDTO> pageQueryWechat(String userId, PageRequest page, Map<String, Object> terms){ |
| | | List<CaseInfoWeChatDTO> list = new ArrayList<>(); |
| | | String personType = terms.get("personType")+""; |
| | | if(ObjectUtils.isEmpty(personType)){ |
| | | throw new RuntimeException("请选择人员类型"); |
| | |
| | | } |
| | | List<CasePerson> casePersonList = personService.list(personWrapper); |
| | | if(ObjectUtils.isEmpty(casePersonList)){ |
| | | return new PageImpl<CaseInfoWechatDTO>(list, page, 0); |
| | | return new PageImpl<CaseInfoWeChatDTO>(list, page, 0); |
| | | } |
| | | List<String> ids = casePersonList.stream().map(CasePerson::getCaseId).collect(Collectors.toList()); |
| | | terms.put("idList",ids); |
| | |
| | | List<CaseInfo> content = mapper.pageTerms(page, terms); |
| | | if(ObjectUtils.isNotEmpty(content)){ |
| | | for(CaseInfo caseInfo: content){ |
| | | CaseInfoWechatDTO caseInfoWeChatDTO = new CaseInfoWechatDTO(); |
| | | CaseInfoWeChatDTO caseInfoWeChatDTO = new CaseInfoWeChatDTO(); |
| | | BeanUtils.copyProperties(caseInfo, caseInfoWeChatDTO); |
| | | if(ObjectUtils.isNotEmpty(caseInfo.getProcess()) && caseInfo.getProcess().equals(1) || caseInfo.getProcess().equals(2)){ |
| | | caseInfoWeChatDTO.setProcessStatus(1); |
| | |
| | | list.add(caseInfoWeChatDTO); |
| | | } |
| | | } |
| | | return new PageImpl<CaseInfoWechatDTO>(list, page, total); |
| | | return new PageImpl<CaseInfoWeChatDTO>(list, page, total); |
| | | } |
| | | |
| | | /** |