Merge branch 'cedoodev' into test
| | |
| | | @ApiModelProperty(value = "反馈结果", hidden = false, example = "") |
| | | private String feedBack; |
| | | |
| | | @ApiModelProperty(value = "用户ID", hidden = true, example = "") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date birthDay; |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请人") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "申请账号") |
| | | private String submitUserAccount; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "社区反馈") |
| | | private List<EldersAuthFeedbackVO> eldersAuthFeedbackVOList; |
| | | |
| | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "家庭成员ID") |
| | | private Long familyUserId; |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 添加高龄认证反馈 |
| | | * @param eldersAuthFeedbackEditDTO |
| | | * @param eldersAuthFeedbackAddDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/addFeedback") |
| | | R addFeedback(@RequestBody EldersAuthFeedbackEditDTO eldersAuthFeedbackEditDTO); |
| | | R addFeedback(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO); |
| | | } |
| | |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExcelElderAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("page") |
| | | @ApiOperation(value = "查询高龄认证") |
| | | @ApiOperation(value = "查询高龄认证", response = EldersAuthVO.class) |
| | | R query(@Validated @ModelAttribute PageEldersAuthDTO pageEldersAuthDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | return communityService.query(pageEldersAuthDTO); |
| | |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询高龄认证详细信息") |
| | | @ApiOperation(value = "查询高龄认证详细信息", response = EldersAuthDetailsVO.class) |
| | | R<EldersAuthDetailsVO> details(@PathVariable("id") Long id){ |
| | | return communityService.eldersAuthDetails(id); |
| | | } |
| | |
| | | * @param pageEldersAuthDTO 搜索条件 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("export") |
| | | @ApiOperation(value = "查询高龄认证详细信息") |
| | | @PostMapping("export") |
| | | @ApiOperation(value = "导出高龄认证信息") |
| | | R<String> export(@Validated @ModelAttribute PageEldersAuthDTO pageEldersAuthDTO){ |
| | | String name = "高龄补贴-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return R.fail("未查询到用户"); |
| | | return R.fail("未查询到高龄认证用户"); |
| | | } |
| | | /** |
| | | * 新增高龄认证 |
| | |
| | | */ |
| | | @PostMapping("/addFeedback") |
| | | @ApiOperation(value = "新增高龄认证反馈", response = R.class) |
| | | R addFeedback(@Validated @RequestBody EldersAuthFeedbackEditDTO eldersAuthFeedbackEditDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackEditDTO); |
| | | return communityService.addFeedback(eldersAuthFeedbackEditDTO); |
| | | R addFeedback(@Validated @RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); |
| | | eldersAuthFeedbackAddDTO.setUserId(getUserId()); |
| | | return communityService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | eldersAuthDO.setIdCard(theFamily.getIdCard()); |
| | | eldersAuthDO.setAuthUserName(theFamily.getName()); |
| | | eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl()); |
| | | eldersAuthDO.setFamilyUserId(eldersAuthAddByFamilyDTO.getFamilyUserId()); |
| | | //根据身份证查询出籍贯 出生日期 |
| | | String domicile = ""; |
| | | Date birthDay = new Date(); |
| | |
| | | ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO); |
| | | return eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询导出高龄老人 |
| | | * @param pageEldersAuthDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eldersauth/eldersAuthQuery") |
| | | R eldersAuthQuery(@RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | return eldersAuthService.query(pageEldersAuthDTO); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT ea.id, ea.create_at, ea.create_by, ea.update_by, ea.update_at," + |
| | | " ea.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, " + |
| | | " ea.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, ea.FAMILY_USER_ID ," + |
| | | " ea.DOMICILE, ea.SUMIT_USER_ID, u.phone as submitUserAccount ," + |
| | | " u.name as submitUserName, ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) as age \n" + |
| | | "FROM com_elders_auth ea LEFT JOIN sys_user u ON ea.SUMIT_USER_ID = u.user_id\n" + |
| | |
| | | " ORDER BY ea.${pageEldersAuthDTO.sortBy} ${pageEldersAuthDTO.order} " + |
| | | "</script>") |
| | | IPage<EldersAuthVO> selectByPage(Page page, @Param("pageEldersAuthDTO") PageEldersAuthDTO pageEldersAuthDTO); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT ea.id, ea.create_at, ea.create_by, ea.update_by, ea.update_at," + |
| | | " ea.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, ea.FAMILY_USER_ID, " + |
| | | " ea.DOMICILE, ea.SUMIT_USER_ID, u.phone as submitUserAccount ," + |
| | | " u.name as submitUserName, ROUND(DATEDIFF(CURDATE(), ea.BIRTH_DAY)/365.2422) as age \n" + |
| | | "FROM com_elders_auth ea LEFT JOIN sys_user u ON ea.SUMIT_USER_ID = u.user_id\n" + |
| | | " where ea.id = #{id}" + |
| | | "</script>") |
| | | EldersAuthDetailsVO selectDetails(@Param("id") Long id); |
| | | } |
| | |
| | | * 出生日期 列: BIRTH_DAY |
| | | */ |
| | | private Date birthDay; |
| | | /** |
| | | * 家庭成员ID 列: FAMILY_USER_ID |
| | | */ |
| | | private Long familyUserId; |
| | | } |
| | |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.EldersAuthService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | Page page = new Page<>(); |
| | | page.setSize(pageEldersAuthDTO.getPageSize()); |
| | | page.setCurrent(pageEldersAuthDTO.getPageNum()); |
| | | |
| | | return R.ok(eldersAuthDAO.selectByPage(page, pageEldersAuthDTO)); |
| | | } |
| | | |
| | |
| | | * @return 查找结果 |
| | | */ |
| | | public R<EldersAuthDetailsVO> eldersAuthDetails(Long id){ |
| | | EldersAuthDO eldersAuthDO = eldersAuthDAO.selectById(id); |
| | | if(eldersAuthDO!=null) { |
| | | EldersAuthDetailsVO eldersAuthDetailsVO = new EldersAuthDetailsVO(); |
| | | BeanUtils.copyProperties(eldersAuthDO, eldersAuthDetailsVO); |
| | | |
| | | EldersAuthDetailsVO eldersAuthDetailsVO = eldersAuthDAO.selectDetails(id); |
| | | if(eldersAuthDetailsVO!=null) { |
| | | //社区反馈 |
| | | List<EldersAuthFeedbackDO> list = |
| | | eldersAuthFeedbackDAO.selectList(new LambdaQueryWrapper<EldersAuthFeedbackDO>() |
| | | .eq(EldersAuthFeedbackDO::getAuthId, eldersAuthDO.getId())); |
| | | .eq(EldersAuthFeedbackDO::getAuthId, eldersAuthDetailsVO.getId())); |
| | | List<EldersAuthFeedbackVO> listVO = new ArrayList<>(); |
| | | list.forEach(feedDo ->{ |
| | | EldersAuthFeedbackVO eldersAuthFeedbackVO = new EldersAuthFeedbackVO(); |
| | |
| | | */ |
| | | public R addFeedback(EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO){ |
| | | EldersAuthFeedbackDO eldersAuthFeedbackDO = new EldersAuthFeedbackDO(); |
| | | eldersAuthFeedbackDO.setCreateBy(eldersAuthFeedbackAddDTO.getUserId()); |
| | | eldersAuthFeedbackDO.setCreateAt(new Date()); |
| | | BeanUtils.copyProperties(eldersAuthFeedbackAddDTO, eldersAuthFeedbackDO); |
| | | if(eldersAuthFeedbackDAO.insert(eldersAuthFeedbackDO)>0){ |
| | | return R.ok(); |