From c92f77ac03a1bbe3009891ce1d1f57f2d1091572 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期二, 24 八月 2021 15:00:25 +0800 Subject: [PATCH] 提交预约登记小程序相关代码 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java | 202 ++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 176 insertions(+), 26 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java index b9b2ab3..0183547 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java @@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.exceptions.ServiceException; import com.panzhihua.common.model.dtos.community.*; +import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; +import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.SystemmanagementConfigVO; import com.panzhihua.common.model.vos.community.*; @@ -20,6 +22,7 @@ import com.panzhihua.common.model.vos.user.UserPhoneVO; import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.*; +import com.panzhihua.service_community.dao.ComActActSignDAO; import com.panzhihua.service_community.dao.ComEldersAuthHistoryRecordMapper; import com.panzhihua.service_community.dao.ComMngPopulationDAO; import com.panzhihua.service_community.model.dos.*; @@ -34,10 +37,7 @@ import javax.annotation.Resource; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.Date; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; /** @@ -82,6 +82,8 @@ private EldersAuthService eldersAuthService; @Resource public ComMngPopulationDAO comMngPopulationDAO; + @Resource + private ComActActSignDAO comActActSignDAO; @Resource public ComEldersAuthUserService comEldersAuthUserService; @Resource @@ -477,6 +479,24 @@ } /** + * 城管安排 + * + * @param comActEasyPhotoVO 查询参数 + * @return 心愿列表 + */ + @PostMapping("updatePageeasyphoto") + public R updatePageeasyphoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { + return comActEasyPhotoService.updatePageeasyphoto(comActEasyPhotoVO); + } + /** + * 城管导出 + */ + @PostMapping("exportEasyPhoto") + public R exportEasyPhoto(@RequestBody ExportEasyPhotoDTO exportEasyPhotoDTO){ + return comActEasyPhotoService.export(exportEasyPhotoDTO); + } + + /** * 随手拍详情 * * @param id 随手拍主键 @@ -644,6 +664,14 @@ @PostMapping("puteasyphotostatus") public R putEasypHotoStatus(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { return comActEasyPhotoService.putEasypHotoStatus(comActEasyPhotoVO); + } + + /** + * 城管随手拍统计 + */ + @PostMapping("/esayPhotoCount") + public R esayphotoCount(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { + return comActEasyPhotoService.easyPhotoCount(comActEasyPhotoVO); } /** @@ -1420,32 +1448,56 @@ } } + /** + * 小程序-问卷调查详情 + * @param userId 用户id + * @param questId 问卷id + * @return 问卷调查详情 + */ + @GetMapping("questnaire/view/detail") + public R viewDetail(@RequestParam("questId") Long questId,@RequestParam("userId") Long userId) { + return comActQuestnaireService.getQuesDetail(questId,userId); + } + + /** + * 社区后台-查询问卷调查详情 + * @param questId 问卷id + * @return 问卷调查详情 + */ + @GetMapping("questnaire/admin/detail") + public R quesDetail( @RequestParam("questId") Long questId) { + return comActQuestnaireService.getQuesDetailAdmin(questId); + } + /** * 新增社区问卷 * @param questnaireVO * @return */ - @Transactional(rollbackFor = Exception.class) @PostMapping("questnaire/addquestnaire") - public R addQuestnaire(@RequestBody QuestnaireVO questnaireVO, @RequestParam("communityId") Long communityId, @RequestParam("userId") Long userId) { - return comActQuestnaireService.addQuestnaire(questnaireVO, communityId, userId); + public R addQuestnaire(@RequestBody QuestnaireVO questnaireVO) { + return comActQuestnaireService.addQuestnaire(questnaireVO); } /** - * 社区问卷列表 - * @param pageQuestnaireDTO - * @return + * 小程序-社区问卷列表 + * @param pageQuestnaireDTO 请求参数 + * @return 社区问卷列表 */ @PostMapping("questnaire/pagequestnaire") - public R pageQuestnaire(@RequestBody PageQuestnaireDTO pageQuestnaireDTO,@RequestParam("communityId") Long communityId) { - if(pageQuestnaireDTO.getForParty()==null){ - pageQuestnaireDTO.setForParty(false); - } - if(pageQuestnaireDTO.getForVolunteer()==null){ - pageQuestnaireDTO.setForVolunteer(false); - } - return comActQuestnaireService.pageQuestnaire(pageQuestnaireDTO, communityId); + public R pageQuestnaire(@RequestBody PageQuestnaireDTO pageQuestnaireDTO) { + return comActQuestnaireService.pageQuestnaire(pageQuestnaireDTO); + } + + /** + * 社区后台-社区问卷列表 + * @param pageQuestnaireDTO 请求参数 + * @return 社区问卷列表 + */ + @PostMapping("questnaire/admin/pagequestnaire") + public R pageQuestnaireAdmin(@RequestBody PageQuestnaireDTO pageQuestnaireDTO) { + return comActQuestnaireService.pageQuestnaireAdmin(pageQuestnaireDTO); } /** @@ -1453,7 +1505,6 @@ * @param questnaireVO * @return */ - @Transactional(rollbackFor = Exception.class) @PostMapping("questnaire/editquestnaire") public R editQuestnaire(@RequestBody QuestnaireVO questnaireVO) { return comActQuestnaireService.editQuestnaire(questnaireVO); @@ -1465,8 +1516,8 @@ * @return */ @PostMapping("questnaire/editquestnairedo") - public R editQuestnaireDO(@RequestBody EditComActQuestnaireVo editComActQuestnaireVo, @RequestParam("userId") Long userId) { - return comActQuestnaireService.editQuestnaireDO(editComActQuestnaireVo, userId); + public R editQuestnaireDO(@RequestBody EditComActQuestnaireVo editComActQuestnaireVo) { + return comActQuestnaireService.editQuestnaireDO(editComActQuestnaireVo); } /** @@ -1520,12 +1571,22 @@ } /** - * 居民填写问卷调查问卷 - * @param usersAnswerQuestnaireVO + * 居民填写问卷调查问卷questnaire/pagequestnaire */ @PostMapping("questnaire/usersanswequestnaire") - public R usersAnsweQuestnaire(@RequestBody UsersAnswerQuestnaireVO usersAnswerQuestnaireVO,@RequestParam("userId") Long userId){ - return comActQuestnaireService.usersAnsweQuestnaire(usersAnswerQuestnaireVO,userId); + public R usersAnsweQuestnaire(@RequestBody UsersAnswerQuestnaireVO usersAnswerQuestnaireVO){ + return comActQuestnaireService.usersAnsweQuestnaire(usersAnswerQuestnaireVO); + } + + /** + * 小程序-用户弹窗添加不在提醒接口 + * @param questId 问卷id + * @param userId 用户id + * @return 添加结果 + */ + @GetMapping("questnaire/add/noNotice") + public R addNoNotice(@RequestParam("questId") Long questId,@RequestParam("userId") Long userId){ + return comActQuestnaireService.addNoNotice(questId,userId); } /** @@ -1704,8 +1765,21 @@ if (R.isOk(r1)) { log.info("新增用户报名党建活动通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); } - } + //用户高龄认证反馈,推送订阅消息给用户 + Map<String,String> map = comActActSignDAO.getUserOpenId(eldersAuthDO.getSumitUserId()); + if(map != null){ + String openid = map.get("openid"); + try { + WxXCXTempSend util = new WxXCXTempSend(); + String accessToken = util.getAppAccessToken(); + WxUtil.sendSubscribeRZSH(openid,accessToken,"高龄认证" + ,DateUtils.format(eldersAuthDO.getCreateAt(),DateUtils.ymdhms_format),eldersAuthFeedbackAddDTO.getFeedBack()); + }catch (Exception e){ + log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); + } + } + } return addR; } @@ -1789,4 +1863,80 @@ public R readUserReward(@RequestParam("userId") Long userId,@RequestParam("communityId") Long communityId) { return comActEasyPhotoService.readUserReward(userId,communityId); } + + /** + * 定时任务检测即将开始的社区活动,并使用订阅消息通知用户 + */ + @PostMapping("timedTaskActivityNotice") + public R timedTaskActivityNotice(){ + return comActActivityService.timedTaskActivityNotice(); + } + + /** + * 问卷调查统计汇总 + * @param summaryDTO 请求参数 + * @return 统计汇总 + */ + @PostMapping("questnaire/statisticsSummary") + public R statisticsSummary(@RequestBody StatisticsSummaryDTO summaryDTO) { + return comActQuestnaireService.statisticsSummary(summaryDTO); + } + + /** + * 问卷调查统计汇总导出数据查询 + * @param questId 调查问卷id + * @return 调查统计汇总导出数据 + */ + @GetMapping("questnaire/statisticsSummary/export") + public R statisticsSummaryExport(@RequestParam("questId") Long questId) { + return comActQuestnaireService.statisticsSummaryExport(questId); + } + + /** + * 问卷调查统计汇总表头统计 + * @param questId 调查问卷id + * @return 问卷调查统计汇总表头统计数据 + */ + @GetMapping("questnaire/statisticsSummary/header") + public R statisticsSummaryHeader(@RequestParam("questId") Long questId,@RequestParam("communityId") Long communityId) { + return comActQuestnaireService.statisticsSummaryHeader(questId,communityId); + } + + /** + * 定时任务检测待发布,调研中的问卷调查状态 + */ + @PostMapping("timedTaskQuestionnaire") + public R timedTaskQuestionnaire(){ + return comActQuestnaireService.timedTaskQuestionnaire(); + } + + /** + * 小程序-新增问卷调查浏览数量 + * @param questId 问卷调查id + * @return 增加结果 + */ + @GetMapping("questnaire/add/view") + public R addQuestnaireView(@RequestParam("questId") Long questId) { + return comActQuestnaireService.addQuestnaireView(questId); + } + + /** + * 社区后台-切换随手拍公示状态 + * @param comActEasyPhotoVO 请求参数 + * @return 切换结果 + */ + @PostMapping("easyphoto/switch/publicity") + public R easyPhotoSwitchPublicity(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { + return comActEasyPhotoService.easyPhotoSwitchPublicity(comActEasyPhotoVO); + } + + /** + * 查询社区待处理随手拍id集合 + * @param communityId 社区id + * @return 社区待处理随手拍id集合 + */ + @GetMapping("easyphoto/noHandle/list") + public R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId) { + return comActEasyPhotoService.easyPhotoNoHandleList(communityId); + } } -- Gitblit v1.7.1