| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerOrgTeamDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerServiceTypeDto; |
| | | import com.panzhihua.common.model.dtos.common.PageComMngVolunteerSkillDto; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerOrgTeamVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerServiceTypeVo; |
| | | import com.panzhihua.common.model.vos.common.ComMngVolunteerSkillVo; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAnalysisVO; |
| | | import com.panzhihua.common.service.community.CommunityWestService; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageVolunteerDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.community.CommunityWestService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static org.apache.commons.lang3.ObjectUtils.isEmpty; |
| | |
| | | private UserService userService; |
| | | @Resource |
| | | private PartyBuildingService partyBuildingService; |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | @ApiOperation(value = "分页查询小区", response = ComMngStructAreaVO.class) |
| | | @PostMapping("pagearea") |
| | | public R pageArea(@RequestBody ComMngStructAreaVO comMngStructAreaVO) { |
| | | return communityService.pageArea(comMngStructAreaVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新分页查询小区", response = ComMngVillageVO.class) |
| | | @PostMapping("pagevillage") |
| | | public R pageVillage(@RequestBody PageComMngVillageDTO pageComMngVillageDTO) { |
| | |
| | | public R activityEvaluate(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActActEvaluateVO.setUserId(loginUserInfo.getUserId()); |
| | | String openid = this.getLoginUserInfo().getOpenid(); |
| | | String appId = this.getAppId(); |
| | | // 微信内容审核 |
| | | String evaluateContent = comActActEvaluateVO.getEvaluateContent(); |
| | | if (StrUtil.isNotBlank(evaluateContent)) { |
| | | String result = checkService.checkMessageBy(evaluateContent, openid, appId); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail("填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | |
| | | //微信图片审核 |
| | | String photo = comActActEvaluateVO.getPhoto(); |
| | | if (StrUtil.isNotBlank(photo)) { |
| | | if (!checkService.checkImageBy(photo, appId)) { |
| | | return R.fail("上传图片存在违规信息"); |
| | | } |
| | | } |
| | | return communityService.activityEvaluate(comActActEvaluateVO); |
| | | } |
| | | |
| | |
| | | required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | return communityService.getCityTreeByProvinceCode(provinceAdcode, null); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区详情", response = ComActVO.class) |
| | | @GetMapping("community") |
| | | public R detailCommunity() { |
| | |
| | | comActActivityVO.setHasPrize(0); |
| | | return communityService.addActivity(comActActivityVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "单位活动统计",response = ActivityAnalysisVO.class) |
| | | @GetMapping("activity/analysis") |
| | | public R activityUnitAnalysis(@RequestParam(value = "year",required = false) Integer year, |