| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | |
| | | @PostMapping("/eldersauth/getMyfamilyElders/{userId}") |
| | | R<List<ComMngFamilyInfoVO>> getMyfamilyElders(@PathVariable("userId") Long userId){ |
| | | List<ComMngFamilyInfoVO> list = comMngPopulationDAO.listFamilyByUserId(userId); |
| | | |
| | | List<ComMngFamilyInfoVO> sortedList = list.stream().sorted(Comparator.comparing(ComMngFamilyInfoVO::getCreateAt).reversed()).collect(Collectors.toList()); |
| | | |
| | | List<ComMngFamilyInfoVO> listRt = new ArrayList<>(); |
| | | list.forEach(rt -> { |
| | | boolean isElders = rt.getAge()>=80; |
| | | if(isElders){ |
| | | sortedList.forEach(rt -> { |
| | | int age = IdCard.IdNOToAge(rt.getIdCard()); |
| | | boolean isElders = age >= 80; |
| | | if (isElders) { |
| | | listRt.add(rt); |
| | | } |
| | | }); |
| | |
| | | //根据身份证查询出籍贯 出生日期 |
| | | //String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); |
| | | String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard()); |
| | | if(StringUtils.isEmpty(domicile)){ |
| | | domicile = "暂无"; |
| | | } |
| | | |
| | | Date birthDay = IdCard.birthDay(eldersAuthDO.getIdCard()); |
| | | eldersAuthDO.setDomicile(domicile); |
| | |
| | | if(R.isOk(addR)){ |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(eldersAuthDO.getSumitUserId()); |
| | | sysUserNoticeVO.setType(1); |
| | | sysUserNoticeVO.setTitle("高龄认证社区社区反馈"); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("高龄认证社区反馈"); |
| | | sysUserNoticeVO.setBusinessType(13); |
| | | sysUserNoticeVO.setBusinessTitle(" "); |
| | | sysUserNoticeVO.setBusinessContent("你提交【" +eldersAuthDO.getAuthUserName() + "】的高龄认证,社区进行了反馈"); |
| | | sysUserNoticeVO.setBusinessContent("你提交【" +eldersAuthDO.getAuthUserName() + "】的高龄认证,社区反馈:" |
| | | + eldersAuthFeedbackAddDTO.getFeedBack()); |
| | | sysUserNoticeVO.setBusinessId(eldersAuthDO.getId()); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | |
| | | } |
| | | } |
| | | |
| | | return eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | return addR; |
| | | } |
| | | |
| | | |