留个备份~~简直哭哭惹

   @GetMapping("/resident-list")
    public TableDataInfo getResidentListMChoice(SysResident resident, HttpServletRequest request){
        LoginUser docLoginUser = tokenUitls.getLoginUser(request);

        if(StringUtils.isBlank(resident.getHosId())) {
            resident.setHosId(docLoginUser.getLoginInfo().getOrgId());
        }
        if (!StringUtils.isBlank(resident.getTagsId())){
            List tagsIdList = new ArrayList<>();
            for (String tagsId : resident.getTagsId().split(",")) {
                tagsIdList.add(Integer.parseInt(tagsId));
            }
            resident.setTagsIdList(tagsIdList);
        }

        //查询条件为当前医生的建档
        if(!Objects.isNull(resident.getParams()) && !Objects.isNull(resident.getParams().get("isSelfResident"))) {
            String isSelfResidentFlag = resident.getParams().get("isSelfResident").toString();
            if(Objects.equals(isSelfResidentFlag, "1")) {
                resident.setCreateBy(docLoginUser.getUserId());
            }
        }

        startPage();
        List list = residentService.getResidentMChoiceVoList(resident);

           for (int i = 0; i < list.size(); i++) {
//            List tagsIdList = new ArrayList<>();
              List tagsList = residentService.getResidentInfo(list.get(i).getResidentId()).getTags();
//            if(CollectionUtils.isNotEmpty(resident.getTagsIdList())){
//                for (SysResidentTags t : tagsList) {
//                    tagsIdList.add(t.getId());
//                }
//                if (tagsIdList.containsAll(resident.getTagsIdList())){
//                    list.get(i).setTags(tagsList);
//                }else {
//                    list.remove(i);
//                }
//            } else {
                 list.get(i).setTags(tagsList);
//            }
//
        }
        return getDataTable(list);
    }

你可能感兴趣的:(windows)