Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test
Conflicts:
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | <!--minio文件存储--> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | | <artifactId>minio</artifactId> |
| | | <version>6.0.8</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveIndexVo; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveDetailVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComOperationDetailVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation("详情") |
| | | @ApiOperation(value = "详情",response = ComActReserveDetailVO.class) |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId,@RequestParam("isBack") Integer isBack){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId,isBack); |
| | |
| | | * @param pageUserReserveDTO |
| | | * @return |
| | | */ |
| | | @ApiOperation("我的预约/登记") |
| | | @ApiOperation(value = "我的预约/登记",response = ComActReserveAppletsVO.class) |
| | | @PostMapping("/userReserveList") |
| | | public R userReserveList(@RequestBody PageUserReserveDTO pageUserReserveDTO){ |
| | | pageUserReserveDTO.setUserId(this.getUserId()); |
| | |
| | | @ApiOperation("取消预约/登记") |
| | | @PostMapping("/cancelReserve") |
| | | public R userCancelReserve(@RequestBody CancelRecordDTO cancelRecordDTO){ |
| | | cancelRecordDTO.setUserId(this.getUserId()); |
| | | return communityService.userCancelReserve(cancelRecordDTO); |
| | | } |
| | | |
| | | /** |
| | | * 预约详情操作记录 |
| | | */ |
| | | @ApiOperation("预约详情操作记录") |
| | | @ApiOperation(value = "预约详情操作记录",response = ComOperationDetailVO.class) |
| | | @PostMapping("/detailOperation") |
| | | public R reserveOperation(@RequestBody OperationDetailDTO comActReserveOperationRecordDO){ |
| | | comActReserveOperationRecordDO.setUserId(this.getUserId()); |
| | | return communityService.reserveOperation(comActReserveOperationRecordDO); |
| | | } |
| | | |
| | | @ApiOperation(value = "预约登记列表",response = ComActReserveIndexVo.class) |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam("communityId") Long communityId){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.reserveListApplets(communityId); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.applets.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | public static void main(String[] args) { |
| | | // int nextInt = RandomUtils.nextInt(99999, 1000000); |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "发送验证码") |
| | | @PostMapping(value = "smscode") |
| | | public R smscode(@RequestBody UserPhoneVO userPhoneVO) { |
| | |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailActivity(id, userId); |
| | | return communityService.detailActivity(id, userId,null,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询活动评价记录", response = ComActActEvaluateVO.class) |
| | | @PostMapping("evaluate/page") |
| | | public R pageActivityEvaluates(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | return communityService.pageActivityEvaluates(comActActEvaluateVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动/志愿者活动签到") |
| | | @PostMapping("activity/sign-in") |
| | | public R activitySignIn(@RequestBody ComActActRegistVO comActActRegistVO) { |
| | | comActActRegistVO.setUserId(this.getUserId()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActActRegistVO.setUserId(loginUserInfo.getUserId()); |
| | | comActActRegistVO.setIsVolunteer(loginUserInfo.getIsVolunteer()); |
| | | return communityService.activitySignIn(comActActRegistVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动/志愿者活动评价") |
| | | @PostMapping("activity/evaluate") |
| | | public R activityEvaluate(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | comActActEvaluateVO.setUserId(this.getUserId()); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActActEvaluateVO.setUserId(loginUserInfo.getUserId()); |
| | | comActActEvaluateVO.setIsVolunteer(loginUserInfo.getIsVolunteer()); |
| | | return communityService.activityEvaluate(comActActEvaluateVO); |
| | | } |
| | | |
| | |
| | | signactivityVO.setUserId(userId); |
| | | R r = communityService.signActivity(signactivityVO); |
| | | if (R.isOk(r) && signactivityVO.getType().intValue() == 1) { |
| | | R r2 = communityService.detailActivity(activityId, userId); |
| | | R r2 = communityService.detailActivity(activityId, userId,null,null); |
| | | ComActActivityVO comActActivityVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r2.getData()), ComActActivityVO.class); |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | 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.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.DiscussVoteOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | |
| | | if (ObjectUtils.isEmpty(discussOptions)) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | if (discussOptions.size() < 2) { |
| | | return R.fail("请至少设置两个投票选项"); |
| | | } |
| | | //设置投票开始时间 nowDate |
| | | comActDiscussDTO.setStartTime(DateUtils.format(new Date(), DateUtils.ymdhms_format)); |
| | | } |
| | | String address = comActDiscussDTO.getAddress(); |
| | | if (ObjectUtils.isEmpty(address)) { |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comActDiscussDTO.setUserId(userId); |
| | | comActDiscussDTO.setCommunityId(communityId); |
| | | comActDiscussDTO.setIsApplets(true); |
| | | comActDiscussDTO.setLoginUserInfo(loginUserInfo); |
| | | return communityService.addDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-分页查询", response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | if (Objects.isNull(pageComActDiscussDTO.getType())) { |
| | | return R.fail("查询类型不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | pageComActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-投票") |
| | | @GetMapping("discussoptionuser") |
| | | @ApiImplicitParam(name = "id", value = "一起议选项主键", required = true) |
| | | public R addDiscussOptionUser(@RequestParam("id") Long id) { |
| | | if (null == id || 0 == id) { |
| | | @PostMapping("discussoptionuser") |
| | | public R addDiscussOptionUser(@RequestBody @Valid DiscussVoteOptionDTO discussVoteOptionDTO) { |
| | | List<Long> optionIds = discussVoteOptionDTO.getOptionIds(); |
| | | if (optionIds.isEmpty()) { |
| | | return R.fail("选项主键不能为空"); |
| | | } |
| | | ComActDiscussOptionUserDTO comActDiscussOptionUserDTO = new ComActDiscussOptionUserDTO(); |
| | | comActDiscussOptionUserDTO.setDiscussOptionId(id); |
| | | comActDiscussOptionUserDTO.setDiscussOptionIds(optionIds); |
| | | comActDiscussOptionUserDTO.setUserId(this.getUserId()); |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(id, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(2); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | optionIds.forEach(optionId -> { |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(optionId, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(2); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | }); |
| | | return communityService.addDiscussOptionUser(comActDiscussOptionUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-增加浏览量") |
| | | @PostMapping("discuss/increase-view-num") |
| | | public void increaseViewNum(@RequestParam("discussId") |
| | | @ApiParam(value = "一起议主键id", required = true) |
| | | Long discussId) { |
| | | communityService.increaseViewNum(discussId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-公布/编辑投票结果") |
| | | @PostMapping("discuss/edit-result") |
| | | public R editDiscussResult(@RequestBody @Validated(PutGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | comActDiscussDTO.setUserId(this.getUserId()); |
| | | return communityService.editDiscussResult(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-获取是否有发布权限", response = Boolean.class) |
| | | @GetMapping("discuss/permissions") |
| | | public R getDiscussPermissions() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | ComActDiscussDTO comActDiscussDTO = new ComActDiscussDTO(); |
| | | comActDiscussDTO.setLoginUserInfo(loginUserInfo); |
| | | comActDiscussDTO.setIsApplets(true); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.getDiscussPermissions(comActDiscussDTO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | 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.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: IdentityAuthApi 身份认证相关API |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 小程序端身份认证相关 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:00 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/identity-auth") |
| | | @Api(tags = {"身份认证"}) |
| | | public class IdentityAuthApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "查询社区身份认证方式", response = R.class) |
| | | @GetMapping("/mode") |
| | | public R getIdentityAuthMode(@RequestParam(value = "communityId") |
| | | @ApiParam(value = "社区id", required = true) |
| | | Long communityId, |
| | | @RequestParam(value = "identityAuthType") |
| | | @ApiParam(value = "身份认证类型", required = true) |
| | | Integer identityAuthType) { |
| | | return communityService.getIdentityAuthMode(communityId, identityAuthType); |
| | | } |
| | | |
| | | @ApiOperation(value = "身份认证获取EidToken接口") |
| | | @PostMapping("/getEidToken") |
| | | public R getEidToken(@RequestBody @Valid GetIdentityEidTokenDTO getIdentityEidTokenDTO) { |
| | | return communityService.getEidToken(getIdentityEidTokenDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增身份认证") |
| | | @PostMapping("/add") |
| | | public R addIdentityAuth(@RequestBody @Valid AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | addIdentityAuthDTO.setSubmitUserId(loginUserInfo.getUserId()); |
| | | addIdentityAuthDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.addIdentityAuth(addIdentityAuthDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询身份认证记录", response = IdentityAuthRecordDetailVO.class) |
| | | @PostMapping("/record/page") |
| | | public R queryRecordWithPage(@RequestBody @Valid PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | pageIdentityAuthRecordDTO.setSubmitUserId(this.getUserId()); |
| | | return communityService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取身份认证详情", response = IdentityAuthRecordDetailVO.class) |
| | | @GetMapping("/detail") |
| | | public R retrieveIdentityAuthDetail(@RequestParam("authType") |
| | | @ApiParam(value = "身份认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | Integer authType, |
| | | @RequestParam("identityAuthId") |
| | | @ApiParam(value = "身份认证id", required = true, example = "1") |
| | | Long identityAuthId) { |
| | | return communityService.retrieveIdentityAuthDetail(authType, identityAuthId); |
| | | } |
| | | } |
| | |
| | | } |
| | | comActMicroWishVO.setIsApplets(1); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWish(comActMicroWishVO); |
| | | return communityService.pageMicroWishApplets(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation("发布微心愿") |
| | |
| | | return communityService.getUserReward(userId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取首页弹窗接口", response = ComActEasyPhotoRewardVO.class) |
| | | @GetMapping("getUserRewards") |
| | | public R getUserRewards(@RequestParam("communityId") Long communityId) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getUserRewards(userId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "读取用户随手拍奖励") |
| | | @PostMapping("readUserReward") |
| | | public R readUserReward() { |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | @ApiOperation(value = "分页查询邻里圈列表", response = ComActNeighborCircleAppVO.class) |
| | | @PostMapping("pageApp") |
| | |
| | | public R addNeighborByApp(@RequestBody AddComActNeighborCircleAppDTO addNeighborCircleAppDTO) { |
| | | LoginUserInfoVO loginUser = this.getLoginUserInfo(); |
| | | Long userId = loginUser.getUserId(); |
| | | if (userId == null) { |
| | | Long communityId = loginUser.getCommunityId(); |
| | | if(userId == null){ |
| | | return R.fail("请重新登录"); |
| | | } |
| | | addNeighborCircleAppDTO.setUserId(userId); |
| | | if (StringUtils.isNotEmpty(loginUser.getPhone())) { |
| | | addNeighborCircleAppDTO.setPhone(this.getLoginUserInfo().getPhone()); |
| | | } |
| | | if (loginUser.getCommunityId() != null) { |
| | | addNeighborCircleAppDTO.setCommunityId(loginUser.getCommunityId()); |
| | | if(communityId != null){ |
| | | addNeighborCircleAppDTO.setCommunityId(communityId); |
| | | } |
| | | |
| | | //查询社区自动审核是否开着 |
| | | String key = NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE; |
| | | R isOk = communityService.getSysConfValue(key + communityId,communityId); |
| | | if(R.isOk(isOk)){ |
| | | if(isOk.getData() != null){ |
| | | String value = isOk.getData().toString(); |
| | | if(value.equals("1")){ |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no); |
| | | String msg = addNeighborCircleAppDTO.getReleaseContent(); |
| | | if (checkService.checkMessage(msg)) { |
| | | addNeighborCircleAppDTO.setWxExamineResult(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | | }else{ |
| | | addNeighborCircleAppDTO.setWxExamineResult(AddComActNeighborCircleAppDTO.isExamine.no); |
| | | } |
| | | }else{ |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | | } |
| | | }else{ |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1"); |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no); |
| | | } |
| | | }else{ |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | | } |
| | | |
| | | return communityService.addNeighborByApp(addNeighborCircleAppDTO); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId) { |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId |
| | | ,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero |
| | | ,@RequestParam(value = "name",defaultValue = "",required = false) String name) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId); |
| | | if(isZero == null){ |
| | | isZero = 2; |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId,isZero,name); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户新增邻里圈话题") |
| | | @PostMapping("topic/add") |
| | | public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail(401,"请先登录"); |
| | | } |
| | | circleTopicAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.addNeighborTopicByApp(circleTopicAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户删除邻里圈") |
| | | @PostMapping("delete") |
| | | public R deleteNeighborByApp(@RequestBody DeleteNeighborCircleAppDTO circleTopicAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail(401,"请先登录"); |
| | | } |
| | | circleTopicAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | return communityService.deleteNeighborByApp(circleTopicAppDTO); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import static java.util.stream.Collectors.toList; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.TreeSet; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | |
| | | if (!ObjectUtils.isEmpty(comActActivityVOS)) { |
| | | List<ComActActivityVO> collect = comActActivityVOS.stream() |
| | | .sorted(Comparator.comparing(ComActActivityVO::getSingDate).reversed()).collect(Collectors.toList()); |
| | | //当前用户最近签到时间 |
| | | //当前用户签到记录列表 |
| | | R r2 = communityService.listSignInActivity(userId); |
| | | if (R.isOk(r2) && !ObjectUtils.isEmpty(r2.getData())) { |
| | | ArrayList<ComActActRegistVO> comActActRegistVOS = JSONArray.parseArray(JSONArray.toJSONString(r2.getData()), ComActActRegistVO.class).stream() |
| | | .sorted(Comparator.comparing(ComActActRegistVO::getCreateAt).reversed()) |
| | | .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> |
| | | new TreeSet<>(Comparator.comparing(f -> String.join("", f.getUserId().toString(), f.getActivityId().toString())))), ArrayList::new)); |
| | | collect.forEach(comActActivityVO -> comActActRegistVOS.forEach(activitySignInVO -> { |
| | | if (comActActivityVO.getId().equals(activitySignInVO.getActivityId())) { |
| | | comActActivityVO.setActivitySignInDate(activitySignInVO.getCreateAt()); |
| | | List<ComActActRegistVO> comActActRegistVOS = JSONArray.parseArray(JSONArray.toJSONString(r2.getData()), ComActActRegistVO.class).stream() |
| | | .sorted(Comparator.comparing(ComActActRegistVO::getCreateAt).reversed()).collect(toList()); |
| | | collect.forEach(comActActivityVO -> { |
| | | ArrayList<ComActActRegistVO> currentList = new ArrayList<>(); |
| | | comActActRegistVOS.forEach(activitySignInVO -> { |
| | | if (comActActivityVO.getId().equals(activitySignInVO.getActivityId())) { |
| | | currentList.add(activitySignInVO); |
| | | } |
| | | }); |
| | | if (currentList.size() > 10) { |
| | | comActActivityVO.setActivitySignInList(currentList.subList(0, 10)); |
| | | } else { |
| | | comActActivityVO.setActivitySignInList(currentList); |
| | | } |
| | | })); |
| | | }); |
| | | } |
| | | //当前用户活动评分 |
| | | R r3 = communityService.listEvaluate(userId); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | } |
| | | return communityService.detailWorkGuide(workGuideId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南列表-按分类查询", response = ComActWorkGuideAppletsVO.class) |
| | | @PostMapping("list") |
| | | public R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return communityService.listWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南列表-按分类查询", response = ComActWorkGuideDetailAppletsVO.class) |
| | | @GetMapping("list/classify") |
| | | public R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId) { |
| | | return communityService.listWorkGuideByClassifyId(classifyId); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.api.LcApiConstants; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | public R pageDiscuss() throws Exception { |
| | | WxOfficialApi officialApi = new WxOfficialApi(); |
| | | |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | List<String> tokenList = new ArrayList<>(); |
| | | if (!appidList.isEmpty()) { |
| | | for (int i = 0; i < appidList.size(); i++) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<JSONObject> resultList = new ArrayList<>(); |
| | | Boolean newsListKey = stringRedisTemplate.hasKey(UserConstants.NEWS_LIST); |
| | | if(newsListKey != null && newsListKey){ |
| | | String json = valueOperations.get(UserConstants.NEWS_LIST); |
| | | resultList = JSON.parseArray(json,JSONObject.class); |
| | | return R.ok(resultList); |
| | | } |
| | | if (!tokenList.isEmpty()) { |
| | | tokenList.forEach(token -> { |
| | | for (String token:tokenList) { |
| | | try { |
| | | String url = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=" + token; |
| | | String result = getActicle(url); |
| | |
| | | String newsId = object.getString("media_id"); |
| | | JSONObject contentJson = JSON.parseObject(object.getString("content")); |
| | | List<JSONObject> newsItemList = |
| | | JSON.parseArray(contentJson.getString("news_item"), JSONObject.class); |
| | | JSON.parseArray(contentJson.getString("news_item"), JSONObject.class); |
| | | String newsUrl = newsItemList.get(0).getString("url"); |
| | | newsItemList.get(0).put("news_id", newsId); |
| | | contentJson.put("news_item", newsItemList); |
| | | object.put("content", contentJson); |
| | | |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | valueOperations.set(UserConstants.NEWS_ID + newsId, newsUrl + "", 2, TimeUnit.DAYS); |
| | | } |
| | | } |
| | |
| | | } catch (Exception e) { |
| | | log.error("通过token获取文章列表失败,错误原因:" + e.getMessage()); |
| | | } |
| | | }); |
| | | valueOperations.set(UserConstants.NEWS_LIST, resultList.toString(), 12, TimeUnit.HOURS); |
| | | } |
| | | } |
| | | return R.ok(resultList); |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio存储信息配置 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Data |
| | | @ConfigurationProperties(prefix = "minio") |
| | | public class MinioConfig { |
| | | |
| | | private String host; |
| | | |
| | | private String accessKey; |
| | | |
| | | private String secretKey; |
| | | |
| | | private String url; |
| | | |
| | | private String bucket; |
| | | |
| | | private String aliasName; |
| | | |
| | | private String aliasPCName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.minio.ObjectStat; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio工具类 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Component |
| | | @EnableConfigurationProperties(MinioConfig.class) |
| | | public class MinioUtil { |
| | | |
| | | @Resource |
| | | private MinioConfig minioProperties; |
| | | |
| | | public static byte[] toByteArray(InputStream input) throws IOException { |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[4096]; |
| | | int n = 0; |
| | | while (-1 != (n = input.read(buffer))) { |
| | | output.write(buffer, 0, n); |
| | | } |
| | | return output.toByteArray(); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传 |
| | | * |
| | | * @param file |
| | | * 要上传的文件 |
| | | * @return |
| | | */ |
| | | public String upload(MultipartFile file, String name) { |
| | | if (null != file) { |
| | | try { |
| | | UUID uuid = UUID.randomUUID(); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(uuid.toString().replace("-", "")).append("/"); |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | // bucket 不存在,创建 |
| | | if (!minioClient.bucketExists(minioProperties.getBucket())) { |
| | | minioClient.makeBucket(minioProperties.getBucket()); |
| | | } |
| | | // 得到文件流 |
| | | InputStream input = file.getInputStream(); |
| | | // 文件名 |
| | | // String fileName = uuid + "/images." + FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String fileName = s.append(name).toString(); |
| | | String contentType = file.getContentType(); |
| | | minioClient.putObject(minioProperties.getBucket(), fileName, input, contentType); |
| | | StringBuilder fileUrl = new StringBuilder(minioProperties.getUrl()); |
| | | String url = fileUrl.append(fileName).toString(); |
| | | return url; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public void download(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | ObjectStat stat = minioClient.statObject(minioProperties.getBucket(), fileName); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | response.setContentType(stat.contentType()); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); |
| | | IOUtils.copy(inputStream, response.getOutputStream()); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public byte[] getBytes(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | byte[] bytes = new byte[0]; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | bytes = toByteArray(inputStream); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return bytes; |
| | | } |
| | | } |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 10MB |
| | | max-request-size: 10MB |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | |
| | | server: |
| | | max-http-header-size: 10MB |
| | |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | <!--minio文件存储--> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | | <artifactId>minio</artifactId> |
| | | <version>6.0.8</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.applets_backstage.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @ApiOperation("新增广告") |
| | | @PostMapping("advertisement") |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "删除广告") |
| | | @DeleteMapping("advertisement") |
| | | public R deleteAdvertisement(@RequestParam("id") Long id) { |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.user.ComMngTagVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl = "http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | |
| | | required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | return communityService.getCityTreeByProvinceCode(provinceAdcode); |
| | | } |
| | | |
| | | @ApiOperation(value = "特殊群体/分页查询标签列表", response = ComMngTagVO.class) |
| | | @PostMapping("/special/tags/page") |
| | | public R specialInputUserTags(@RequestBody PageInputUserDTO comMngUserTagDTO) { |
| | | // Long communityId = this.getCommunityId(); |
| | | // comMngUserTagDTO.setCommunityId(communityId); |
| | | return userService.specialInputUserTags(comMngUserTagDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改特殊群体标签 |
| | | * |
| | | * @param comMngTagVO |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "特殊群体/新增或修改标签") |
| | | @PostMapping("/special/tags/save") |
| | | R saveSpecialInputUserTags(@RequestBody ComMngTagVO comMngTagVO) { |
| | | // Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | // comMngTagVO.setCommunityId(communityId); |
| | | return userService.saveSpecialInputUserTags(comMngTagVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除特殊群体标签 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "特殊群体/删除标签") |
| | | @DeleteMapping("/special/tags/delete") |
| | | R deleteSpecialInputUserTags(@RequestParam(value = "id") Long id) { |
| | | return userService.deleteSpecialInputUserTags(id); |
| | | } |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.applets_backstage.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl = "http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/upload/files", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导入便民服务") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return communityService.delectWorkGuide(workGuideId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询办事指南-分类管理 pageWorkGuideClassify 分页查询办事指南-分类管理 |
| | | * @param comActWorkGuideClassifyVO 查询参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @ApiOperation(value = "办事指南分类_分页查询", response = ComActWorkGuideClassifyVO.class) |
| | | @PostMapping("classify/apage") |
| | | public R pageWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | return communityService.pageWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南-分类管理新增或修改 addWorkGuideClassify 办事指南-分类管理新增或修改 |
| | | * @param comActWorkGuideClassifyVO 新增或修改参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @ApiOperation(value = "办事指南分类_新增或修改") |
| | | @PostMapping("classify/add") |
| | | public R addWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | return communityService.addWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南-分类管理删除 deleteWorkGuideClassify 办事指南-分类管理删除 |
| | | * @param workGuideClassifyId 办事指南-分类管理id |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @ApiOperation(value = "办事指南分类_删除") |
| | | @GetMapping("classify/delete") |
| | | public R deleteWorkGuideClassify(@RequestParam("workGuideClassifyId") Long workGuideClassifyId) { |
| | | return communityService.deleteWorkGuideClassify(workGuideClassifyId); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南-分类管理列表查询 getWorkGuideClassifyList 办事指南-分类管理列表查询 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @ApiOperation(value = "办事指南分类_列表查询") |
| | | @GetMapping("classify/getList") |
| | | public R getWorkGuideClassifyList() { |
| | | return communityService.getWorkGuideClassifyList(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio存储信息配置 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Data |
| | | @ConfigurationProperties(prefix = "minio") |
| | | public class MinioConfig { |
| | | |
| | | private String host; |
| | | |
| | | private String accessKey; |
| | | |
| | | private String secretKey; |
| | | |
| | | private String url; |
| | | |
| | | private String bucket; |
| | | |
| | | private String aliasName; |
| | | |
| | | private String aliasPCName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.config; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.minio.ObjectStat; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio工具类 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Component |
| | | @EnableConfigurationProperties(MinioConfig.class) |
| | | public class MinioUtil { |
| | | |
| | | @Resource |
| | | private MinioConfig minioProperties; |
| | | |
| | | public static byte[] toByteArray(InputStream input) throws IOException { |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[4096]; |
| | | int n = 0; |
| | | while (-1 != (n = input.read(buffer))) { |
| | | output.write(buffer, 0, n); |
| | | } |
| | | return output.toByteArray(); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传 |
| | | * |
| | | * @param file |
| | | * 要上传的文件 |
| | | * @return |
| | | */ |
| | | public String upload(MultipartFile file, String name) { |
| | | if (null != file) { |
| | | try { |
| | | UUID uuid = UUID.randomUUID(); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(uuid.toString().replace("-", "")).append("/"); |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | // bucket 不存在,创建 |
| | | if (!minioClient.bucketExists(minioProperties.getBucket())) { |
| | | minioClient.makeBucket(minioProperties.getBucket()); |
| | | } |
| | | // 得到文件流 |
| | | InputStream input = file.getInputStream(); |
| | | // 文件名 |
| | | // String fileName = uuid + "/images." + FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String fileName = s.append(name).toString(); |
| | | String contentType = file.getContentType(); |
| | | minioClient.putObject(minioProperties.getBucket(), fileName, input, contentType); |
| | | StringBuilder fileUrl = new StringBuilder(minioProperties.getUrl()); |
| | | String url = fileUrl.append(fileName).toString(); |
| | | return url; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public void download(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | ObjectStat stat = minioClient.statObject(minioProperties.getBucket(), fileName); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | response.setContentType(stat.contentType()); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); |
| | | IOUtils.copy(inputStream, response.getOutputStream()); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public byte[] getBytes(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | byte[] bytes = new byte[0]; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | bytes = toByteArray(inputStream); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return bytes; |
| | | } |
| | | } |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 10MB |
| | | max-request-size: 10MB |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | |
| | | eureka: |
| | | client: |
| | |
| | | public LoginReturnVO loginCgBackage(String account, String password){ |
| | | Authentication authentication = null; |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_8", password)); |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_9", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | |
| | | * 获取token |
| | | */ |
| | | public static final String GRID_GET_TOKEN_URL = |
| | | "http://171.217.92.33:53303/aaToken?username=#username&password=#password"; |
| | | "/aaToken?username=#username&password=#password"; |
| | | /** |
| | | * 提交事件登记(自处) |
| | | */ |
| | | public static final String GRID_REGIST_EVENT_URL = "http://171.217.92.33:53303/businessData/registEventInfo"; |
| | | public static final String GRID_REGIST_EVENT_URL = "/businessData/registEventInfo"; |
| | | /** |
| | | * 上传附件,仅上传文件流,服务器根据文件名自行匹配 |
| | | */ |
| | | public static final String GRID_EVENT_FILE_UPLOAD_URL = "http://171.217.92.33:53303/businessData/upload"; |
| | | public static final String GRID_EVENT_FILE_UPLOAD_URL = "/businessData/upload"; |
| | | /** |
| | | * 事件类型获取 |
| | | */ |
| | | public static final String GRID_EVENT_CATEGORY_URL = "http://171.217.92.33:53303/businessData/getEventType"; |
| | | public static final String GRID_EVENT_CATEGORY_URL = "/businessData/getEventType"; |
| | | /** |
| | | * 事件查询接口 |
| | | */ |
| | | public static final String GRID_EVENT_INFO_URL = "http://171.217.92.33:53303/businessData/getEventListInfo"; |
| | | public static final String GRID_EVENT_INFO_URL = "/businessData/getEventListInfo"; |
| | | /** |
| | | * 获取指定APP登记事件详情信息 |
| | | */ |
| | | public static final String GRID_EVENT_INFO_DETAIL_URL = "http://171.217.92.33:53303/businessData/getEventDetails"; |
| | | public static final String GRID_EVENT_INFO_DETAIL_URL = "/businessData/getEventDetails"; |
| | | /** |
| | | * 获取指定事件信息 |
| | | */ |
| | | public static final String GRID_APP_EVENT_INFO_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getAppointEventInfo"; |
| | | "/businessData/getAppointEventInfo"; |
| | | /** |
| | | * 通过AREAID获取辖区网格树 |
| | | */ |
| | | public static final String GRID_GET_EVENT_INFO_AREA_ID_URL = |
| | | "http://171.217.92.33:53303/area/getAreaGridTreeByAreaId"; |
| | | "/area/getAreaGridTreeByAreaId"; |
| | | /** |
| | | * 通过AREAID获取辖区网格数据列表 |
| | | */ |
| | | public static final String GRID_GET_GRID_DATA_AREA_ID_URL = |
| | | "http://171.217.92.33:53303/gridDefined/getGridInfoByAreaId"; |
| | | "/gridDefined/getGridInfoByAreaId"; |
| | | /** |
| | | * 获取所有或者根据姓名和工号查询,分页 |
| | | */ |
| | | public static final String GRID_GET_GETALL_SEARCH_PAGE_URL = |
| | | "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp"; |
| | | "/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp"; |
| | | /** |
| | | * 流动人口 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_PAGE_URL = |
| | | "http://171.217.92.33:53303/businessData/getFPVisitRecordByPageApp"; |
| | | "/businessData/getFPVisitRecordByPageApp"; |
| | | |
| | | /** |
| | | * 下面的接口全部都是走访任务接口 |
| | |
| | | * 流动人口 走访详情(民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getFPVisitRecordDetailByIdApp"; |
| | | "/businessData/getFPVisitRecordDetailByIdApp"; |
| | | /** |
| | | * 流动人口 添加走访记录 (民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_SAVE_URL = |
| | | "http://171.217.92.33:53303/businessData/saveFpVisitRecordAppDock"; |
| | | "/businessData/saveFpVisitRecordAppDock"; |
| | | /** |
| | | * 重点人员 日常管理 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_PAGE_URL = |
| | | "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordByPageApp"; |
| | | "/businessData/getKeyPersonVisitRecordByPageApp"; |
| | | /** |
| | | * 重点人员 日常管理 走访详情 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordDetailByIdApp"; |
| | | "/businessData/getKeyPersonVisitRecordDetailByIdApp"; |
| | | /** |
| | | * 重点人员 日常管理 添加走访记录 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL = |
| | | "http://171.217.92.33:53303/businessData/saveKeyPersonVisitRecordAppDock"; |
| | | "/businessData/saveKeyPersonVisitRecordAppDock"; |
| | | |
| | | private LcApiConstants() { |
| | | throw new IllegalStateException("Utility class"); |
| | |
| | | |
| | | public static final String LOWSECURITY_POPULATION_ERROR_LIST = "LOWSECURITY_POPULATION_ERROR_LIST_"; |
| | | |
| | | public static final String ELDER_POPULATION_ERROR_LIST = "ELDER_POPULATION_ERROR_LIST_"; |
| | | |
| | | public static final String PENSION_POPULATION_ERROR_LIST = "PENSION_POPULATION_ERROR_LIST_"; |
| | | |
| | | public static final String ELDER_RECORD_ERROR_LIST = "ELDER_RECORD_ERROR_LIST_"; |
| | | |
| | | public static final String PENSION_RECORD_ERROR_LIST = "PENSION_RECORD_ERROR_LIST_"; |
| | | |
| | | /** |
| | | * 高德地图获取天气url |
| | | */ |
| | |
| | | * 高德地图获取天气key |
| | | */ |
| | | public static final String G_D_WEATHER_KEY = "02019a956b118ac7956c8539ab02b0f5"; |
| | | |
| | | /** |
| | | * 社区议事投票小程序身份验证参数默认key |
| | | */ |
| | | public static final String DISCUSS_IDENTITY_KEY = "DISCUSS_IDENTITY_"; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer EIGHTY = 80; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer NINETY = 90; |
| | | /** |
| | | * 常量 |
| | | */ |
| | | public static final Integer ONE_HUNDRED = 100; |
| | | } |
| | |
| | | |
| | | /** text/xml */ |
| | | public static final String TEXT_XML = "text/xml"; |
| | | |
| | | /** 内江服务进出记录查询接口 */ |
| | | public static final String NEIJIANG_URL = "https://mzj.scnjdx.gov.cn/proxy/comActCameraRecord/queryAll"; |
| | | |
| | | /** 测试服务报警记录查询接口 */ |
| | | public static final String CALL_THE_POLICE_URL = "http://test.panzhihua.nhys.cdnhxx.com/api/communitybackstage/comPropertyAlarm/queryAll/noToken"; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.constants; |
| | | |
| | | /** |
| | | * 邻里圈常量类 |
| | | */ |
| | | public class NeighborCircleConstants { |
| | | |
| | | /** |
| | | * 浏览变动热度值 |
| | | */ |
| | | public static final Long VIEW_HOT_NUM = 1L; |
| | | /** |
| | | * 点赞变动热度值 |
| | | */ |
| | | public static final Long FABULOUS_HOT_NUM = 2L; |
| | | /** |
| | | * 评论变动热度值 |
| | | */ |
| | | public static final Long COMMENT_HOT_NUM = 3L; |
| | | |
| | | /** |
| | | * 邻里圈自动审核状态KEY(value:1.自动审核 2.需要社区审核) |
| | | */ |
| | | public static final String NEIGHBOR_CIRCLE_AUTO_EXAMINE = "NEIGHBOR_CIRCLE_AUTO_EXAMINE_"; |
| | | } |
| | |
| | | public static final String LOGIN_USER_INFO = "login_user_info:"; |
| | | public static final String PHONE_PUT = "phone_put:"; |
| | | public static final String NEWS_ID = "news_media_id:"; |
| | | |
| | | public static final String NEWS_LIST = "news_list:"; |
| | | } |
| | |
| | | */ |
| | | public static final String HDJJKS_ID = "__0i0e8-yfDGW3jv3l-qobcWt23Ec3iZEdJhMV3nHWo"; |
| | | /** |
| | | * 预约提醒通知模板id |
| | | */ |
| | | public static final String YYTX_ID = "KZtj9-KaqcDrKfZnNvv8A_bK4StEUtzLcOo0fhPjWNM"; |
| | | /** |
| | | * 跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 |
| | | */ |
| | | public static final String MINIPROGRAM_STATE = "trial"; |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityApprovalStatusEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证审核状态枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 11:26 |
| | | */ |
| | | @Getter |
| | | public enum IdentityApprovalStatusEnum { |
| | | /** |
| | | * 待审核 |
| | | */ |
| | | PENDING_REVIEW(1), |
| | | /** |
| | | * 驳回 |
| | | */ |
| | | REFUSE(2), |
| | | /** |
| | | * 通过 |
| | | */ |
| | | PASS_THROUGH(3); |
| | | |
| | | private int status; |
| | | |
| | | IdentityApprovalStatusEnum(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthMethodEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证方式枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 13:11 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthMethodEnum { |
| | | /** |
| | | * 视频认证 |
| | | */ |
| | | VIDEO_AUTH(1), |
| | | /** |
| | | * 人脸核验 |
| | | */ |
| | | FACE_AUTH(2), |
| | | /** |
| | | * 线下认证 |
| | | */ |
| | | OFFLINE_AUTH(3); |
| | | |
| | | private int method; |
| | | |
| | | IdentityAuthMethodEnum(int method) { |
| | | this.method = method; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthStatusEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证认证状态枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 11:30 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthStatusEnum { |
| | | /** |
| | | * 已认证 |
| | | */ |
| | | CERTIFIED(1), |
| | | /** |
| | | * 未认证 |
| | | */ |
| | | NOT_CERTIFIED(0); |
| | | |
| | | private int status; |
| | | |
| | | IdentityAuthStatusEnum(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @title: IdentityAuthTypeEnum |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证类型枚举类 |
| | | * @author: hans |
| | | * @date: 2021/09/14 10:40 |
| | | */ |
| | | @Getter |
| | | public enum IdentityAuthTypeEnum { |
| | | /** |
| | | * 高龄认证 |
| | | */ |
| | | ELDER_AUTH(1), |
| | | /** |
| | | * 养老认证 |
| | | */ |
| | | PENSION_AUTH(2); |
| | | |
| | | private int type; |
| | | |
| | | IdentityAuthTypeEnum(int type) { |
| | | this.type = type; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.BcDictionaryConstants; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.BcDictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDrugExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDrugMistakeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 高龄认证线下认证居民导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComElderAuthRecordImportExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComElderAuthRecordImportExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | log.info("开始导入线下认证居民数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.ELDER_RECORD_ERROR_LIST + communityId; |
| | | |
| | | int index = 2; |
| | | try { |
| | | String[] parsePatterns = new String[] {"yyyy-MM-dd", "yyyy-M-dd", "yyyy-MM-d", "yyyy-M-d", "yyyy/MM/dd", |
| | | "yyyy/M/dd", "yyyy/MM/d", "yyyy/M/d"}; |
| | | ArrayList<ComElderAuthRecordImportExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComElderAuthRecordImportMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComElderAuthRecordImportExcelVO vo = new ComElderAuthRecordImportExcelVO(); |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIdCard(oneData.get(1).toUpperCase()); |
| | | // 根据身份证号码解析年龄以及性别 |
| | | // 获取用户生日 |
| | | String birthday = vo.getIdCard().substring(6, 14); |
| | | if (StringUtils.isNotEmpty(birthday)) { |
| | | String year = birthday.substring(0, 4); |
| | | String month = birthday.substring(4, 6); |
| | | String day = birthday.substring(6, 8); |
| | | vo.setBirthday(year + "-" + month + "-" + day); |
| | | } |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | // 获取用户性别 |
| | | int sex = Integer.parseInt(vo.getIdCard().substring(16, 17)); |
| | | if (sex % 2 == 1) { |
| | | vo.setSex(PopulSexEnum.nan.getCode()); |
| | | } else { |
| | | vo.setSex(PopulSexEnum.nv.getCode()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | vo.setPhone(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setNowAddress(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证时间不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthDate(DateUtil.parse(oneData.get(4).trim(), parsePatterns)); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证期数不能为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthPeriod(oneData.get(5)); |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setMark(oneData.get(6)); |
| | | } |
| | | |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSaveElderAuthRecordExcelVO(voList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComElderAuthRecordImportMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComElderAuthRecordImportMistakeExcelVO.class); |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行"); |
| | | // importErrorVO.setErrorMsg("数据格式有误,请检查文档内数据"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | log.error("数据格式有误,第" + index + "行"); |
| | | throw new ServiceException("500", "导入失败111"); |
| | | } |
| | | } |
| | | |
| | | private void setElderAuthMistake(Map<Integer, String> map, ComElderAuthRecordImportMistakeExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setIdCard(map.get(1)); |
| | | vo.setPhone(map.get(2)); |
| | | vo.setNowAddress(map.get(3)); |
| | | vo.setAuthDate(map.get(4)); |
| | | vo.setAuthPeriod(map.get(5)); |
| | | vo.setMark(map.get(6)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.BcDictionaryConstants; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.BcDictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationElderExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationElderMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMistakeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * title: ComMngPopulationElderExcelListen 高龄老人导入监听 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人导入监听 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 15:12 |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationElderExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComMngPopulationElderExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入高龄老人数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.ELDER_POPULATION_ERROR_LIST; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | | // Map<String,Integer> dictMap = new HashMap<>(); |
| | | // for(BcDictionaryVO vo : dictionaryR.getData()){ |
| | | // dictMap.put(vo.getDictName(),Integer.valueOf(vo.getDictValue())); |
| | | // } |
| | | |
| | | int index = 2; |
| | | try { |
| | | String[] parsePatterns = new String[] {"yyyy-MM-dd", "yyyy-M-dd", "yyyy-MM-d", "yyyy-M-d", "yyyy/MM/dd", |
| | | "yyyy/M/dd", "yyyy/MM/d", "yyyy/M/d"}; |
| | | ArrayList<ComMngPopulationElderExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationElderMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationElderExcelVO vo = new ComMngPopulationElderExcelVO(); |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(1).toUpperCase()); |
| | | // 根据身份证号码解析年龄以及性别 |
| | | // 获取用户生日 |
| | | String birthday = vo.getCardNo().substring(6, 14); |
| | | if (StringUtils.isNotEmpty(birthday)) { |
| | | String year = birthday.substring(0, 4); |
| | | String month = birthday.substring(4, 6); |
| | | String day = birthday.substring(6, 8); |
| | | vo.setBirthday(year + "-" + month + "-" + day); |
| | | } |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | // 获取用户性别 |
| | | int sex = Integer.parseInt(vo.getCardNo().substring(16, 17)); |
| | | if (sex % 2 == 1) { |
| | | vo.setSex(PopulSexEnum.nan.getCode()); |
| | | } else { |
| | | vo.setSex(PopulSexEnum.nv.getCode()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | vo.setNation(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的政治面貌有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPoliticalOutlook(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(4)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | // setElderMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setFloor(oneData.get(7).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | // setElderMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setUnitNo(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | // setElderMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setHouseNo(oneData.get(9).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(10).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(11).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(12)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | vo.setPhone(oneData.get(13).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | vo.setNativePlace(oneData.get(14).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(16)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } else { |
| | | vo.setMarriage(isOk); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setHealthy(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(18)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setCensusRegister(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(20)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的高龄老人登记(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRegister(isOk); |
| | | } else { |
| | | vo.setIsRegister(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(21)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | index++; |
| | | setElderMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setReceiveAllowanceBegin(DateUtil.parse(oneData.get(22).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setNowAddress(oneData.get(23).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setRemark(oneData.get(24).trim()); |
| | | } |
| | | vo.getUserTagStr().add("高龄老人"); |
| | | for (int i = 25; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | // 将重复的数据进行MD5加密实现去重 |
| | | String distinct = vo.getName() + vo.getCardNo() + vo.getRoad() + vo.getDoorNo() + vo.getFloor() |
| | | + vo.getUnitNo() + vo.getHouseNo(); |
| | | try { |
| | | String distinctPass = PayUtil.MD5(distinct); |
| | | if (StringUtils.isNotEmpty(distinctPass)) { |
| | | vo.setDistinctPass(distinctPass); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("组装MD5加密字段失败,数据表格行数:" + index); |
| | | continue; |
| | | } |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | // 客户需要暂时注释,等客户处理完成需要恢复 |
| | | // if(populationImportErrorVOList.isEmpty()){ |
| | | // R r = communityService.listSavePopulationServeExcelVO(voList, communityId); |
| | | // if (!R.isOk(r)) { |
| | | // throw new ServiceException(r.getMsg()); |
| | | // } |
| | | // }else{ |
| | | // throw new ServiceException("500", JSON.toJSONString(populationImportErrorVOList)); |
| | | // } |
| | | // 根据list中的IdCard城市来去重 |
| | | List<ComMngPopulationElderExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationElderExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationElderExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationElderMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationElderMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = |
| | | // JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | // } |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行"); |
| | | // importErrorVO.setErrorMsg("数据格式有误,请检查文档内数据"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | log.error("数据格式有误,第" + index + "行"); |
| | | throw new ServiceException("500", "导入失败111"); |
| | | } |
| | | } |
| | | |
| | | private void setElderMistake(Map<Integer, String> map, ComMngPopulationElderMistakeExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setCardNo(map.get(1)); |
| | | vo.setNation(map.get(2)); |
| | | vo.setPoliticalOutlook(map.get(3)); |
| | | vo.setIsRent(map.get(4)); |
| | | vo.setRoad(map.get(5)); |
| | | vo.setDoorNo(map.get(6)); |
| | | vo.setFloor(map.get(7)); |
| | | vo.setUnitNo(map.get(8)); |
| | | vo.setHouseNo(map.get(9)); |
| | | vo.setHouseStatus(map.get(10)); |
| | | vo.setHousePurpose(map.get(11)); |
| | | vo.setControlStatus(map.get(12)); |
| | | vo.setPhone(map.get(13)); |
| | | vo.setNativePlace(map.get(14)); |
| | | vo.setCultureLevel(map.get(15)); |
| | | vo.setMarriage(map.get(16)); |
| | | vo.setHealthy(map.get(17)); |
| | | vo.setOutOrLocal(map.get(18)); |
| | | vo.setCensusRegister(map.get(19)); |
| | | vo.setIsRegister(map.get(20)); |
| | | vo.setIsAlive(map.get(21)); |
| | | vo.setReceiveAllowanceBegin(map.get(22)); |
| | | vo.setNowAddress(map.get(23)); |
| | | vo.setRemark(map.get(24)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.BcDictionaryConstants; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.BcDictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationPensionExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationPensionMistakeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * title: ComMngPopulationPensionExcelListen 养老金人员导入监听 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 养老金人员导入监听 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 15:12 |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationPensionExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComMngPopulationPensionExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入养老金人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.PENSION_POPULATION_ERROR_LIST; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | | // Map<String,Integer> dictMap = new HashMap<>(); |
| | | // for(BcDictionaryVO vo : dictionaryR.getData()){ |
| | | // dictMap.put(vo.getDictName(),Integer.valueOf(vo.getDictValue())); |
| | | // } |
| | | |
| | | int index = 2; |
| | | try { |
| | | String[] parsePatterns = new String[] {"yyyy-MM-dd", "yyyy-M-dd", "yyyy-MM-d", "yyyy-M-d", "yyyy/MM/dd", |
| | | "yyyy/M/dd", "yyyy/MM/d", "yyyy/M/d"}; |
| | | ArrayList<ComMngPopulationPensionExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationPensionMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationPensionExcelVO vo = new ComMngPopulationPensionExcelVO(); |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(1).toUpperCase()); |
| | | // 根据身份证号码解析年龄以及性别 |
| | | // 获取用户生日 |
| | | String birthday = vo.getCardNo().substring(6, 14); |
| | | if (StringUtils.isNotEmpty(birthday)) { |
| | | String year = birthday.substring(0, 4); |
| | | String month = birthday.substring(4, 6); |
| | | String day = birthday.substring(6, 8); |
| | | vo.setBirthday(year + "-" + month + "-" + day); |
| | | } |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | // 获取用户性别 |
| | | int sex = Integer.parseInt(vo.getCardNo().substring(16, 17)); |
| | | if (sex % 2 == 1) { |
| | | vo.setSex(PopulSexEnum.nan.getCode()); |
| | | } else { |
| | | vo.setSex(PopulSexEnum.nv.getCode()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | vo.setNation(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的政治面貌有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPoliticalOutlook(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(4)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | // setPensionMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setFloor(oneData.get(7).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | // setPensionMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setUnitNo(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | // setPensionMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setHouseNo(oneData.get(9).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(10).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(11).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(12)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | vo.setPhone(oneData.get(13).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | vo.setNativePlace(oneData.get(14).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(16)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } else { |
| | | vo.setMarriage(isOk); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setHealthy(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(18)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setCensusRegister(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(20)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的养老登记(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRegister(isOk); |
| | | } else { |
| | | vo.setIsRegister(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(21)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | index++; |
| | | setPensionMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setReceiveAllowanceBegin(DateUtil.parse(oneData.get(22).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setNowAddress(oneData.get(23).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setRemark(oneData.get(24).trim()); |
| | | } |
| | | vo.getUserTagStr().add("养老金人员"); |
| | | for (int i = 25; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | // 将重复的数据进行MD5加密实现去重 |
| | | String distinct = vo.getName() + vo.getCardNo() + vo.getRoad() + vo.getDoorNo() + vo.getFloor() |
| | | + vo.getUnitNo() + vo.getHouseNo(); |
| | | try { |
| | | String distinctPass = PayUtil.MD5(distinct); |
| | | if (StringUtils.isNotEmpty(distinctPass)) { |
| | | vo.setDistinctPass(distinctPass); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("组装MD5加密字段失败,数据表格行数:" + index); |
| | | continue; |
| | | } |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | // 客户需要暂时注释,等客户处理完成需要恢复 |
| | | // if(populationImportErrorVOList.isEmpty()){ |
| | | // R r = communityService.listSavePopulationServeExcelVO(voList, communityId); |
| | | // if (!R.isOk(r)) { |
| | | // throw new ServiceException(r.getMsg()); |
| | | // } |
| | | // }else{ |
| | | // throw new ServiceException("500", JSON.toJSONString(populationImportErrorVOList)); |
| | | // } |
| | | // 根据list中的IdCard城市来去重 |
| | | List<ComMngPopulationPensionExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationPensionExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationPensionExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationPensionMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationPensionMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = |
| | | // JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | // } |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行"); |
| | | // importErrorVO.setErrorMsg("数据格式有误,请检查文档内数据"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | log.error("数据格式有误,第" + index + "行"); |
| | | throw new ServiceException("500", "导入失败111"); |
| | | } |
| | | } |
| | | |
| | | private void setPensionMistake(Map<Integer, String> map, ComMngPopulationPensionMistakeExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setCardNo(map.get(1)); |
| | | vo.setNation(map.get(2)); |
| | | vo.setPoliticalOutlook(map.get(3)); |
| | | vo.setIsRent(map.get(4)); |
| | | vo.setRoad(map.get(5)); |
| | | vo.setDoorNo(map.get(6)); |
| | | vo.setFloor(map.get(7)); |
| | | vo.setUnitNo(map.get(8)); |
| | | vo.setHouseNo(map.get(9)); |
| | | vo.setHouseStatus(map.get(10)); |
| | | vo.setHousePurpose(map.get(11)); |
| | | vo.setControlStatus(map.get(12)); |
| | | vo.setPhone(map.get(13)); |
| | | vo.setNativePlace(map.get(14)); |
| | | vo.setCultureLevel(map.get(15)); |
| | | vo.setMarriage(map.get(16)); |
| | | vo.setHealthy(map.get(17)); |
| | | vo.setOutOrLocal(map.get(18)); |
| | | vo.setCensusRegister(map.get(19)); |
| | | vo.setIsRegister(map.get(20)); |
| | | vo.setIsAlive(map.get(21)); |
| | | vo.setReceiveAllowanceBegin(map.get(22)); |
| | | vo.setNowAddress(map.get(23)); |
| | | vo.setRemark(map.get(24)); |
| | | } |
| | | } |
| | |
| | | vo.setOriginalTerm(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setSentenceBegin(DateUtil.parse(oneData.get(23).trim())); |
| | | vo.setSentenceBegin(DateUtil.parse(oneData.get(23).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setOriginalCharge(oneData.get(24).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | vo.setSentenceEnd(DateUtil.parse(oneData.get(25).trim())); |
| | | vo.setSentenceEnd(DateUtil.parse(oneData.get(25).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setSentencePlace(oneData.get(26).trim()); |
| | |
| | | vo.setRiskAssessment(oneData.get(27).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | vo.setJoinDate(DateUtil.parse(oneData.get(28).trim())); |
| | | vo.setJoinDate(DateUtil.parse(oneData.get(28).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(29))) { |
| | | vo.setJoinSituation(oneData.get(29).trim()); |
| | |
| | | vo.setPlaceSituation(oneData.get(32).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(33))) { |
| | | vo.setPlaceDate(DateUtil.parse(oneData.get(33).trim())); |
| | | vo.setPlaceDate(DateUtil.parse(oneData.get(33).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(34))) { |
| | | vo.setNotPlaceReason(oneData.get(34).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(35))) { |
| | | try { |
| | | vo.setHelpBegin(DateUtil.parse(oneData.get(35).trim())); |
| | | vo.setHelpBegin(DateUtil.parse(oneData.get(35).trim(), parsePatterns)); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(36))) { |
| | | try { |
| | | vo.setHelpEnd(DateUtil.parse(oneData.get(36).trim())); |
| | | vo.setHelpEnd(DateUtil.parse(oneData.get(36).trim(), parsePatterns)); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
New file |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.BcDictionaryConstants; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.PopulHouseUseEnum; |
| | | import com.panzhihua.common.enums.PopulSexEnum; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.BcDictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordImportExcelListen |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老线下认证导入监听 |
| | | * @author: txb |
| | | * @date: 2021/09/08 09:16 |
| | | */ |
| | | @Slf4j |
| | | public class ComPensionAuthRecordImportExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | private static int headSize = 0; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | private CommunityService communityService; |
| | | private Long communityId; |
| | | private Long userId; |
| | | private Map<Integer, String> headData; |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public ComPensionAuthRecordImportExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入线下认证居民数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("100", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.PENSION_RECORD_ERROR_LIST + + communityId; |
| | | |
| | | Map<String, String> dictMap = dictionaryR.getData().stream() |
| | | .collect(Collectors.toMap(BcDictionaryVO::getDictName, BcDictionaryVO::getDictValue)); |
| | | // Map<String,Integer> dictMap = new HashMap<>(); |
| | | // for(BcDictionaryVO vo : dictionaryR.getData()){ |
| | | // dictMap.put(vo.getDictName(),Integer.valueOf(vo.getDictValue())); |
| | | // } |
| | | |
| | | int index = 2; |
| | | try { |
| | | String[] parsePatterns = new String[] {"yyyy-MM-dd", "yyyy-M-dd", "yyyy-MM-d", "yyyy-M-d", "yyyy/MM/dd", |
| | | "yyyy/M/dd", "yyyy/MM/d", "yyyy/M/d"}; |
| | | ArrayList<ComPensionAuthRecordImportExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComPensionAuthRecordImportMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComPensionAuthRecordImportExcelVO vo = new ComPensionAuthRecordImportExcelVO(); |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | index++; |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIdCard(oneData.get(1).toUpperCase()); |
| | | // 根据身份证号码解析年龄以及性别 |
| | | // 获取用户生日 |
| | | String birthday = vo.getIdCard().substring(6, 14); |
| | | if (StringUtils.isNotEmpty(birthday)) { |
| | | String year = birthday.substring(0, 4); |
| | | String month = birthday.substring(4, 6); |
| | | String day = birthday.substring(6, 8); |
| | | vo.setBirthday(year + "-" + month + "-" + day); |
| | | } |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | // 获取用户性别 |
| | | int sex = Integer.parseInt(vo.getIdCard().substring(16, 17)); |
| | | if (sex % 2 == 1) { |
| | | vo.setSex(PopulSexEnum.nan.getCode()); |
| | | } else { |
| | | vo.setSex(PopulSexEnum.nv.getCode()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | vo.setPhone(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setNowAddress(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证时间不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthDate(DateUtil.parse(oneData.get(4).trim(), parsePatterns)); |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("认证期数不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setAuthPeriod(oneData.get(5)); |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setMark(oneData.get(6)); |
| | | } |
| | | |
| | | voList.add(vo); |
| | | index++; |
| | | } |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePensionAuthRecordExcelVO(voList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComPensionAuthRecordImportMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComPensionAuthRecordImportMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = |
| | | // JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | // } |
| | | mistakes.addAll(list); |
| | | log.info("将错误数据存入redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", key); |
| | | } |
| | | } |
| | | } catch (NumberFormatException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行"); |
| | | // importErrorVO.setErrorMsg("数据格式有误,请检查文档内数据"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | log.error("数据格式有误,第" + index + "行"); |
| | | throw new ServiceException("500", "导入失败111"); |
| | | } |
| | | } |
| | | |
| | | private void setPensionAuthMistake(Map<Integer, String> map, ComPensionAuthRecordImportMistakeExcelVO vo) { |
| | | vo.setName(map.get(0)); |
| | | vo.setIdCard(map.get(1)); |
| | | vo.setPhone(map.get(2)); |
| | | vo.setNowAddress(map.get(3)); |
| | | vo.setAuthDate(map.get(4)); |
| | | vo.setIsAlive(map.get(5)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: AddIdentityAuthDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增身份认证 |
| | | * @author: hans |
| | | * @date: 2021/09/03 9:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增身份认证参数") |
| | | @EncryptDecryptClass |
| | | public class AddIdentityAuthDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "姓名", required = true, example = "张三") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | @NotBlank(message = "姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号", required = true, example = "511321199503241233") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | @NotBlank(message = "身份证号码不能为空") |
| | | @Size(min = 18, max = 18, message = "请输入18位有效身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "现居住地址", required = true, example = "双流小区") |
| | | @NotBlank(message = "居住地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频url,视频认证时需传入", example = "http://test.video.html") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "用户eidToken,人脸核验时需传入") |
| | | private String eidToken; |
| | | |
| | | @ApiModelProperty(value = "提交用户", hidden = true) |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "人脸核身结果数据", hidden = true) |
| | | private String verificationResult; |
| | | |
| | | @ApiModelProperty(value = "身份认证方式 1.视频认证 2.人脸认证 3.线下认证", hidden = true) |
| | | private Integer authMethod = 1; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | } |
| | |
| | | private String remark; |
| | | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议新增编辑 |
| | | * @description: 议事投票新增编辑 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 15:34 |
| | | **/ |
| | | @Data |
| | | @ApiModel("一起议新增编辑") |
| | | @ApiModel("议事投票新增编辑") |
| | | public class ComActDiscussDTO { |
| | | @ApiModelProperty("主键") |
| | | @NotNull(message = "一起议id不能为空", groups = {PutGroup.class}) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("主题") |
| | | @NotBlank(groups = {AddGroup.class}, message = "主题不能为空") |
| | | private String discussSubject; |
| | | |
| | | @ApiModelProperty("类型 1 图文 2 投票") |
| | | @ApiModelProperty("类型 1 议事 2 投票") |
| | | @Min(value = 1, groups = {AddGroup.class}, message = "类型不能为空") |
| | | private Integer type; |
| | | |
| | |
| | | @ApiModelProperty("选项集合") |
| | | private List<ComActDiscussOptionDTO> discussOptions; |
| | | |
| | | @ApiModelProperty(value = "单张图片宽度") |
| | | private BigDecimal imgWidth; |
| | | |
| | | @ApiModelProperty(value = "单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | |
| | | @ApiModelProperty(value = "投票开始时间(格式:yyyy-MM-dd HH:mm:ss)") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "投票结束时间(格式:yyyy-MM-dd HH:mm:ss)") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "是否可重复投票(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty(value = "每人可投票数") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty(value = "是否是小程序用户", hidden = true) |
| | | private Boolean isApplets; |
| | | |
| | | @ApiModelProperty(value = "当前登录用户信息", hidden = true) |
| | | private LoginUserInfoVO loginUserInfo; |
| | | |
| | | @ApiModelProperty("投票结果") |
| | | @NotBlank(message = "投票结果不能为空", groups = {PutGroup.class}) |
| | | private String publishResult; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 选项投票 |
| | |
| | | @ApiModel("选项投票") |
| | | public class ComActDiscussOptionUserDTO { |
| | | |
| | | @ApiModelProperty("一起议选项id") |
| | | private Long discussOptionId; |
| | | @ApiModelProperty("一起议选项id集合") |
| | | private List<Long> discussOptionIds; |
| | | |
| | | @ApiModelProperty("投票人id") |
| | | private Long userId; |
| | |
| | | @Length(groups = {AddGroup.class}, max = 5000) |
| | | private String content; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty("办理时间") |
| | | private String timeAt; |
| | | |
| | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModelProperty("房屋信息请求参数") |
| | | private List<ComMngPopulationHouseEditDTO> houseEditDTOList; |
| | | |
| | | @ApiModelProperty("吸毒信息") |
| | | private ComDrugPopulationVO comDrugPopulationVO; |
| | | |
| | | @ApiModelProperty("社区矫正信息") |
| | | private ComCorrectPopulationVO comCorrectPopulationVO; |
| | | |
| | | @ApiModelProperty("精神障碍信息") |
| | | private ComMajorPopulationVO comMajorPopulationVO; |
| | | |
| | | @ApiModelProperty("邪教信息") |
| | | private ComCultPopulationVO comCultPopulationVO; |
| | | |
| | | @ApiModelProperty("刑释信息") |
| | | private ComRehabilitationPopulationVO comRehabilitationPopulationVO; |
| | | |
| | | @ApiModelProperty("上访信息") |
| | | private ComKeyPopulationVO comKeyPopulationVO; |
| | | |
| | | @ApiModelProperty("退役军人信息") |
| | | private ComVeteransPopulationVO comVeteransPopulationVO; |
| | | |
| | | @ApiModelProperty("残疾人信息") |
| | | private ComDisabilityPopulationVO comDisabilityPopulationVO; |
| | | |
| | | @ApiModelProperty("低保户信息") |
| | | private ComLowSecurityPopulationVO comLowSecurityPopulationVO; |
| | | |
| | | @ApiModelProperty("高龄老人信息") |
| | | private ComElderAuthElderliesVO comElderAuthElderliesVO; |
| | | |
| | | @ApiModelProperty("养老人员信息") |
| | | private ComPensionAuthPensionerVO comPensionAuthPensionerVO; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @title: ComSwDangerReportEditDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 编辑隐患报告DTO |
| | | * @author: txb |
| | | * @date: 2021/09/08 16:16 |
| | | */ |
| | | |
| | | @Data |
| | | @ApiModel("编辑隐患报告DTO") |
| | | public class ComSwDangerReportEditDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 隐患报告id |
| | | */ |
| | | @ApiModelProperty("隐患报告id") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡查时间 |
| | | */ |
| | | @ApiModelProperty("巡查时间") |
| | | private String patrolTime; |
| | | |
| | | /** |
| | | * (取字典表国家标准编码)巡查类型(1.防火巡查2.防汛巡查3.防疫巡查) |
| | | */ |
| | | @ApiModelProperty("巡查类型(1.防火巡查2.防汛巡查3.防疫巡查),多条以逗号隔开") |
| | | private String patrolType; |
| | | |
| | | /** |
| | | * 巡查领导 |
| | | */ |
| | | @ApiModelProperty("巡查领导") |
| | | private String patrolLeader; |
| | | |
| | | /** |
| | | * 巡查人员 |
| | | */ |
| | | @ApiModelProperty("巡查人员id") |
| | | private String patrolPerson; |
| | | |
| | | /** |
| | | * 巡查地址 |
| | | */ |
| | | @ApiModelProperty("巡查地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 巡查记录 |
| | | */ |
| | | @ApiModelProperty("巡查记录") |
| | | private String recordContent; |
| | | |
| | | /** |
| | | * 发现记录 |
| | | */ |
| | | @ApiModelProperty("发现记录") |
| | | private String findRecord; |
| | | |
| | | /** |
| | | * 记录照片 |
| | | */ |
| | | @ApiModelProperty("记录照片") |
| | | private String recordPhoto; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 接班领导 |
| | | */ |
| | | @ApiModelProperty("接班领导") |
| | | private String successionLeader; |
| | | |
| | | /** |
| | | * 接班人员 |
| | | */ |
| | | @ApiModelProperty("接班人员") |
| | | private String successionPerson; |
| | | |
| | | /** |
| | | * 接班时间 |
| | | */ |
| | | @ApiModelProperty("接班时间") |
| | | private String successionTime; |
| | | |
| | | /** |
| | | * 是否存在隐患(1是 、0否) |
| | | */ |
| | | @ApiModelProperty("是否存在隐患(1是 、0否)") |
| | | private Integer isHiddenDanger; |
| | | |
| | | /** |
| | | * 隐患名称 |
| | | */ |
| | | @ApiModelProperty("隐患名称") |
| | | private String dangerName; |
| | | |
| | | @ApiModelProperty("原隐患名称") |
| | | private String dagerName; |
| | | |
| | | /** |
| | | * 排查时间 |
| | | */ |
| | | @ApiModelProperty("排查时间") |
| | | private String checkTime; |
| | | |
| | | /** |
| | | * 主体部门、单位或个人全称 |
| | | */ |
| | | @ApiModelProperty("主体部门、单位或个人全称") |
| | | private String unitName; |
| | | |
| | | /** |
| | | * 隐患简述 |
| | | */ |
| | | @ApiModelProperty("隐患简述") |
| | | private String dangerDescription; |
| | | |
| | | @ApiModelProperty("原隐患简述") |
| | | private String dagerDescription; |
| | | |
| | | /** |
| | | * 是否立即整改(1是 、0否) |
| | | */ |
| | | @ApiModelProperty("是否立即整改(1是 、0否)") |
| | | private Integer isRectifyImmediately; |
| | | |
| | | /** |
| | | * 社区处理建议 |
| | | */ |
| | | @ApiModelProperty("社区处理建议") |
| | | private String communitySuggestion; |
| | | |
| | | /** |
| | | * 街道安全人员管理建议 |
| | | */ |
| | | @ApiModelProperty("街道安全人员管理建议") |
| | | private String streetSuggestion; |
| | | |
| | | /** |
| | | * 承办记录 |
| | | */ |
| | | @ApiModelProperty("承办记录") |
| | | private String undertakeRecord; |
| | | |
| | | /** |
| | | * 领导意见 |
| | | */ |
| | | @ApiModelProperty("领导意见") |
| | | private String leaderSuggestion; |
| | | |
| | | /** |
| | | * 风险等级(1.红色预警 2.橙色预警 3.黄色预警 4.蓝色预警) |
| | | */ |
| | | @ApiModelProperty("风险等级(1.红色预警 2.橙色预警 3.黄色预警 4.蓝色预警)") |
| | | private String dangerLevel; |
| | | |
| | | /** |
| | | * 指派人员 |
| | | */ |
| | | @ApiModelProperty("指派人员") |
| | | private String assignPerson; |
| | | |
| | | /** |
| | | * 采取措施 |
| | | */ |
| | | @ApiModelProperty("采取措施") |
| | | private String takeSteps; |
| | | |
| | | /** |
| | | * 采取措施照片 |
| | | */ |
| | | @ApiModelProperty("采取措施照片") |
| | | private String stepsPhoto; |
| | | |
| | | /** |
| | | * 整改人员 |
| | | */ |
| | | @ApiModelProperty("整改人员id") |
| | | private String rectifyPerson; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty("修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | | public interface patrolType { |
| | | int huo = 1; |
| | | int xun = 2; |
| | | int yi = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否 |
| | | */ |
| | | public interface isOk { |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @title: ComSwPatrolRecordEditDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 编辑巡查记录DTO |
| | | * @author: txb |
| | | * @date: 2021/09/08 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("编辑巡查记录DTO") |
| | | public class ComSwPatrolRecordEditDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 巡查记录id |
| | | */ |
| | | @ApiModelProperty("巡查记录id") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡查时间 |
| | | */ |
| | | @ApiModelProperty("巡查时间") |
| | | private String patrolTime; |
| | | |
| | | /** |
| | | * (取字典表国家标准编码)巡查类型(1.防火巡查2.防汛巡查3.防疫巡查) |
| | | */ |
| | | @ApiModelProperty("巡查类型(1.防火巡查2.防汛巡查3.防疫巡查),多条以逗号隔开") |
| | | private String patrolType; |
| | | |
| | | /** |
| | | * 巡查领导 |
| | | */ |
| | | @ApiModelProperty("巡查领导id") |
| | | private String patrolLeader; |
| | | |
| | | /** |
| | | * 巡查人员 |
| | | */ |
| | | @ApiModelProperty("巡查人员id") |
| | | private String patrolPerson; |
| | | |
| | | /** |
| | | * 巡查地址 |
| | | */ |
| | | @ApiModelProperty("巡查地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 巡查记录 |
| | | */ |
| | | @ApiModelProperty("巡查记录") |
| | | private String recordContent; |
| | | |
| | | /** |
| | | * 发现记录 |
| | | */ |
| | | @ApiModelProperty("发现记录") |
| | | private String findRecord; |
| | | |
| | | /** |
| | | * 记录照片 |
| | | */ |
| | | @ApiModelProperty("记录照片") |
| | | private String recordPhoto; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 接班领导 |
| | | */ |
| | | @ApiModelProperty("接班领导") |
| | | private String successionLeader; |
| | | |
| | | /** |
| | | * 接班人员 |
| | | */ |
| | | @ApiModelProperty("接班人员") |
| | | private String successionPerson; |
| | | |
| | | /** |
| | | * 接班时间 |
| | | */ |
| | | @ApiModelProperty("接班时间") |
| | | private String successionTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty("修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | | public interface patrolType { |
| | | int huo = 1; |
| | | int xun = 2; |
| | | int yi = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否 |
| | | */ |
| | | public interface isOk { |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @title: ComSwSafetyWorkEditDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 安全工作记录DTO |
| | | * @author: txb |
| | | * @date: 2021/09/08 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("安全工作记录DTO") |
| | | public class ComSwSafetyWorkEditDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 安全工作记录id |
| | | */ |
| | | @ApiModelProperty("安全工作记录id") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 巡查时间 |
| | | */ |
| | | @ApiModelProperty("巡查时间") |
| | | private String patrolTime; |
| | | |
| | | /** |
| | | * (取字典表国家标准编码)巡查类型(1.防火巡查2.防汛巡查3.防疫巡查) |
| | | */ |
| | | @ApiModelProperty("巡查类型(1.防火巡查2.防汛巡查3.防疫巡查),多条以逗号隔开") |
| | | private String patrolType; |
| | | |
| | | /** |
| | | * 巡查领导 |
| | | */ |
| | | @ApiModelProperty("巡查领导id") |
| | | private String patrolLeader; |
| | | |
| | | /** |
| | | * 巡查人员 |
| | | */ |
| | | @ApiModelProperty("巡查人员id") |
| | | private String patrolPerson; |
| | | |
| | | /** |
| | | * 巡查地址 |
| | | */ |
| | | @ApiModelProperty("巡查地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 巡查记录 |
| | | */ |
| | | @ApiModelProperty("巡查记录") |
| | | private String recordContent; |
| | | |
| | | /** |
| | | * 发现记录 |
| | | */ |
| | | @ApiModelProperty("发现记录") |
| | | private String findRecord; |
| | | |
| | | /** |
| | | * 记录照片 |
| | | */ |
| | | @ApiModelProperty("记录照片") |
| | | private String recordPhoto; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 接班领导 |
| | | */ |
| | | @ApiModelProperty("接班领导") |
| | | private String successionLeader; |
| | | |
| | | /** |
| | | * 接班人员 |
| | | */ |
| | | @ApiModelProperty("接班人员") |
| | | private String successionPerson; |
| | | |
| | | /** |
| | | * 接班时间 |
| | | */ |
| | | @ApiModelProperty("接班时间") |
| | | private String successionTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty("修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | | public interface patrolType { |
| | | int huo = 1; |
| | | int xun = 2; |
| | | int yi = 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否 |
| | | */ |
| | | public interface isOk { |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: DiscussVoteOptionDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 一起议投票请求参数 |
| | | * @author: hans |
| | | * @date: 2021/09/16 17:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("一起议投票请求参数") |
| | | public class DiscussVoteOptionDTO { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @NotEmpty(message = "投票选项不能为空") |
| | | private List<Long> optionIds; |
| | | } |
| | |
| | | @ApiModelProperty(value = "身份证号码") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "是否健在", example = "1是,2否") |
| | | @ApiModelProperty(value = "是否健在(1是,2否)", example = "1是,2否") |
| | | private Integer isExist; |
| | | |
| | | @ApiModelProperty(value = "是否办理高龄津贴", example = "1是,2否") |
| | | @ApiModelProperty(value = "是否办理高龄津贴(1是,2否)", example = "1是,2否") |
| | | private Integer isBigAge; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: GetIdentityEidTokenDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 获取身份认证人脸核验token参数 |
| | | * @author: hans |
| | | * @date: 2021/09/13 11:07 |
| | | */ |
| | | @Data |
| | | @ApiModel("获取身份认证人脸核验token参数") |
| | | @EncryptDecryptClass |
| | | public class GetIdentityEidTokenDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "姓名", required = true, example = "张三") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | @NotBlank(message = "姓名不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号", required = true, example = "511321199503241233") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | @NotBlank(message = "身份证号码不能为空") |
| | | @Size(min = 18, max = 18, message = "请输入18位有效身份证号") |
| | | private String idCard; |
| | | } |
| | |
| | | @ApiModelProperty("办事指南标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | } |
| | |
| | | public class PageComActDiscussCommentDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "账号") |
| | | private String account; |
| | |
| | | |
| | | @ApiModelProperty(value = "登录用户", required = true) |
| | | private Long loginUserId; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | } |
| | |
| | | @ApiModel("分页查询一起议") |
| | | public class PageComActDiscussDTO { |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty("主题") |
| | | private String subject; |
| | |
| | | |
| | | @ApiModelProperty("小程序使用 1 表示查询我的议题") |
| | | private Integer isMy; |
| | | |
| | | @ApiModelProperty("状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "类型: 1.议事 2.投票,小程序必须传入类型", allowableValues = "1,2") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "展示状态,小程序获取不同状态的投票列表 1.进行中 2.已结束", allowableValues = "1,2") |
| | | private Integer displayStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: PageElderAuthRecordsDTO 高龄老人认证记录分页查询参数 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人认证记录分页查询参数 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/02 11:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证记录分页查询参数") |
| | | public class PageElderAuthRecordsDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "查询关键词") |
| | | private String searchKey; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证开始时间") |
| | | private String authDateBegin; |
| | | |
| | | @ApiModelProperty(value = "认证结束时间") |
| | | private String authDateEnd; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 0.未认证)") |
| | | private String authStatus; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private String authMethod; |
| | | } |
| | |
| | | private Integer type; |
| | | @ApiModelProperty(value = "认证时间(月份)", example = "1") |
| | | private Integer month; |
| | | @ApiModelProperty(value = "认证时间(年份)", example = "2021") |
| | | private Integer year; |
| | | |
| | | @ApiModelProperty(value = "排序列", example = "create_at", hidden = true) |
| | | public String getSortColumns() { |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageIdentityAuthRecordDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询身份认证记录 |
| | | * @author: hans |
| | | * @date: 2021/09/03 9:39 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询身份认证记录参数") |
| | | @EncryptDecryptClass |
| | | public class PageIdentityAuthRecordDTO { |
| | | |
| | | @ApiModelProperty(value = "认证类型(1.高龄认证 2.养老认证)", required = true, allowableValues = "1,2", example = "1") |
| | | @NotNull(message = "认证类型不能为空") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "当前页数", required = true, example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "每页记录数", required = true, example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "提交用户", example = "1", hidden = true) |
| | | private Long submitUserId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.discuss; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 议事投票公布结果请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("议事投票公布结果请求参数") |
| | | public class ComActDiscussDetailDTO { |
| | | |
| | | @ApiModelProperty("主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.discuss; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 议事投票公布结果请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("议事投票公布结果请求参数") |
| | | public class ComActDiscussPublishResultDTO { |
| | | |
| | | @ApiModelProperty("议事投票id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("公布结果") |
| | | private String result; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("类型(1.新增公布结果 2.修改公布结果)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 类型(1.新增公布结果 2.修改公布结果) |
| | | */ |
| | | public interface type{ |
| | | int add = 1; |
| | | int edit = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * 高龄老人认证统计表头查询参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计表头查询参数") |
| | | public class ElderAuthStatisticHeaderDTO { |
| | | |
| | | @ApiModelProperty(value = "认证期数",required = true) |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: PageElderAuthRecordsDTO 高龄老人认证记录分页查询参数 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人认证记录分页查询参数 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/02 11:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证记录分页查询参数") |
| | | public class PageElderAuthStatisticDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 2.未认证)") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: PageElderAuthRecordsDTO 养老认证记录分页查询参数 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 高龄老人认证记录分页查询参数 |
| | | * |
| | | * @author lyq |
| | | * @date 2021/9/18 15:12 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录分页查询参数") |
| | | public class PagePensionAuthStatisticDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 2.未认证)") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community.elder; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @author lyq |
| | | * 标记高龄老人认证统计记录请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("标记高龄老人认证统计记录请求参数") |
| | | public class SignElderAuthStatisticDTO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "标记内容") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "操作用户id",hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "是否需要审核(1.是 2.否)",hidden = true) |
| | | private Integer isExamine; |
| | | |
| | | @ApiModelProperty(value = "微信审核结果(1.通过 2.拒绝)",hidden = true) |
| | | private Integer wxExamineResult; |
| | | |
| | | @ApiModelProperty("用户新增邻里圈话题") |
| | | private String topicName; |
| | | |
| | | /** |
| | | * 是否需要审核(1.是 2.否) |
| | | */ |
| | | public interface isExamine{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.neighbor; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:02:14 |
| | | * @describe 用户添加邻里圈请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("用户添加邻里圈请求参数") |
| | | public class AddNeighborCircleTopicAppDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("邻里圈话题名称") |
| | | private String name; |
| | | } |
| | |
| | | @ApiModelProperty("话题名称") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyWord; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.neighbor; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:02:14 |
| | | * @describe 用户删除邻里圈请求参数 |
| | | */ |
| | | @Data |
| | | @ApiModel("用户删除邻里圈请求参数") |
| | | public class DeleteNeighborCircleAppDTO { |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("邻里圈id") |
| | | private Long id; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("所属活动id") |
| | | private Long activityId; |
| | | |
| | | @ApiModelProperty("类型(1.党建 2.节日 3.天气预报 4.疫情 5.灾害预警 6.志愿者)") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("用户id, 和用户信息表的相关id关联") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("上传时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("上传图片") |
| | |
| | | |
| | | @ApiModelProperty("图片名称") |
| | | private String pictureName; |
| | | |
| | | @ApiModelProperty("是否系统预置(1.是 0.否)") |
| | | private Integer sysFlag; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty("是否二维码签到 1 是 0否") |
| | | private Integer isQrCode; |
| | | |
| | | @ApiModelProperty("用户最近签到时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date activitySignInDate; |
| | | @ApiModelProperty("用户签到记录列表") |
| | | private List<ComActActRegistVO> activitySignInList; |
| | | |
| | | @ApiModelProperty("联系人姓名") |
| | | private String contactName; |
| | |
| | | private List<ComActActEvaluateVO> comActActEvaluateVOList; |
| | | |
| | | @ApiModelProperty("活动评价总数") |
| | | private Integer evaluateAmount; |
| | | private Long evaluateAmount; |
| | | |
| | | @ApiModelProperty("活动评分星级平均数") |
| | | private Double evaluateLevel; |
| | | private BigDecimal evaluateLevel; |
| | | |
| | | @ApiModelProperty("当前用户对活动的评分") |
| | | private Integer myRating; |
| | |
| | | @ApiModelProperty("评论人用户类型(1.小程序用户(其他均为后台用户))") |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty("回复量") |
| | | private Integer replyNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComActDiscussOptionUserVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 一起议投票记录详情 |
| | | * @author: hans |
| | | * @date: 2021/09/08 16:14 |
| | | */ |
| | | @Data |
| | | @ApiModel("一起议投票记录详情") |
| | | public class ComActDiscussOptionUserVO { |
| | | |
| | | @ApiModelProperty("投票记录主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("一起议选项id") |
| | | private Long discussOptionId; |
| | | |
| | | @ApiModelProperty("投票人id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("投票时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("一起议id") |
| | | private Long discussId; |
| | | |
| | | @ApiModelProperty("投票人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("投票人头像") |
| | | private String imageUrl; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | @ApiModelProperty("投票数量") |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty("投票总数量") |
| | | private Integer allNum; |
| | | |
| | | @ApiModelProperty("是否已经投票 1 是 0 否") |
| | | private Integer haveVote = 0; |
| | | |
| | | @ApiModelProperty("投票选项占比") |
| | | private BigDecimal percent; |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty("主题") |
| | | private String discussSubject; |
| | | |
| | | @ApiModelProperty("类型 1 图文 2 投票") |
| | | @ApiModelProperty("类型 1 议事 2 投票") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("图片地址 多个用逗号隔开") |
| | |
| | | @ApiModelProperty("点赞数量") |
| | | private Integer signNum; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewsNum; |
| | | |
| | | @ApiModelProperty("发布人名字") |
| | | private String userName; |
| | | |
| | |
| | | @ApiModelProperty("用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台") |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty("状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("公布结果") |
| | | private String publishResult; |
| | | |
| | | @ApiModelProperty("公布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date releaseAt; |
| | | |
| | | @ApiModelProperty("投票开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty("投票结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty("参与讨论人数") |
| | | private Integer joinNum; |
| | | |
| | | @ApiModelProperty("单张图片宽度") |
| | | private BigDecimal imgWidth; |
| | | |
| | | @ApiModelProperty("单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | |
| | | @ApiModelProperty("是否可重复投票(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("每人票数") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("议事投票评论列表") |
| | | private List<ComActDiscussCommentVO> discussCommentList; |
| | | |
| | | @ApiModelProperty("剩余可投票数") |
| | | private Integer remainingVotes; |
| | | |
| | | @ApiModelProperty("已投票记录列表") |
| | | private List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList; |
| | | |
| | | @ApiModelProperty("已参与投票人数") |
| | | private Integer votedPersonNum; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class ComActMicroWishFeedbackVO { |
| | | /** |
| | | * 反馈内容 |
| | | */ |
| | | @ApiModelProperty("反馈内容") |
| | | private String content; |
| | | |
| | | /** |
| | | * 反馈图片 |
| | | */ |
| | | @ApiModelProperty("反馈图片") |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 反馈时间 |
| | | */ |
| | | @ApiModelProperty("反馈时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 反馈人 |
| | | */ |
| | | @ApiModelProperty("反馈人") |
| | | private String name; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class ComActMicroWishOperationRecordVO { |
| | | /** |
| | | * 操作内容 |
| | | */ |
| | | @ApiModelProperty("操作内容") |
| | | private String content; |
| | | |
| | | /** |
| | | * 人员姓名 |
| | | */ |
| | | @ApiModelProperty("人员姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("记录时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | /** |
| | | * 操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 |
| | | */ |
| | | @ApiModelProperty("操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 7反馈 8自动确认") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("操作备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("反馈图片") |
| | | private String imgUrl; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("微心愿名称") |
| | | @NotBlank(groups = {AddGroup.class}, message = "微心愿名称不能为空") |
| | | // @NotBlank(groups = {AddGroup.class},message = "微心愿名称不能为空") |
| | | private String wishName; |
| | | |
| | | @ApiModelProperty("状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成") |
| | | @ApiModelProperty("状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成 7集心中") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("集星数") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date distributionAt; |
| | | |
| | | @ApiModelProperty("完成时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date finishAt; |
| | | |
| | | @ApiModelProperty("评分") |
| | | private Integer score; |
| | | |
| | | @ApiModelProperty("详情") |
| | | @NotBlank(groups = {AddGroup.class}, message = "详情不能为空") |
| | | @NotBlank(groups = {AddGroup.class},message = "详情不能为空") |
| | | private String detail; |
| | | |
| | | @ApiModelProperty("图片路径列表,逗号分隔") |
| | | // @NotBlank(groups = {AddGroup.class},message = "图片路径列表不能为空") |
| | | //@NotBlank(groups = {AddGroup.class},message = "图片路径列表不能为空") |
| | | private String photoPathList; |
| | | |
| | | @ApiModelProperty("当前页数") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty("每页记录数") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("用户评价") |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date evaluateAt; |
| | | |
| | | @ApiModelProperty("反馈时间") |
| | | @ApiModelProperty("集心完成时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date feedbackAt; |
| | | |
| | |
| | | @ApiModelProperty("反馈图片集合,逗号分隔") |
| | | private String feedbackPhotoPathList; |
| | | |
| | | @ApiModelProperty(value = "操作类型 1 审核通过 2驳回 3分配人员 4发起活动 5反馈", example = "1") |
| | | @ApiModelProperty(value = "操作类型 1 审核通过 2驳回 3分配人员 4发起活动 5反馈",example = "1") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "小程序请求 1 是 0 不是", hidden = true) |
| | | @ApiModelProperty(value = "小程序请求 1 是 0 不是",hidden = true) |
| | | private Integer isApplets; |
| | | |
| | | @ApiModelProperty(value = "是否点赞 1 是 0 不是", example = "1") |
| | | @ApiModelProperty(value = "是否点赞 1 是 0 不是",example = "1") |
| | | private Integer haveGiveThumbsUp = 0; |
| | | |
| | | @ApiModelProperty(value = "登录用户", hidden = true) |
| | | @ApiModelProperty(value = "登录用户",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "社区后台登录用户", hidden = true) |
| | | @ApiModelProperty(value = "社区后台登录用户",hidden = true) |
| | | private Long backUserId; |
| | | |
| | | @ApiModelProperty(value = "是否是分页查询微心愿接口调用", hidden = true) |
| | | @ApiModelProperty(value = "是否是分页查询微心愿接口调用",hidden = true) |
| | | private Integer isPageMyWish; |
| | | |
| | | @ApiModelProperty(value = "预约社区集心数") |
| | | private Integer aimNum; |
| | | |
| | | @ApiModelProperty(value = "反馈列表") |
| | | private List<ComActMicroWishFeedbackVO> feedbackVOList; |
| | | |
| | | @ApiModelProperty(value = "操作记录 只有审核和驳回得纪录 其他从当前数据提取") |
| | | private List<ComActMicroWishOperationRecordVO> operationRecordVOList; |
| | | |
| | | @ApiModelProperty(value = "下一个id数组") |
| | | private List<Long> idList; |
| | | |
| | | @ApiModelProperty(value = "单张图片宽度") |
| | | private BigDecimal imgWidth; |
| | | |
| | | @ApiModelProperty(value = "单张图片高度") |
| | | private BigDecimal imgHeight; |
| | | } |
| | | |
| | |
| | | private Long selectionId; |
| | | @ApiModelProperty("答题记录id") |
| | | private Long reserveRecordId; |
| | | @ApiModelProperty("题目id") |
| | | private Long reserveSubId; |
| | | @ApiModelProperty("填报时间") |
| | | private Date time; |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | @ApiModelProperty("选项类型(0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 11文件上传)") |
| | | private Integer optionType; |
| | | |
| | | } |
| | |
| | | public class ComActQuestnaireSubVO { |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | @ApiModelProperty("类型 0单选1多选2问答题") |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private int type; |
| | | @ApiModelProperty("题目内容") |
| | | private String content; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 办事指南分类列表 |
| | | */ |
| | | @Data |
| | | @ApiModel("办事指南分类列表") |
| | | public class ComActWorkGuideAppletsVO { |
| | | |
| | | @ApiModelProperty("分类id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty("分类图标url") |
| | | private String pictureUrl; |
| | | |
| | | @ApiModelProperty("办事指南数量") |
| | | private Integer count; |
| | | |
| | | @ApiModelProperty("办事指南列表") |
| | | private List<ComActWorkGuideDetailAppletsVO> guideDetailList = Lists.newArrayList(); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyVO 社区》办事指南》分类管理展示类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区》办事指南》分类管理展示类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/31 14:21 |
| | | */ |
| | | |
| | | @Data |
| | | @ApiModel("办事指南-分类管理") |
| | | public class ComActWorkGuideClassifyVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty("图标地址") |
| | | private String pictureUrl; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("系统预置:1-是 0-否") |
| | | private Integer sysFlag; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther llming |
| | | * @describe 办事指南 |
| | | */ |
| | | @Data |
| | | @ApiModel("办事指南信息") |
| | | public class ComActWorkGuideDetailAppletsVO { |
| | | @ApiModelProperty("办事指南id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("办事指南标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("办事指南内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty("办理时间") |
| | | private String timeAt; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private String createAt; |
| | | |
| | | @ApiModelProperty("办理地点") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("咨询电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty("纬度") |
| | | private String lat; |
| | | |
| | | private List<ComActWorkGuideMaterialVO> materials = Lists.newArrayList(); |
| | | } |
| | |
| | | @Length(groups = {AddGroup.class}, max = 5000) |
| | | private String content; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private Integer classify; |
| | | |
| | | @ApiModelProperty("所属分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty("办理时间") |
| | | private String timeAt; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesVO 社区政务》高龄老人认证》高龄老人表实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》高龄老人表实体类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | |
| | | @Data |
| | | @ApiModel("高龄认证记录") |
| | | public class ComElderAuthElderliesVO { |
| | | |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "人口id") |
| | | private Long populationId; |
| | | |
| | | @ApiModelProperty(value = "街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否高龄老人登记(1.是 0.否)") |
| | | private Integer isRegister; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "高龄津贴开始领取日期") |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "修改用户") |
| | | private Long updateBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComElderAuthRecordVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 高龄认证记录 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄认证记录") |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthRecordExcleVO { |
| | | |
| | | @ExcelProperty(value = "提交用户", index = 0) |
| | | private String submitUserName; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 2) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号", index = 3) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "性别", index = 4) |
| | | private String sex; |
| | | |
| | | @ExcelProperty(value = "年龄", index = 5) |
| | | private Integer age; |
| | | |
| | | @ExcelProperty(value = "出生日期", index = 6) |
| | | private String birthday; |
| | | |
| | | @ExcelProperty(value = "人员类别", index = 7) |
| | | private String personnelCategory; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 8) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "健在", index = 9) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 10) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 11) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 12) |
| | | private String authMethod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 13) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "审核状态", index = 14) |
| | | private String approvalStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 批量导入吸毒人员 |
| | | * @author: txb |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthRecordImportExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 3) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description: 批量导入吸毒人员 |
| | | * @author: txb |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthRecordImportMistakeExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 3) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private String authDate; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 7) |
| | | private String mistake; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComElderAuthRecordStatisticExcleVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 高龄认证记录统计 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄认证记录统计") |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthRecordStatisticExcleVO { |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 0) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 1) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号", index = 2) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "性别", index = 3) |
| | | private String sex; |
| | | |
| | | @ExcelProperty(value = "年龄", index = 4) |
| | | private Integer age; |
| | | |
| | | @ExcelProperty(value = "出生日期", index = 6) |
| | | private String birthday; |
| | | |
| | | @ExcelProperty(value = "人员类别", index = 5) |
| | | private String personnelCategory; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 7) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "健在", index = 8) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 9) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 10) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 11) |
| | | private String authMethod; |
| | | |
| | | |
| | | @ExcelProperty(value = "标记", index = 12) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "认证状态", index = 13) |
| | | private String authStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComElderAuthRecordVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 高龄认证记录 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄认证记录") |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthRecordVO { |
| | | |
| | | @ApiModelProperty(value = "自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "高龄老人id") |
| | | private Long elderliesId; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "提交用户姓名") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否高龄老人登记(1.是 0.否)") |
| | | private Integer isRegister; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频url") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核人员id") |
| | | private Long approverId; |
| | | |
| | | @ApiModelProperty(value = "审核人员姓名") |
| | | private String approverName; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String rejectReason; |
| | | |
| | | @ApiModelProperty(value = "认证状态") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "本期认证总人数") |
| | | private Integer authAmount; |
| | | |
| | | @ApiModelProperty(value = "本期认证成功人数") |
| | | private Integer authSucceedAmount; |
| | | |
| | | @ApiModelProperty(value = "本期未认证人数") |
| | | private Integer authNoAmount; |
| | | |
| | | @ApiModelProperty(value = "待审核状态id集合列表") |
| | | private List<Long> nextIds; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | } |
| | |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号码") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComMngPopulationElderExcelVO 批量导入高龄老人 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 批量导入高龄老人 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 13:12 |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComMngPopulationElderExcelVO { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ExcelProperty(value = "民族", index = 2) |
| | | private String nation; |
| | | |
| | | @ExcelProperty(value = "政治面貌", index = 3) |
| | | private Integer politicalOutlook; |
| | | |
| | | @ExcelProperty(value = "是否租住", index = 4) |
| | | private Integer isRent; |
| | | |
| | | @ExcelProperty(value = "街/路/巷", index = 5) |
| | | private String road; |
| | | |
| | | @ExcelProperty(value = "小区号", index = 6) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼排号", index = 7) |
| | | private String floor; |
| | | |
| | | @ExcelProperty(value = "单元号", index = 8) |
| | | private String unitNo; |
| | | |
| | | @ExcelProperty(value = "户室(房间号)", index = 9) |
| | | private String houseNo; |
| | | |
| | | @ExcelProperty(value = "房屋状态(1.自住 2.租住 3.其他)", index = 10) |
| | | private Integer houseStatus; |
| | | |
| | | @ExcelProperty(value = "房屋用途(1.住宅 2.公寓 3.宿舍 4.仓库 5.其他)", index = 11) |
| | | private Integer housePurpose; |
| | | |
| | | @ExcelProperty(value = "管控状态(1.常规 2.关注 3.管控)", index = 12) |
| | | private Integer controlStatus; |
| | | |
| | | @ExcelProperty(value = "联系方式", index = 13) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "籍贯", index = 14) |
| | | private String nativePlace; |
| | | |
| | | @ExcelProperty(value = "文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他)", index = 15) |
| | | private Integer cultureLevel; |
| | | |
| | | @ExcelProperty(value = "婚姻状况(1.未婚 2.已婚 3.离异 4.丧偶 5.分居 6.其他)", index = 16) |
| | | private Integer marriage; |
| | | |
| | | @ExcelProperty(value = "健康状况", index = 17) |
| | | private String healthy; |
| | | |
| | | @ExcelProperty(value = "外地/本地(1.本地 2.外地)", index = 18) |
| | | private Integer outOrLocal; |
| | | |
| | | @ExcelProperty(value = "户口所在地", index = 19) |
| | | private String censusRegister; |
| | | |
| | | @ExcelProperty(value = "高龄老人登记(是/否)", index = 20) |
| | | private Integer isRegister; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 21) |
| | | private Integer isAlive; |
| | | |
| | | @ExcelProperty(value = "*高龄津贴开始领取时间(年-月-日)", index = 22) |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ExcelProperty(value = "*现居住地址", index = 23) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "备注", index = 24) |
| | | private String remark; |
| | | |
| | | /** |
| | | * 去重字段,使用(姓名+身份证号+街路巷+小区号+楼牌号+单元号+户室)组合字段进行MD5加密实现去重 |
| | | */ |
| | | private String distinctPass; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 扩展字段用逗号隔开 |
| | | */ |
| | | private List<String> userTagStr = Lists.newArrayList(); |
| | | |
| | | private Long houseId; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComMngPopulationElderExcelVO 批量导入高龄老人 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 批量导入高龄老人 |
| | | * |
| | | * @author txb |
| | | * @String 2021/9/01 13:12 |
| | | */ |
| | | @Data |
| | | public class ComMngPopulationElderMistakeExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ExcelProperty(value = "民族", index = 2) |
| | | private String nation; |
| | | |
| | | @ExcelProperty(value = "政治面貌", index = 3) |
| | | private String politicalOutlook; |
| | | |
| | | @ExcelProperty(value = "是否租住", index = 4) |
| | | private String isRent; |
| | | |
| | | @ExcelProperty(value = "街/路/巷", index = 5) |
| | | private String road; |
| | | |
| | | @ExcelProperty(value = "小区号", index = 6) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼排号", index = 7) |
| | | private String floor; |
| | | |
| | | @ExcelProperty(value = "单元号", index = 8) |
| | | private String unitNo; |
| | | |
| | | @ExcelProperty(value = "户室(房间号)", index = 9) |
| | | private String houseNo; |
| | | |
| | | @ExcelProperty(value = "房屋状态(1.自住 2.租住 3.其他)", index = 10) |
| | | private String houseStatus; |
| | | |
| | | @ExcelProperty(value = "房屋用途(1.住宅 2.公寓 3.宿舍 4.仓库 5.其他)", index = 11) |
| | | private String housePurpose; |
| | | |
| | | @ExcelProperty(value = "管控状态(1.常规 2.关注 3.管控)", index = 12) |
| | | private String controlStatus; |
| | | |
| | | @ExcelProperty(value = "联系方式", index = 13) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "籍贯", index = 14) |
| | | private String nativePlace; |
| | | |
| | | @ExcelProperty(value = "文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他)", index = 15) |
| | | private String cultureLevel; |
| | | |
| | | @ExcelProperty(value = "婚姻状况(1.未婚 2.已婚 3.离异 4.丧偶 5.分居 6.其他)", index = 16) |
| | | private String marriage; |
| | | |
| | | @ExcelProperty(value = "健康状况", index = 17) |
| | | private String healthy; |
| | | |
| | | @ExcelProperty(value = "外地/本地(1.本地 2.外地)", index = 18) |
| | | private String outOrLocal; |
| | | |
| | | @ExcelProperty(value = "户口所在地", index = 19) |
| | | private String censusRegister; |
| | | |
| | | @ExcelProperty(value = "高龄老人登记(是/否)", index = 20) |
| | | private String isRegister; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 21) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "*高龄津贴开始领取时间(年-月-日)", index = 22) |
| | | private String receiveAllowanceBegin; |
| | | |
| | | @ExcelProperty(value = "*现居住地址", index = 23) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "备注", index = 24) |
| | | private String remark; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 25) |
| | | private String mistake; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComMngPopulationPensionExcelVO 批量导入养老金人员 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 批量导入养老金人员 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 13:12 |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComMngPopulationPensionExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ExcelProperty(value = "民族", index = 2) |
| | | private String nation; |
| | | |
| | | @ExcelProperty(value = "政治面貌", index = 3) |
| | | private Integer politicalOutlook; |
| | | |
| | | @ExcelProperty(value = "是否租住", index = 4) |
| | | private Integer isRent; |
| | | |
| | | @ExcelProperty(value = "街/路/巷", index = 5) |
| | | private String road; |
| | | |
| | | @ExcelProperty(value = "小区号", index = 6) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼排号", index = 7) |
| | | private String floor; |
| | | |
| | | @ExcelProperty(value = "单元号", index = 8) |
| | | private String unitNo; |
| | | |
| | | @ExcelProperty(value = "户室(房间号)", index = 9) |
| | | private String houseNo; |
| | | |
| | | @ExcelProperty(value = "房屋状态(1.自住 2.租住 3.其他)", index = 10) |
| | | private Integer houseStatus; |
| | | |
| | | @ExcelProperty(value = "房屋用途(1.住宅 2.公寓 3.宿舍 4.仓库 5.其他)", index = 11) |
| | | private Integer housePurpose; |
| | | |
| | | @ExcelProperty(value = "管控状态(1.常规 2.关注 3.管控)", index = 12) |
| | | private Integer controlStatus; |
| | | |
| | | @ExcelProperty(value = "联系方式", index = 13) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "籍贯", index = 14) |
| | | private String nativePlace; |
| | | |
| | | @ExcelProperty(value = "文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他)", index = 15) |
| | | private Integer cultureLevel; |
| | | |
| | | @ExcelProperty(value = "婚姻状况(1.未婚 2.已婚 3.离异 4.丧偶 5.分居 6.其他)", index = 16) |
| | | private Integer marriage; |
| | | |
| | | @ExcelProperty(value = "健康状况", index = 17) |
| | | private String healthy; |
| | | |
| | | @ExcelProperty(value = "外地/本地(1.本地 2.外地)", index = 18) |
| | | private Integer outOrLocal; |
| | | |
| | | @ExcelProperty(value = "户口所在地", index = 19) |
| | | private String censusRegister; |
| | | |
| | | @ExcelProperty(value = "养老登记(是/否)", index = 20) |
| | | private Integer isRegister; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 21) |
| | | private Integer isAlive; |
| | | |
| | | @ExcelProperty(value = "*养老金开始领取时间(年-月-日)", index = 22) |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ExcelProperty(value = "*现居住地址", index = 23) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "备注", index = 24) |
| | | private String remark; |
| | | |
| | | /** |
| | | * 去重字段,使用(姓名+身份证号+街路巷+小区号+楼牌号+单元号+户室)组合字段进行MD5加密实现去重 |
| | | */ |
| | | private String distinctPass; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 扩展字段用逗号隔开 |
| | | */ |
| | | private List<String> userTagStr = Lists.newArrayList(); |
| | | |
| | | private Long houseId; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * title: ComMngPopulationPensionMistakeExcelVO 批量导入养老金人员 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 批量导入养老金人员 |
| | | * |
| | | * @author txb |
| | | * @String 2021/9/01 13:12 |
| | | */ |
| | | @Data |
| | | public class ComMngPopulationPensionMistakeExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String cardNo; |
| | | |
| | | @ExcelProperty(value = "民族", index = 2) |
| | | private String nation; |
| | | |
| | | @ExcelProperty(value = "政治面貌", index = 3) |
| | | private String politicalOutlook; |
| | | |
| | | @ExcelProperty(value = "是否租住", index = 4) |
| | | private String isRent; |
| | | |
| | | @ExcelProperty(value = "街/路/巷", index = 5) |
| | | private String road; |
| | | |
| | | @ExcelProperty(value = "小区号", index = 6) |
| | | private String doorNo; |
| | | |
| | | @ExcelProperty(value = "楼排号", index = 7) |
| | | private String floor; |
| | | |
| | | @ExcelProperty(value = "单元号", index = 8) |
| | | private String unitNo; |
| | | |
| | | @ExcelProperty(value = "户室(房间号)", index = 9) |
| | | private String houseNo; |
| | | |
| | | @ExcelProperty(value = "房屋状态(1.自住 2.租住 3.其他)", index = 10) |
| | | private String houseStatus; |
| | | |
| | | @ExcelProperty(value = "房屋用途(1.住宅 2.公寓 3.宿舍 4.仓库 5.其他)", index = 11) |
| | | private String housePurpose; |
| | | |
| | | @ExcelProperty(value = "管控状态(1.常规 2.关注 3.管控)", index = 12) |
| | | private String controlStatus; |
| | | |
| | | @ExcelProperty(value = "联系方式", index = 13) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "籍贯", index = 14) |
| | | private String nativePlace; |
| | | |
| | | @ExcelProperty(value = "文化程度(1.小学 2.初中 3.高中 4.中专 5.大专 6.本科 7.硕士 8.博士 9.其他)", index = 15) |
| | | private String cultureLevel; |
| | | |
| | | @ExcelProperty(value = "婚姻状况(1.未婚 2.已婚 3.离异 4.丧偶 5.分居 6.其他)", index = 16) |
| | | private String marriage; |
| | | |
| | | @ExcelProperty(value = "健康状况", index = 17) |
| | | private String healthy; |
| | | |
| | | @ExcelProperty(value = "外地/本地(1.本地 2.外地)", index = 18) |
| | | private String outOrLocal; |
| | | |
| | | @ExcelProperty(value = "户口所在地", index = 19) |
| | | private String censusRegister; |
| | | |
| | | @ExcelProperty(value = "高龄老人登记(是/否)", index = 20) |
| | | private String isRegister; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 21) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "*高龄津贴开始领取时间(年-月-日)", index = 22) |
| | | private String receiveAllowanceBegin; |
| | | |
| | | @ExcelProperty(value = "*现居住地址", index = 23) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "备注", index = 24) |
| | | private String remark; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 25) |
| | | private String mistake; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("低保户信息") |
| | | private List<ComLowSecurityPopulationVO> comLowSecurityPopulationVOs; |
| | | |
| | | @ApiModelProperty("高龄老人信息") |
| | | private List<ComElderAuthElderliesVO> comElderAuthElderliesVOList; |
| | | |
| | | @ApiModelProperty("养老人员信息") |
| | | private List<ComPensionAuthPensionerVO> comPensionAuthPensionerVOList; |
| | | |
| | | public interface sex { |
| | | int nan = 1; |
| | | int nv = 2; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthPensionerVO 养老金人员表实体类 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老金人员表实体类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:30 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录") |
| | | public class ComPensionAuthPensionerVO { |
| | | |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "人口id") |
| | | private Long populationId; |
| | | |
| | | @ApiModelProperty(value = "街道id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否养老登记(1.是 0.否)") |
| | | private Integer isRegister; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "养老金开始领取日期") |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "创建用户") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "修改用户") |
| | | private Long updateBy; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordExcleVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录 |
| | | * @author: txb |
| | | * @date: 2021/09/07 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthRecordExcleVO { |
| | | |
| | | @ExcelProperty(value = "提交用户", index = 0) |
| | | private String submitUserName; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 1) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 2) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "认证身份证号", index = 3) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 4) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "健在", index = 5) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 6) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 7) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 8) |
| | | private String authMethod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 9) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "审核状态", index = 10) |
| | | private String approvalStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordImportExcelVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老线下认证导入 |
| | | * @author: txb |
| | | * @date: 2021/09/08 09:16 |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthRecordImportExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 3) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 6) |
| | | private String mark; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 出生年月日 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String address; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordImportMistakeExcelVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老线下认证导入错误记录 |
| | | * @author: txb |
| | | * @date: 2021/09/08 09:16 |
| | | */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthRecordImportMistakeExcelVO implements Serializable { |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 0) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "认证身份证号码", index = 1) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 2) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 3) |
| | | private String nowAddress; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 4) |
| | | private String authDate; |
| | | |
| | | @ExcelProperty(value = "健在(是/否)", index = 5) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "错误信息", index = 6) |
| | | private String mistake; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordStatisticExcleVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录统计 |
| | | * @author: txb |
| | | * @date: 2021/09/08 16:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录统计") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthRecordStatisticExcleVO { |
| | | |
| | | @ExcelProperty(value = "联系电话", index = 0) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "认证姓名", index = 1) |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "身份证号", index = 2) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ExcelProperty(value = "现居住地址", index = 3) |
| | | private String address; |
| | | |
| | | @ExcelProperty(value = "健在", index = 4) |
| | | private String isAlive; |
| | | |
| | | @ExcelProperty(value = "认证期数", index = 5) |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 7) |
| | | private String authMethod; |
| | | |
| | | @ExcelProperty(value = "标记", index = 8) |
| | | private String mark; |
| | | |
| | | @ExcelProperty(value = "认证状态", index = 9) |
| | | private String authStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:59 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证记录") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthRecordVO { |
| | | |
| | | @ApiModelProperty(value = "自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "养老金用户id") |
| | | private Long pensionerId; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "提交用户") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "提交用户姓名") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private String sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "出生日期") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否高龄老人登记(1.是 0.否)") |
| | | private Integer isRegister; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频url") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核人员id") |
| | | private String approverId; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String rejectReason; |
| | | |
| | | @ApiModelProperty(value = "认证状态") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateAt; |
| | | } |
| | |
| | | private String patrolType; |
| | | |
| | | /** |
| | | * 巡查领导id |
| | | */ |
| | | @ApiModelProperty("巡查领导id") |
| | | private String patrolLeader; |
| | | |
| | | /** |
| | | * 巡查领导名字 |
| | | */ |
| | | @ApiModelProperty("巡查领导名字") |
| | | private String patrolLeaderName; |
| | | |
| | | /** |
| | | * 巡查人员,多个以逗号隔开 |
| | | */ |
| | | @ApiModelProperty("巡查人员id,多个以逗号隔开") |
| | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 是否存在隐患(1是 、0否) |
| | | */ |
| | | @ApiModelProperty("是否存在隐患(1是 、0否)") |
| | | private Integer isHiddenDanger; |
| | | |
| | | /** |
| | | * 隐患名称 |
| | | */ |
| | | @ApiModelProperty("隐患名称") |
| | |
| | | */ |
| | | @ApiModelProperty("风险等级(1.红色预警 2.橙色预警 3.黄色预警 4.蓝色预警)") |
| | | private String dangerLevel; |
| | | |
| | | /** |
| | | * 是否立即整改(1是 、0否) |
| | | */ |
| | | @ApiModelProperty("是否立即整改(1是 、0否)") |
| | | private Integer isRectifyImmediately; |
| | | |
| | | /** |
| | | * 采取措施 |
| | |
| | | private String patrolName; |
| | | |
| | | /** |
| | | * 接班领导id |
| | | */ |
| | | @ApiModelProperty("接班领导id") |
| | | private String successionLeader; |
| | | |
| | | /** |
| | | * 接班领导名字 |
| | | */ |
| | | @ApiModelProperty("接班领导名字") |
| | | private String successionLeaderName; |
| | | |
| | | /** |
| | | * 接班人员id |
| | | */ |
| | | @ApiModelProperty("接班人员id") |
| | | private String successionPerson; |
| | | |
| | | /** |
| | | * 接班人员名字 |
| | | */ |
| | | @ApiModelProperty("接班人员名字") |
| | | private String successionPersonName; |
| | | |
| | | /** |
| | | * 接班时间 |
| | | */ |
| | | @ApiModelProperty("接班时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date successionTime; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | | public interface patrolType { |
| | |
| | | private String patrolType; |
| | | |
| | | /** |
| | | * 巡查领导id |
| | | */ |
| | | @ApiModelProperty("巡查领导id") |
| | | private String patrolLeader; |
| | | |
| | | /** |
| | | * 巡查人员 |
| | | */ |
| | | @ApiModelProperty("巡查人员") |
| | |
| | | private String personName; |
| | | |
| | | /** |
| | | * 接班领导id |
| | | */ |
| | | @ApiModelProperty("接班领导id") |
| | | private String successionLeader; |
| | | |
| | | /** |
| | | * 接班领导名字 |
| | | */ |
| | | @ApiModelProperty("接班领导名字") |
| | | private String successionLeaderName; |
| | | |
| | | /** |
| | | * 接班人员id |
| | | */ |
| | | @ApiModelProperty("接班人员id") |
| | | private String successionPerson; |
| | | |
| | | /** |
| | | * 接班人员名字 |
| | | */ |
| | | @ApiModelProperty("接班人员名字") |
| | | private String successionPersonName; |
| | | |
| | | /** |
| | | * 接班时间 |
| | | */ |
| | | @ApiModelProperty("接班时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date successionTime; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | | public interface patrolType { |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import com.panzhihua.common.model.helper.sensitive.Sensitive; |
| | | import com.panzhihua.common.model.helper.sensitive.SensitiveStrategy; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: IdentityAuthRecordDetailVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证记录详情 |
| | | * @author: hans |
| | | * @date: 2021/09/03 15:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("身份认证记录详情") |
| | | @EncryptDecryptClass |
| | | public class IdentityAuthRecordDetailVO { |
| | | |
| | | @ApiModelProperty(value = "自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | @Sensitive(strategy = SensitiveStrategy.USERNAME) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "身份证号") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "管辖社区") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.待审核 2.认证失败 3.已认证)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "认证视频url") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String rejectReason; |
| | | } |
| | |
| | | @ApiModel("随手拍列表统计返回参数") |
| | | public class ComActEasyPhotoStatisticsVO { |
| | | |
| | | @ApiModelProperty("待审核数量") |
| | | @ApiModelProperty("待处理数量") |
| | | private Integer examineNum = 0; |
| | | |
| | | @ApiModelProperty("待验证数量") |
| | | @ApiModelProperty("进行中数量") |
| | | private Integer verificationNum = 0; |
| | | |
| | | @ApiModelProperty("已驳回数量") |
| | | @ApiModelProperty("已公示数量") |
| | | private Integer rejectNum = 0; |
| | | |
| | | @ApiModelProperty("已完成数量") |
| | |
| | | private String option; |
| | | @ExcelProperty(value = "参与人数百分比", index = 2) |
| | | private BigDecimal tag; |
| | | @ExcelProperty(value = "选择该选项人数", index = 3) |
| | | @ExcelProperty(value = "该选项选择总次数", index = 3) |
| | | private Integer count; |
| | | @ExcelProperty(value = "该题目参与人数", index = 4) |
| | | @ExcelProperty(value = "该题目选择总次数", index = 4) |
| | | private Integer allCount; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("调研结束时间") |
| | | private String endTime; |
| | | @ApiModelProperty("是否强制调研(1.是 2.否)") |
| | | private String isForce; |
| | | private Integer isForce; |
| | | @ApiModelProperty("是否封面(1.是 2.否)") |
| | | private String isCover; |
| | | private Integer isCover; |
| | | @ApiModelProperty("问卷调查备注(应用名称)") |
| | | private String remark; |
| | | @ApiModelProperty("组件json数据") |
| | |
| | | |
| | | @ApiModelProperty(value = "选项key") |
| | | private String key; |
| | | |
| | | @ApiModelProperty(value = "图片选择组件url地址") |
| | | private String url; |
| | | } |
| | |
| | | private int sort; |
| | | @ApiModelProperty(value = "题目内容") |
| | | private String label; |
| | | @ApiModelProperty(value = "类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择", example = "0") |
| | | @ApiModelProperty(value = "类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择", example = "0") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "问卷题目选项") |
| | | private List<QuestnaiteSubSelectionVO> options; |
| | |
| | | private String values; |
| | | |
| | | /** |
| | | * 0单选1多选2问答题 |
| | | * 类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 |
| | | */ |
| | | public interface type { |
| | | int danxuan = 0; |
| | | int duoxuan = 1; |
| | | int wenda = 2; |
| | | int phone = 3; |
| | | int card = 4; |
| | | int describe = 5; |
| | | int date = 6; |
| | | int time = 7; |
| | | int input = 8; |
| | | int name = 9; |
| | | int imgselect = 10; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @create 2021-08-23 10:33:11 |
| | | * @describe 预约登记信息 |
| | | */ |
| | | |
| | | @Data |
| | | public class ComActReserveAppletsVO{ |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 类型(1.预约 2.登记) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 主题 |
| | | */ |
| | | private String title; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 总参加人数 |
| | | */ |
| | | private Integer joinAllCount; |
| | | |
| | | /** |
| | | * 参加人数 |
| | | */ |
| | | private Integer joinCount; |
| | | |
| | | /** |
| | | * 图标类型(1.预设1 2.预设2 3.预设3 4.预设4 5.用户自定义图片) |
| | | */ |
| | | private Integer imgType; |
| | | |
| | | /** |
| | | * 图标url(当img_type为5时,此字段的值为图标url地址) |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 状态(1.待发布 2.进行中 3.已停止) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishTime; |
| | | |
| | | /** |
| | | * 是否可重复提交(1.是 2.否) |
| | | */ |
| | | private Integer isRepeat; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 组件json数据 |
| | | */ |
| | | private String jsonObject; |
| | | |
| | | /** |
| | | * 是否是首页顶部(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionTop; |
| | | |
| | | /** |
| | | * 是否是首页应用(1.是 2.否) |
| | | */ |
| | | private Integer adverPositionApplication; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改人 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 操作记录 |
| | | */ |
| | | private List<ComOperationListVO> operationList; |
| | | |
| | | /** |
| | | * 预约登记id |
| | | */ |
| | | private Long reserveId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("是否可重复提交(1.是 2.否)") |
| | | private Integer isRepeat; |
| | | |
| | | @ApiModelProperty("图标类型") |
| | | private Integer imgType; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("回答内容") |
| | | private String answerContent; |
| | | |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private Integer type; |
| | | } |
| | |
| | | @ApiModelProperty("题目内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private Integer type; |
| | | |
| | | public ComActReserveSubListVO() { |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("高龄老人用户信息") |
| | | @EncryptDecryptClass |
| | | public class ComEldersAuthHistoryVO { |
| | | |
| | | @ApiModelProperty(value = "认证记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "认证姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "认证用户老人关系表id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "认证用户身份证") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "认证用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "认证用户户籍地") |
| | | private String domicile; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | private Date createAt; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 高龄老人认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计信息") |
| | | public class ComEldersAuthStatisticHeaderVO { |
| | | |
| | | @ApiModelProperty(value = "本期总人数") |
| | | private Integer allCount; |
| | | |
| | | @ApiModelProperty(value = "本期认证成功总人数") |
| | | private Integer yesCount; |
| | | |
| | | @ApiModelProperty(value = "本期认证失败总人数") |
| | | private Integer noCount; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 高龄老人认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("高龄老人认证统计信息") |
| | | @EncryptDecryptClass |
| | | public class ComEldersAuthStatisticVO { |
| | | |
| | | @ApiModelProperty(value = "认证记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "认证姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "认证用户手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "认证用户身份证") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)") |
| | | private Integer personnelCategory; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "是否已认证(1.已认证 2.未认证)") |
| | | private Integer isAuth; |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "提交用户名称") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "审核人名称") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频地址") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | private Long approverId; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "认证用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.elders; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @deprecated 养老认证统计信息 |
| | | */ |
| | | @Data |
| | | @ApiModel("养老认证统计信息") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthStatisticVO { |
| | | |
| | | @ApiModelProperty(value = "认证记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "认证姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "认证用户手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "认证用户身份证") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "性别(1.男 2.女 3.其他)") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "是否健在(1.是 0.否)") |
| | | private Integer isAlive; |
| | | |
| | | @ApiModelProperty(value = "认证期数") |
| | | private String authPeriod; |
| | | |
| | | @ApiModelProperty(value = "认证时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证 3.线下认证)") |
| | | private Integer authMethod; |
| | | |
| | | @ApiModelProperty(value = "标记") |
| | | private String mark; |
| | | |
| | | @ApiModelProperty(value = "是否已认证(1.已认证 2.未认证)") |
| | | private Integer isAuth; |
| | | |
| | | @ApiModelProperty(value = "提交用户id") |
| | | private Long submitUserId; |
| | | |
| | | @ApiModelProperty(value = "提交用户名称") |
| | | private String submitUserName; |
| | | |
| | | @ApiModelProperty(value = "审核人名称") |
| | | private String approvalName; |
| | | |
| | | @ApiModelProperty(value = "现居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "认证视频地址") |
| | | private String authVideo; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | private Long approverId; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date approvalDate; |
| | | |
| | | @ApiModelProperty(value = "认证用户生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("话题id") |
| | | private String topicId; |
| | | |
| | | @ApiModelProperty("热度") |
| | | private Long hotNum; |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Integer isBoutique; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("最后回复时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date replyAt; |
| | | |
| | | @ApiModelProperty("邻里圈评论列表") |
| | |
| | | @ApiModelProperty("邻里圈话题名字") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("驳回原因") |
| | | private String refuseReason; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("随手拍条数") |
| | | private Integer count; |
| | | } |
| | |
| | | @ApiModelProperty("话题名字") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("热度") |
| | | private Long hotNum; |
| | | |
| | | @ApiModelProperty("邻里圈数量") |
| | | private Integer count; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.redis; |
| | | |
| | | import java.time.Duration; |
| | | |
| | | import org.springframework.cache.CacheManager; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.cache.RedisCacheConfiguration; |
| | | import org.springframework.data.redis.cache.RedisCacheManager; |
| | | import org.springframework.data.redis.connection.RedisConnectionFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; |
| | | import org.springframework.data.redis.serializer.RedisSerializationContext; |
| | | import org.springframework.data.redis.serializer.RedisSerializer; |
| | | import org.springframework.data.redis.serializer.StringRedisSerializer; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.PropertyAccessor; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 缓存配置类 |
| | | * |
| | | * @author manailin Date 2021-08-27 15:30 |
| | | **/ |
| | | @Configuration |
| | | public class CacheConfig { |
| | | |
| | | private Duration timeToLive = Duration.ofHours(1); |
| | | |
| | | @Bean |
| | | public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) { |
| | | RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>(); |
| | | redisTemplate.setConnectionFactory(redisConnectionFactory); |
| | | |
| | | // 使用Jackson2JsonRedisSerialize 替换默认序列化 |
| | | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); |
| | | |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
| | | objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
| | | |
| | | jackson2JsonRedisSerializer.setObjectMapper(objectMapper); |
| | | |
| | | // 设置value的序列化规则和 key的序列化规则 |
| | | redisTemplate.setValueSerializer(jackson2JsonRedisSerializer); |
| | | redisTemplate.setKeySerializer(new StringRedisSerializer()); |
| | | redisTemplate.afterPropertiesSet(); |
| | | return redisTemplate; |
| | | } |
| | | |
| | | @Bean |
| | | public CacheManager cacheManager(RedisConnectionFactory factory) { |
| | | RedisSerializer<String> redisSerializer = new StringRedisSerializer(); |
| | | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); |
| | | |
| | | // 解决查询缓存转换异常的问题 |
| | | ObjectMapper om = new ObjectMapper(); |
| | | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
| | | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
| | | jackson2JsonRedisSerializer.setObjectMapper(om); |
| | | |
| | | // 配置序列化(解决乱码的问题) |
| | | RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(timeToLive) |
| | | .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)) |
| | | .serializeValuesWith( |
| | | RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer)) |
| | | .disableCachingNullValues(); |
| | | RedisCacheManager cacheManager = RedisCacheManager.builder(factory).cacheDefaults(config).build(); |
| | | |
| | | return cacheManager; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.redis; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.*; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 攀枝花智慧社区项目 |
| | | * <p> |
| | | * redis 操作工具类 |
| | | * <p> |
| | | * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved. |
| | | * <p> |
| | | * Company: 成都呐喊信息技术有限公司 |
| | | * <p> |
| | | * |
| | | * @author manailin |
| | | * @since 2021/8/27 8:58 |
| | | */ |
| | | @Component |
| | | public class RedisUtils { |
| | | |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | /** |
| | | * 写入缓存 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public boolean set(final String key, Object value) { |
| | | boolean result = false; |
| | | try { |
| | | ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); |
| | | operations.set(key, value); |
| | | result = true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 写入缓存设置时效时间 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public boolean set(final String key, Object value, Long expireTime) { |
| | | boolean result = false; |
| | | try { |
| | | ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); |
| | | operations.set(key, value); |
| | | redisTemplate.expire(key, expireTime, TimeUnit.SECONDS); |
| | | result = true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 批量删除对应的value |
| | | * |
| | | * @param keys |
| | | */ |
| | | public void remove(final String... keys) { |
| | | for (String key : keys) { |
| | | remove(key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 批量删除对应的value (带事务,业务代码中用到事务,则需用此方法) |
| | | * |
| | | * @param keys |
| | | */ |
| | | public void removeTransactional(final String... keys) { |
| | | for (String key : keys) { |
| | | removeTransactional(key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 批量删除key |
| | | * |
| | | * @param pattern |
| | | */ |
| | | public void removePattern(final String pattern) { |
| | | Set<Serializable> keys = redisTemplate.keys(pattern); |
| | | if (keys.size() > 0) { |
| | | redisTemplate.delete(keys); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除对应的value |
| | | * |
| | | * @param key |
| | | */ |
| | | public void remove(final String key) { |
| | | if (exists(key)) { |
| | | redisTemplate.delete(key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 判断缓存中是否有对应的value |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public boolean exists(final String key) { |
| | | return redisTemplate.hasKey(key); |
| | | } |
| | | |
| | | /** |
| | | * 读取缓存 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public Object get(final String key) { |
| | | ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); |
| | | return operations.get(key); |
| | | } |
| | | |
| | | /** |
| | | * 哈希 添加 |
| | | * |
| | | * @param key |
| | | * @param hashKey |
| | | * @param value |
| | | */ |
| | | public void hmSet(String key, Object hashKey, Object value) { |
| | | HashOperations<String, Object, Object> hash = redisTemplate.opsForHash(); |
| | | hash.put(key, hashKey, value); |
| | | } |
| | | |
| | | /** |
| | | * 哈希获取数据 |
| | | * |
| | | * @param key |
| | | * @param hashKey |
| | | * @return |
| | | */ |
| | | public Object hmGet(String key, Object hashKey) { |
| | | HashOperations<String, Object, Object> hash = redisTemplate.opsForHash(); |
| | | return hash.get(key, hashKey); |
| | | } |
| | | |
| | | /** |
| | | * 列表添加 |
| | | * |
| | | * @param k |
| | | * @param v |
| | | */ |
| | | public void lPush(String k, Object v) { |
| | | ListOperations<String, Object> list = redisTemplate.opsForList(); |
| | | list.rightPush(k, v); |
| | | } |
| | | |
| | | /** |
| | | * 列表获取 |
| | | * |
| | | * @param k |
| | | * @param l |
| | | * @param l1 |
| | | * @return |
| | | */ |
| | | public List<Object> lRange(String k, long l, long l1) { |
| | | ListOperations<String, Object> list = redisTemplate.opsForList(); |
| | | return list.range(k, l, l1); |
| | | } |
| | | |
| | | /** |
| | | * 集合添加 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | public void add(String key, Object value) { |
| | | SetOperations<String, Object> set = redisTemplate.opsForSet(); |
| | | set.add(key, value); |
| | | } |
| | | |
| | | /** |
| | | * 集合获取 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public Set<Object> setMembers(String key) { |
| | | SetOperations<String, Object> set = redisTemplate.opsForSet(); |
| | | return set.members(key); |
| | | } |
| | | |
| | | /** |
| | | * 有序集合添加 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param scoure |
| | | */ |
| | | public void zAdd(String key, Object value, double scoure) { |
| | | ZSetOperations<String, Object> zset = redisTemplate.opsForZSet(); |
| | | zset.add(key, value, scoure); |
| | | } |
| | | |
| | | /** |
| | | * 有序集合获取 |
| | | * |
| | | * @param key |
| | | * @param scoure |
| | | * @param scoure1 |
| | | * @return |
| | | */ |
| | | public Set<Object> rangeByScore(String key, double scoure, double scoure1) { |
| | | ZSetOperations<String, Object> zset = redisTemplate.opsForZSet(); |
| | | return zset.rangeByScore(key, scoure, scoure1); |
| | | } |
| | | |
| | | /** |
| | | * 加锁 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public boolean tryLock(String key) { |
| | | try { |
| | | long currTime = System.currentTimeMillis(); |
| | | // 加锁成功 |
| | | return redisTemplate.opsForValue().setIfAbsent(key, currTime); |
| | | } finally { |
| | | redisTemplate.expire(key, 5, TimeUnit.SECONDS); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComExServicemanDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarSaveDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportHandleDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwRotaPageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwRotaSaveDTO; |
| | | import com.panzhihua.common.model.dtos.community.DisabledPersonsDTO; |
| | | import com.panzhihua.common.model.dtos.community.EditComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddByFamilyDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthElderlyDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthFeedbackAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportComMngCarExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportRealAssetsExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; |
| | | import com.panzhihua.common.model.dtos.community.GrantRewardDTO; |
| | | import com.panzhihua.common.model.dtos.community.KeyPersonInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtServeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngRealAssetsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthElderlyDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthHistoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireAnswerDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireSubDetailsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageUserReserveDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenStatisticAgeGenderDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveStatusDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.MakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.grid.admin.ComMngVillageListExportAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationHouseDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborAddBrowseAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleDetailAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentReplyAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborFabulousAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborForwardAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborReplyAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopAddressDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopCartDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopEditNubCartDTO; |
| | |
| | | import com.panzhihua.common.model.vos.DictionaryVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageBackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthElderlyDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngBuildingExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationCorrectExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationCultExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDisabilityExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDrugExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationKeyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationLowSecurityExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMajorExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationRehabilitationExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationSentenceExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVeteransExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealAssetsExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealAssetsVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseUndercarriageVO; |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComStreetVO; |
| | | import com.panzhihua.common.model.vos.community.ComSwRotaExcelVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthElderlyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticAgeGender; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; |
| | |
| | | import com.panzhihua.common.model.vos.community.questnaire.EditComActQuestnaireVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; |
| | |
| | | * @return 详情 |
| | | */ |
| | | @PostMapping("detailactivity") |
| | | R detailActivity(@RequestParam("id") Long id, @RequestParam(value = "userId", required = false) Long userId); |
| | | R detailActivity(@RequestParam("id") Long id, @RequestParam(value = "userId", required = false) Long userId,@RequestParam(value = "pageNum", required = false) Long pageNum,@RequestParam(value = "pageSize", required = false) Long pageSize); |
| | | |
| | | /** |
| | | * 分页活动报名名单 |
| | |
| | | */ |
| | | @GetMapping("/activity/picture/getList") |
| | | R getPictureList(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取系统预置图库 getSysPictureList |
| | | * @return R 系统图库集 |
| | | * @author txb |
| | | * @date 2021/8/27 13:33 |
| | | */ |
| | | @GetMapping("/activity/sysPicture/getList") |
| | | R getSysPictureList(@RequestParam("type")Integer type); |
| | | |
| | | /** |
| | | * 活动报名名单 |
| | |
| | | */ |
| | | @PostMapping("pagemicrowish") |
| | | R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | /** |
| | | * 小程序分页查询微心愿 |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | @PostMapping("pagemicrowish/applets") |
| | | R pageMicroWishApplets(@RequestBody ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | /** |
| | | * 心愿详情 |
| | |
| | | R addComActEasyPhotoComment(@RequestBody ComActEasyPhotoCommentDTO comActEasyPhotoCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | |
| | | R addDiscuss(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("editdiscuss") |
| | | R editDiscuss(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-详情 |
| | | * |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | R detailDiscuss(@RequestParam("id") Long id); |
| | | R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @PostMapping("discussCommentReplyAdmin") |
| | | R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R deleteDiscuss(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | |
| | | R addDiscussComment(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("pagediscussAdmin") |
| | | R pageDiscussAdmin(@RequestBody PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscussComment(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @PostMapping("detaildiscusscommentAdmin") |
| | | R detailDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R putDiscussCommentTop(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | |
| | | R addDiscussCommentBack(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | |
| | | R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @PostMapping("pagediscusscommentAdmin") |
| | | R pageDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscussApplets(@RequestBody PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | |
| | | R putDiscussUser(@RequestBody ComActDiscussUserDTO comActDiscussUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | |
| | | R pageDiscussCommentApplets(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscussApplets(@RequestParam("id") Long id, @RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | |
| | | R addDiscussOptionUser(@RequestBody ComActDiscussOptionUserDTO comActDiscussOptionUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 评论点赞 |
| | |
| | | R pageComCvtBusinessByServiceArea(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO); |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comOpsHouseDTO |
| | | * 新增参数 |
| | |
| | | R addOpsHouse(@RequestBody ComOpsHouseDTO comOpsHouseDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R undercarriageHouse(@RequestBody ComOpsHouseUndercarriageVO comOpsHouseVO); |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | */ |
| | | @PostMapping("/convenient/serve/import") |
| | | R listSaveConvenientServeExcelVO(@RequestBody List<ComCvtServeExcelVO> list, |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | |
| | | /** |
| | | * 导出房屋信息 |
| | |
| | | */ |
| | | @PostMapping("/common/data/company/import") |
| | | R listSaveMngRealCompanyExcelVO(@RequestBody List<ComMngRealCompanyExcelVO> list, |
| | | @RequestParam("communityId") Long communityId); |
| | | @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 实有单位导出 |
| | |
| | | */ |
| | | @PostMapping("/common/data/assets/import") |
| | | R listSaveMngRealAssetsExcelVO(@RequestBody List<ComMngRealAssetsExcelVO> list, |
| | | @RequestParam("communityId") Long communityId); |
| | | @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 实有单位导出 |
| | |
| | | */ |
| | | @PostMapping("/village/import") |
| | | R listSaveVillageServeExcelVO(@RequestBody List<ComMngVillageServeExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId); |
| | | @RequestParam(value = "communityId") Long communityId); |
| | | |
| | | /** |
| | | * 批量导入实有人口 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/import") |
| | | R listSavePopulationServeExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入吸毒人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importDrug") |
| | | R listSavePopulationDrugExcelVO(@RequestBody List<ComMngPopulationDrugExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入社区矫正人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importCorrect") |
| | | R listSavePopulationCorrectExcelVO(@RequestBody List<ComMngPopulationCorrectExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入重精人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importMajor") |
| | | R listSavePopulationMajorExcelVO(@RequestBody List<ComMngPopulationMajorExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入邪教人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importCult") |
| | | R listSavePopulationCultExcelVO(@RequestBody List<ComMngPopulationCultExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入刑释人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importRehabilitation") |
| | | R listSavePopulationRehabilitationExcelVO(@RequestBody List<ComMngPopulationRehabilitationExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入重点上访人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importKey") |
| | | R listSavePopulationKeyExcelVO(@RequestBody List<ComMngPopulationKeyExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入服刑人员 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importSentence") |
| | | R listSavePopulationSentenceExcelVO(@RequestBody List<ComMngPopulationSentenceExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入退役军人 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importVeterans") |
| | | R listSavePopulationVeteransExcelVO(@RequestBody List<ComMngPopulationVeteransExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入残疾人 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importDisability") |
| | | R listSavePopulationDisabilityExcelVO(@RequestBody List<ComMngPopulationDisabilityExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入低保户 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/importLowSecurity") |
| | | R listSavePopulationLowSecurityExcelVO(@RequestBody List<ComMngPopulationLowSecurityExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入高龄老人 listSavePopulationElderExcelVO 批量导入高龄老人 |
| | | * @param list 高龄老人数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @PostMapping("/common/data/population/importElder") |
| | | R listSavePopulationElderExcelVO(@RequestBody List<ComMngPopulationElderExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入养老金人员 listSavePopulationPensionExcelVO 批量导入养老金人员 |
| | | * @param list 养老金人员数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @PostMapping("/common/data/population/importPension") |
| | | R listSavePopulationPensionExcelVO(@RequestBody List<ComMngPopulationPensionExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入高龄老人线下认证记录 listSaveElderAuthRecordExcelVO 批量导入高龄老人线下认证记录 |
| | | * @param list 高龄老人线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/underLine/import") |
| | | R listSaveElderAuthRecordExcelVO(@RequestBody List<ComElderAuthRecordImportExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 批量导入养老线下认证记录 listSavePensionAuthRecordExcelVO 批量导入养老线下认证记录 |
| | | * @param list 养老线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/underLine/import") |
| | | R listSavePensionAuthRecordExcelVO(@RequestBody List<ComPensionAuthRecordImportExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId); |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/import/confirm") |
| | | R listSavePopulationConfirm(@RequestBody List<ComMngPopulationServeExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId); |
| | | @RequestParam(value = "communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页查询实有人口 |
| | |
| | | * @return 实有人口详细信息 |
| | | */ |
| | | @PostMapping("/common/data/population/detail") |
| | | R<ComMngPopulationVO> detailPopulation(@RequestParam(value = "populationId") Long populationId); |
| | | R<ComMngPopulationVO> detailPopulation(@RequestParam(value = "populationId") Long populationId, @RequestParam(value = "communityId") Long communityId); |
| | | |
| | | /** |
| | | * 根据id查询实有人口电子档案信息 |
| | |
| | | |
| | | /** |
| | | * 小程序-问卷调查详情 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param questId |
| | |
| | | |
| | | /** |
| | | * 小程序-新增问卷调查浏览数量 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷调查id |
| | | * @return 增加结果 |
| | |
| | | |
| | | /** |
| | | * 小程序-用户弹窗添加不在提醒接口 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷id |
| | | * @param userId |
| | |
| | | |
| | | /** |
| | | * 社区后台-查询问卷调查详情 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 问卷id |
| | | * @return 问卷调查详情 |
| | |
| | | */ |
| | | @PostMapping("/common/data/population/edit") |
| | | R editPopulation(@RequestBody ComMngPopulationEditDTO populationEditDTO, |
| | | @RequestParam("communityId") Long communityId); |
| | | @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 微心愿删除 |
| | |
| | | */ |
| | | @PostMapping("/delectworkguide") |
| | | R delectWorkGuide(@RequestParam("workGuideId") Long workGuideId); |
| | | |
| | | /** |
| | | * 分页查询办事指南-分类管理 pageWorkGuideClassify 分页查询办事指南-分类管理 |
| | | * @param comActWorkGuideClassifyVO 查询参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @PostMapping("/workGuide/classify/apage") |
| | | R pageWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 办事指南-分类管理新增或修改 addWorkGuideClassify 办事指南-分类管理新增或修改 |
| | | * @param comActWorkGuideClassifyVO 新增或修改参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @PostMapping("/workGuide/classify/add") |
| | | R addWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 办事指南-分类管理删除 deleteWorkGuideClassify 办事指南-分类管理删除 |
| | | * @param workGuideClassifyId 办事指南-分类管理id |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("/workGuide/classify/delete") |
| | | R deleteWorkGuideClassify(@RequestParam("workGuideClassifyId") Long workGuideClassifyId); |
| | | |
| | | /** |
| | | * 办事指南-分类管理列表查询 getWorkGuideClassifyList 办事指南-分类管理列表查询 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("/workGuide/classify/getList") |
| | | R getWorkGuideClassifyList(); |
| | | |
| | | /** |
| | | * 分页查询邻里圈 |
| | |
| | | @PostMapping("/eldersauth/addFeedback") |
| | | R addFeedback(@RequestBody EldersAuthFeedbackAddDTO eldersAuthFeedbackAddDTO); |
| | | |
| | | //2021-8-30 身份认证改版(高龄老人认证管理)接口 |
| | | /** |
| | | * 分页查询高龄老人认证记录 pageElderAuthRecords 分页查询高龄老人认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/page") |
| | | R pageElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 根据高龄认证记录id查询详情 detailElderAuthRecords 根据高龄认证记录id查询详情 |
| | | * @param authRecordId 高龄认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @GetMapping("/elders/authRecords/detail") |
| | | R detailElderAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId); |
| | | |
| | | /** |
| | | * 高龄认证审核 examineElderAuthRecords 高龄认证审核 |
| | | * @param comElderAuthRecordVO 高龄认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/examine") |
| | | R examineElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO); |
| | | |
| | | /** |
| | | * 高龄认证标记 examineElderAuthRecords 高龄认证标记 |
| | | * @param comElderAuthRecordVO 高龄认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/sign") |
| | | R signElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO); |
| | | |
| | | /** |
| | | * 根据高龄认证记录id批量查询 getElderAuthRecordsByIds 根据高龄认证记录id批量查询 |
| | | * @param ids 高龄认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/getList") |
| | | R getElderAuthRecordsByIds(@RequestBody List<Long> ids); |
| | | |
| | | /** |
| | | * 导出高龄认证统计记录 exportElderAuthRecordsStatistic |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/statistic/export") |
| | | R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 14:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/page") |
| | | R pagePensionAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 根据养老认证记录id查询详情 detailPensionAuthRecords 根据养老认证记录id查询详情 |
| | | * @param authRecordId 养老认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @GetMapping("/elders/pensionAuthRecords/detail") |
| | | R detailPensionAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId); |
| | | |
| | | /** |
| | | * 养老认证审核 examinePensionAuthRecords 养老认证审核 |
| | | * @param comPensionAuthRecordVO 养老认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/examine") |
| | | R examinePensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO); |
| | | |
| | | /** |
| | | * 养老认证标记 signPensionAuthRecords 养老认证标记 |
| | | * @param comPensionAuthRecordVO 养老认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/sign") |
| | | R signPensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO); |
| | | |
| | | /** |
| | | * 根据养老认证记录id批量查询 getPensionAuthRecordsByIds 根据养老认证记录id批量查询 |
| | | * @param ids 养老认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/getList") |
| | | R getPensionAuthRecordsByIds(@RequestBody List<Long> ids); |
| | | |
| | | /** |
| | | * 导出养老认证记录 exportPensionAuthRecordsStatistic 导出养老认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/statistic/export") |
| | | R exportPensionAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/authtype") |
| | | R communityPensionAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/elders/pensionAuthRecords/authType/{type}") |
| | | R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | | * |
| | |
| | | * @param eldersAuthTypeQueryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/elders/authtype") |
| | | @PostMapping("/elders/authType") |
| | | R communityElderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("/eldersauthelderly/batchSave") |
| | | R listSaveEldersAuthElderlyExcelVO(@RequestBody List<EldersAuthElderlyExcelVO> newVoList, |
| | | @RequestParam("communityId") Long communityId, @RequestParam("createBy") Long createBy); |
| | | @RequestParam("communityId") Long communityId, @RequestParam("createBy") Long createBy); |
| | | |
| | | /** |
| | | * 批量保存楼栋 |
| | |
| | | */ |
| | | @PostMapping("/building/batchSave") |
| | | R listSaveBuildingExcelVO(@RequestBody List<ComMngBuildingExcelVO> newVoList, |
| | | @RequestParam("communityId") Long communityId); |
| | | @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 插入字典 |
| | |
| | | */ |
| | | @PostMapping("/bigscreen/party/ageGender") |
| | | R<BigScreenStatisticAgeGender> |
| | | ageGender(@RequestBody BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); |
| | | ageGender(@RequestBody BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO); |
| | | |
| | | /** |
| | | * 党建数据概览 |
| | |
| | | */ |
| | | @PostMapping("/bigscreen/party/bigscreenPartyactivity") |
| | | R<List<BigScreenStatisticPartyActivity>> |
| | | bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); |
| | | bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO); |
| | | |
| | | /** |
| | | * 首页大屏统计接口 |
| | |
| | | R activity(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 大屏统计一起议 |
| | | * 大屏统计议事投票 |
| | | * |
| | | * @param communityId |
| | | * @return |
| | |
| | | R getScreenEventDetail(@RequestBody BigScreenEventDetailDTO eventDetailDTO); |
| | | |
| | | /** |
| | | * 工作大屏-一起议列表 |
| | | * 工作大屏-议事投票列表 |
| | | * |
| | | * @param discussListDTO |
| | | * 请求参数 |
| | | * @return 一起议列表 |
| | | * @return 议事投票列表 |
| | | */ |
| | | @PostMapping("/screen/work/getScreenDiscussList") |
| | | R getScreenDiscussList(@RequestBody ScreenDiscussListDTO discussListDTO); |
| | |
| | | |
| | | /** |
| | | * 查询用户交易记录总额 |
| | | * |
| | | * |
| | | * @param pageTradeAdminDTO |
| | | * 请求参数 |
| | | * @return 交易记录总额 |
| | |
| | | |
| | | /** |
| | | * 查询用户导出数据 |
| | | * |
| | | * |
| | | * @param pageTradeAdminDTO |
| | | * 请求参数 |
| | | * @return 用户导出数据 |
| | |
| | | |
| | | /** |
| | | * 导出奖励台账数据 |
| | | * |
| | | * |
| | | * @param pageTradeAdminDTO |
| | | * 请求参数 |
| | | * @return 奖励台账数据 |
| | |
| | | |
| | | /** |
| | | * 查询社区统计数据 |
| | | * |
| | | * |
| | | * @param pageTradeAdminDTO |
| | | * 查询社区统计数据 |
| | | * @return 社区统计数据 |
| | |
| | | |
| | | /** |
| | | * 社区随手拍列表统计 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 统计结果 |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("/neighbor/getNeighborTopicByApp") |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId); |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name); |
| | | |
| | | /** |
| | | * 综治后台-查询社区列表 |
| | |
| | | R getUserReward(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 获取首页弹窗接口 |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 首页弹窗接口 |
| | | */ |
| | | @PostMapping("/easyphoto/getUserRewards") |
| | | R getUserRewards(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * @param userId |
| | |
| | | R addPatrolRecord(@RequestBody ComSwPatrolRecordAddDTO comSwPatrolRecordAddDTO); |
| | | |
| | | /** |
| | | * 编辑巡查记录 editPatrolRecord 编辑巡查记录 |
| | | * @param comSwPatrolRecordEditDTO 编辑巡查记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/patrolRecord/edit") |
| | | R editPatrolRecord(@RequestBody ComSwPatrolRecordEditDTO comSwPatrolRecordEditDTO); |
| | | |
| | | /** |
| | | * 根据巡查记录id查询详情 |
| | | * |
| | | * @param patrolRecordId |
| | |
| | | R pageSafetyWorkRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO); |
| | | |
| | | /** |
| | | * 编辑安全工作记录 editSafetyWork 编辑安全工作记录 |
| | | * @param comSwSafetyWorkEditDTO 编辑安全工作记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/patrolRecord/safetyWorkRecord/edit") |
| | | R editSafetyWork(@RequestBody ComSwSafetyWorkEditDTO comSwSafetyWorkEditDTO); |
| | | |
| | | /** |
| | | * 根据安全工作记录id查询详情 |
| | | * |
| | | * @param safetyWorkRecordId |
| | |
| | | */ |
| | | @GetMapping("/patrolRecord/safetyWorkRecord/detail") |
| | | R detailSafetyWorkRecord(@RequestParam(value = "safetyWorkRecordId") Long safetyWorkRecordId, |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | |
| | | /** |
| | | * 根据巡查记录id查询安全工作记录详情 |
| | |
| | | */ |
| | | @GetMapping("/patrolRecord/safetyWorkRecord/detailByPrId") |
| | | R detailSafetyWorkRecordByPrId(@RequestParam(value = "patrolRecordId") Long patrolRecordId, |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | @RequestParam(value = "communityId", required = false) Long communityId); |
| | | |
| | | /** |
| | | * 分页查询隐患报告 |
| | |
| | | */ |
| | | @PostMapping("/patrolRecord/dangerReport/page") |
| | | R pageDangerReport(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO); |
| | | |
| | | /** |
| | | * 编辑隐患报告 editDangerReport 编辑隐患报告 |
| | | * @param comSwDangerReportEditDTO 编辑隐患报告参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/patrolRecord/dangerReport/edit") |
| | | R editDangerReport(@RequestBody ComSwDangerReportEditDTO comSwDangerReportEditDTO); |
| | | |
| | | /** |
| | | * 根据隐患报告id查询详情 |
| | |
| | | |
| | | /** |
| | | * 小程序-查询积分说明 |
| | | * |
| | | * |
| | | * @return 积分说明 |
| | | */ |
| | | @GetMapping("/integral/explain/applets") |
| | |
| | | |
| | | /** |
| | | * 小程序-用户查询当前社区可领取积分规则列表 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | |
| | | |
| | | /** |
| | | * 小程序-查询用户积分列表 |
| | | * |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 用户积分列表 |
| | |
| | | |
| | | /** |
| | | * 小程序-查询社区积分账户排行榜 |
| | | * |
| | | * |
| | | * @param communityRankDTO |
| | | * 请求参数 |
| | | * @return 社区积分账户排行榜 |
| | |
| | | |
| | | /** |
| | | * 小程序-查询用户社区积分明细 |
| | | * |
| | | * |
| | | * @param communityTradeDTO |
| | | * 请求参数 |
| | | * @return 用户社区积分明细 |
| | |
| | | |
| | | /** |
| | | * 社区后台-根据社区id查询社区下积分规则列表 |
| | | * |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 社区下积分规则列表 |
| | |
| | | |
| | | /** |
| | | * 社区后台-编辑社区积分规则 |
| | | * |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 编辑结果 |
| | |
| | | |
| | | /** |
| | | * 社区后台-分页查询社区下积分明细记录 |
| | | * |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 社区下积分明细记录 |
| | |
| | | |
| | | /** |
| | | * 给用户添加积分 |
| | | * |
| | | * |
| | | * @param integralUserDTO |
| | | * 请求参数 |
| | | * @return 添加积分结果 |
| | |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | |
| | | |
| | | /** |
| | | * 根据id查询值班表 |
| | | * |
| | | * |
| | | * @param rotaId |
| | | * 值班表id |
| | | * @return 值班表详情 |
| | |
| | | |
| | | /** |
| | | * 批量删除值班表 |
| | | * |
| | | * |
| | | * @param rotaIds |
| | | * 值班ids |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 查询社区所有列表 |
| | | * |
| | | * |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/switch/community/all/list") |
| | |
| | | |
| | | /** |
| | | * 根据名字查询所有社区列表 |
| | | * |
| | | * |
| | | * @param name |
| | | * 社区名字 |
| | | * @return 社区列表 |
| | |
| | | |
| | | /** |
| | | * 根据经纬度以及距离搜索附近社区列表 |
| | | * |
| | | * |
| | | * @param communityDTO |
| | | * 请求参数 |
| | | * @return 社区列表 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总 |
| | | * |
| | | * |
| | | * @param summaryDTO |
| | | * 请求参数 |
| | | * @return 统计汇总 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总导出数据查询 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 调查问卷id |
| | | * @return 调查统计汇总导出数据 |
| | |
| | | |
| | | /** |
| | | * 问卷调查统计汇总表头统计 |
| | | * |
| | | * |
| | | * @param questId |
| | | * 调查问卷id |
| | | * @return 问卷调查统计汇总表头统计数据 |
| | |
| | | |
| | | /** |
| | | * 运营后台-新增随手拍分类 |
| | | * |
| | | * |
| | | * @param addPhotoClassify |
| | | * 请求参数 |
| | | * @return 新增结果 |
| | |
| | | |
| | | /** |
| | | * 运营后台-编辑随手拍分类 |
| | | * |
| | | * |
| | | * @param addPhotoClassify |
| | | * 请求参数 |
| | | * @return 编辑结果 |
| | |
| | | |
| | | /** |
| | | * 运营后台-分页查询随手拍分类 |
| | | * |
| | | * |
| | | * @param addPhotoClassify |
| | | * 请求参数 |
| | | * @return 随手拍分类列表 |
| | |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类详情 |
| | | * |
| | | * |
| | | * @param id |
| | | * 随手拍分类id |
| | | * @return 随手拍分类 |
| | |
| | | |
| | | /** |
| | | * 运营后台-随手拍分类删除 |
| | | * |
| | | * |
| | | * @param id |
| | | * 随手拍分类id |
| | | * @return 删除结果 |
| | |
| | | |
| | | /** |
| | | * 运营后台-查询随手拍分类列表 |
| | | * |
| | | * |
| | | * @return 随手拍分类列表 |
| | | */ |
| | | @GetMapping("/classify/admin/list") |
| | |
| | | |
| | | /** |
| | | * 社区后台-切换随手拍公示状态 |
| | | * |
| | | * |
| | | * @param comActEasyPhotoVO |
| | | * 请求参数 |
| | | * @return 切换结果 |
| | |
| | | |
| | | /** |
| | | * 查询社区待处理随手拍id集合 |
| | | * |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 社区待处理随手拍id集合 |
| | |
| | | R timedTaskActivityDefaultPraise(); |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/neighbor/addNeighborTopicByApp") |
| | | R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO); |
| | | |
| | | /** |
| | | * 小程序-删除邻里圈 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/neighbor/deleteNeighborByApp") |
| | | R deleteNeighborByApp(@RequestBody DeleteNeighborCircleAppDTO circleTopicAppDTO); |
| | | |
| | | /** |
| | | * 获取系统配置value |
| | | * @param key 系统配置code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value |
| | | */ |
| | | @GetMapping("/sys/conf/getSysConfValue") |
| | | R getSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 新增系统配置 |
| | | * @param key 系统配置code |
| | | * @param communityId 社区id |
| | | * @param name 系统配置名称 |
| | | * @param value 系统配置value |
| | | * @return 新增结果 |
| | | */ |
| | | @GetMapping("/sys/conf/addSysConfValue") |
| | | R addSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId,@RequestParam("name") String name,@RequestParam("value") String value); |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | @GetMapping("/sys/conf/editSysConfValue") |
| | | R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status); |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @PostMapping("publishResultAdmin") |
| | | R publishResultAdmin(@RequestBody ComActDiscussPublishResultDTO publishResultDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("deleteDiscussCommentAdmin") |
| | | R deleteDiscussCommentAdmin(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @GetMapping("discussJurisdictionGet") |
| | | R discussJurisdictionGet(@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @GetMapping("discussJurisdictionSet") |
| | | R discussJurisdictionSet(@RequestParam("communityId") Long communityId, @RequestParam("value") String value); |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("timedTaskDiscussInspectStatus") |
| | | R timedTaskDiscussInspectStatus(); |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @PostMapping("discuss/increase-view-num") |
| | | void increaseViewNum(@RequestParam("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 定时任务每半小时执行一次将一起议浏览量写入到表中 |
| | | */ |
| | | @PostMapping("discuss/write-view-num") |
| | | R timedTaskWriteDiscussViewNumToTable(); |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @PostMapping("discuss/edit-result") |
| | | R editDiscussResult(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 定时任务扫描高龄认证记录信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/auth/task") |
| | | R timedTaskEldersAuthJobHandler(); |
| | | |
| | | /** |
| | | * 定时任务扫描上月高龄认证使用视频认证的用户添加成功记录 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/auth/record/task") |
| | | R timedTaskEldersAuthRecordJobHandler(); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/authRecords/statistics") |
| | | R timedTaskElderAuthStatisticsJobHandler(); |
| | | |
| | | /** |
| | | * 定时任务每年3月1号0点统计养老认证本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/pensionAuthRecords/statistics") |
| | | R timedTaskPensionAuthStatisticsJobHandler(); |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @PostMapping("/listworkguide") |
| | | R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @GetMapping("/listworkguide/classify") |
| | | R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId); |
| | | |
| | | /** |
| | | * 小程序查询所有进行中的预约登记 |
| | | * @param communityId 社区id |
| | | * @return 社区所有进行中的预约登记列表 |
| | | */ |
| | | @GetMapping("/reserve/list") |
| | | R reserveListApplets(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询社区高龄认证方式(1.视频认证 2.人脸核验) |
| | | * @param eldersAuthTypeQueryDTO 请求参数 |
| | | * @return 社区高龄认证方式(1.视频认证 2.人脸核验) |
| | | */ |
| | | @PostMapping("/elders/new/authtype") |
| | | R communityEldersAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | */ |
| | | @PutMapping("/elders/new/authType/{type}") |
| | | R setEldersAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 新增身份认证 |
| | | * @param addIdentityAuthDTO 新增身份认证请求参数 |
| | | * @return 新增结果结果 |
| | | */ |
| | | @PostMapping("/identity-auth/add") |
| | | R addIdentityAuth(@RequestBody AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询身份认证记录 |
| | | * @param pageIdentityAuthRecordDTO 分页查询身份认证记录参数 |
| | | * @return 身份认证记录列表 |
| | | */ |
| | | @PostMapping("/identity-auth/record/page") |
| | | R queryRecordWithPage(@RequestBody PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param authType 认证类型 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @GetMapping("/identity-auth/detail") |
| | | R retrieveIdentityAuthDetail(@RequestParam("authType") Integer authType, |
| | | @RequestParam("identityAuthId") Long identityAuthId); |
| | | |
| | | /** |
| | | * 获取身份认证方式 |
| | | * @param communityId |
| | | * @param identityAuthType |
| | | * @return 认证方式 |
| | | */ |
| | | @GetMapping("/identity-auth/mode") |
| | | R getIdentityAuthMode(@RequestParam(value = "communityId") Long communityId, |
| | | @RequestParam(value = "identityAuthType") Integer identityAuthType); |
| | | |
| | | /** |
| | | * 获取身份认证人脸核验token |
| | | * @param getIdentityEidTokenDTO |
| | | * @return token |
| | | */ |
| | | @PostMapping("/identity-auth/getEidToken") |
| | | R getEidToken(@RequestBody GetIdentityEidTokenDTO getIdentityEidTokenDTO); |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("discuss/permissions") |
| | | R getDiscussPermissions(@RequestBody ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @PostMapping("/elders/auth/statistic/page") |
| | | R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/elders/auth/statistic/sign") |
| | | R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @PostMapping("/elders/auth/header/statistic") |
| | | R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/statistic/page") |
| | | R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/statistic/sign") |
| | | R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/elders/pension/auth/header/statistic") |
| | | R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | |
| | | * @return 标签集合 |
| | | */ |
| | | @PostMapping("listtag/getTag") |
| | | R listTags(@RequestParam("communityId") Long communityId); |
| | | R listTags(); |
| | | |
| | | /** |
| | | * 添加SysUser信息 |
| | |
| | | */ |
| | | @GetMapping("getUserListByCommunityId") |
| | | R getUserListByCommunityId(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 检查当前用户是否是社区工作人员 |
| | | * @param phone |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("checkIsTeam") |
| | | R checkCurrentUserIsTeam(@RequestParam("phone") String phone, @RequestParam("communityId") Long communityId); |
| | | } |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.constants.Constants; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | |
| | | return age - 1; |
| | | } |
| | | |
| | | /** |
| | | * 根据身份证号判断年龄段 |
| | | * @param idCard 身份证号 |
| | | * @return 年龄段(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | public static int getAgeCategory(String idCard){ |
| | | int nub = -1; |
| | | int age = 0; |
| | | try { |
| | | age = IdcardUtil.getAgeByIdCard(idCard); |
| | | }catch (Exception e){ |
| | | return -1; |
| | | } |
| | | if (age >= Constants.EIGHTY && age < Constants.NINETY) { |
| | | nub = 1; |
| | | }else if (age >= Constants.NINETY && age < Constants.ONE_HUNDRED){ |
| | | nub = 2; |
| | | }else if (age >= Constants.ONE_HUNDRED){ |
| | | nub = 3; |
| | | } |
| | | return nub; |
| | | } |
| | | |
| | | public static int getAgeFromBirthTimes(long birthTimeLong) { |
| | | Date date = new Date(birthTimeLong * 1000l); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | public static SimpleDateFormat ymdhm_format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | public static DateTimeFormatter format_ymd_String = DateTimeFormatter.ofPattern("yyMMdd"); |
| | | public static SimpleDateFormat yyyyMM_format = new SimpleDateFormat("yyyy-MM"); |
| | | public static SimpleDateFormat format_yyymmdd = new SimpleDateFormat("yyyyMMdd"); |
| | | private static DateTimeFormatter format_ymdhmssss = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); |
| | | private static DateTimeFormatter format_ymds = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | |
| | |
| | | return instance.get(Calendar.MONTH); |
| | | } |
| | | |
| | | public static int getYear(Date date) { |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.setTime(date); |
| | | return instance.get(Calendar.YEAR); |
| | | } |
| | | |
| | | public static boolean before(Date start, Date end) { |
| | | Calendar date1 = Calendar.getInstance(); |
| | | date1.setTime(start); |
| | |
| | | // Date after = new Date(); |
| | | // System.out.println(getFirstDayOfMonthString()); |
| | | // System.out.println(getDayOfMonthString()); |
| | | |
| | | } |
| | | } |
| | |
| | | stringEntity.setContentEncoding(HttpConstant.UTF8_ENCODE); |
| | | stringEntity.setContentType(HttpConstant.APPLICATION_JSON); |
| | | httpPost.setEntity(stringEntity); |
| | | log.info("请求{}接口的参数为{}", url, jsonParam); |
| | | // log.info("请求{}接口的参数为{}", url, jsonParam); |
| | | // 执行发送,获取相应结果 |
| | | httpResponse = httpClient.execute(httpPost); |
| | | httpEntity = httpResponse.getEntity(); |
| | |
| | | } |
| | | // 请求接口的响应时间 |
| | | endTime = System.currentTimeMillis(); |
| | | log.info("请求{}接口的响应报文内容为{},本次请求API接口的响应时间为:{}毫秒", url, result, (endTime - startTime)); |
| | | // log.info("请求{}接口的响应报文内容为{},本次请求API接口的响应时间为:{}毫秒", url, result, (endTime - startTime)); |
| | | return result; |
| | | |
| | | } |
| | |
| | | BufferedReader in = null; |
| | | try { |
| | | String urlNameString = url + "?" + param; |
| | | log.info("sendGet - {}", urlNameString); |
| | | // log.info("sendGet - {}", urlNameString); |
| | | URL realUrl = new URL(urlNameString); |
| | | URLConnection connection = realUrl.openConnection(); |
| | | connection.setRequestProperty("accept", "*/*"); |
| | |
| | | while ((line = in.readLine()) != null) { |
| | | result.append(line); |
| | | } |
| | | log.info("recv - {}", result); |
| | | // log.info("recv - {}", result); |
| | | } catch (ConnectException e) { |
| | | log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); |
| | | } catch (SocketTimeoutException e) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 预约提醒订阅消息通知 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | * @param result 预约结果 |
| | | * @param title 预约主题 |
| | | * @param name 预约人 |
| | | * @param time 预约时间 |
| | | */ |
| | | public static void sendSubscribeYYTX(String openId, String accessToken, String result, String title, String name,String time){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(WxSubscribeConstants.YYTX_ID); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("phrase8",result));//预约结果 |
| | | paras.add(new TemplateParam("thing23",title));//预约主题 |
| | | paras.add(new TemplateParam("name5",name));//预约人 |
| | | paras.add(new TemplateParam("date7",time));//预约时间 |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("预约提醒订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | |
| | | package com.panzhihua.community_backstage; |
| | | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.cloud.client.SpringCloudApplication; |
| | | import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | |
| | | |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | @EnableCaching |
| | | @EnableSwagger2 |
| | | @SpringCloudApplication |
| | | @EnableCircuitBreaker |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.HttpConstant; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.utlis.HttpClientUtil; |
| | | import com.panzhihua.common.utlis.HttpUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | } |
| | | return userService.getGridsMemberList(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "民生大屏出入记录接口@lyq") |
| | | @GetMapping("/event/inAndOut/record") |
| | | public R inAndOutRecord(@RequestParam("pageNum") Long pageNum,@RequestParam("pageSize") Long pageSize,@RequestParam("areaId") Long areaId) { |
| | | if (pageNum == null || pageNum == null || areaId == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | String param = "page=" + pageNum + "&size=" + pageSize + "&areaId=" + areaId; |
| | | String resultJson = HttpUtils.sendGet(HttpConstant.NEIJIANG_URL ,param); |
| | | JSONObject result = JSON.parseObject(resultJson); |
| | | return R.ok(result.getString("data")); |
| | | } |
| | | |
| | | @ApiOperation(value = "民生大屏报警记录接口@lyq") |
| | | @PostMapping("/event/callThePolice/record") |
| | | public R callThePoliceRecord(@RequestBody CommonPage commonPage) { |
| | | if (commonPage == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | String resultJson = HttpClientUtil.sendPostByJson(HttpConstant.CALL_THE_POLICE_URL,JSON.toJSONString(commonPage),0,null,null); |
| | | JSONObject result = JSON.parseObject(resultJson); |
| | | return R.ok(result.getString("data")); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.community_backstage.config.SFTPConfig; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | List<ComActReserveMakeRightStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeRightStatisticsAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeRightExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeRightExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | |
| | | List<ComActReserveMakeListAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeListAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeDetailedExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeDetailedExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | |
| | | List<ComActReserveRegisterStatisticsAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveRegisterStatisticsAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveRegisterExcelAdminVO makeRightExcelAdminVO = new ComActReserveRegisterExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | | try { |
| | |
| | | List<ComActReserveMakeHandleListAdminVO> rightStatisticsList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActReserveMakeHandleListAdminVO.class); |
| | | rightStatisticsList.forEach(rightStatistics -> { |
| | | ComActReserveMakeHandleExcelAdminVO makeRightExcelAdminVO = new ComActReserveMakeHandleExcelAdminVO(); |
| | | BeanUtils.copyProperties(rightStatistics,makeRightExcelAdminVO); |
| | | BeanUtils.copyProperties(rightStatistics, makeRightExcelAdminVO); |
| | | makeRightExcelAdminVO.setStatus(ReserveRecordStatusEnum.getCnDescByName(rightStatistics.getStatus())); |
| | | resultList.add(makeRightExcelAdminVO); |
| | | }); |
| | |
| | | String firstRowContent = "登记明细"; |
| | | List<String> head0 = new ArrayList<>(); |
| | | head0.add(firstRowContent); |
| | | head0.add("姓名"); |
| | | head0.add("登记人昵称"); |
| | | headList.add(head0); |
| | | List<String> head1 = new ArrayList<>(); |
| | | head1.add(firstRowContent); |
| | | head1.add("提交时间"); |
| | | head1.add("登记时间"); |
| | | headList.add(head1); |
| | | subVOList.forEach(sub -> { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | headn.add(sub.getContent()); |
| | | headList.add(headn); |
| | | }); |
| | | List<List<Object>> datalist = new ArrayList<>(); |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList = questnaireAnswersDTOS.getAnswers(); |
| | | if(answerContentVOList!=null && answerContentVOList.size()>0) { |
| | | List<Object> userData = new ArrayList<>(); |
| | | List<ComActQuestnaireAnswerContentVO> usersAnswers = questnaireAnswersDTOS.getAnswers(); |
| | | //查询用户回答的所有答案,并新增到答案列表中 |
| | | Long reserveRecordId = null; |
| | | for (ComActQuestnaireAnswerContentVO userAnswers:usersAnswers) { |
| | | if(reserveRecordId == null){ |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(),DateUtils.ymdhms_format)); |
| | | if (sub.getType() != 5) { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | if(sub.getType() == 11){ |
| | | headn.add(sub.getContent().substring(0, sub.getContent().indexOf("("))); |
| | | }else{ |
| | | headn.add(sub.getContent()); |
| | | } |
| | | if(!reserveRecordId.equals(userAnswers.getReserveRecordId())){ |
| | | datalist.add(userData); |
| | | userData = new ArrayList<>(); |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(),DateUtils.ymdhms_format)); |
| | | } |
| | | userData.add(userAnswers.getAnswerContent()); |
| | | headList.add(headn); |
| | | } |
| | | datalist.add(userData); |
| | | } |
| | | }); |
| | | List<List<Object>> datalist = dataList(questnaireAnswersDTOS.getAnswers()); |
| | | |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "查询题目列表",response = ComActReserveSubListVO.class) |
| | | @ApiOperation(value = "查询题目列表", response = ComActReserveSubListVO.class) |
| | | @GetMapping("/subject/list") |
| | | public R subjectList(@RequestParam("reserveId") Long reserveId) { |
| | | return communityService.subjectListAdmin(reserveId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询登记明细列表",response = ComActReserveRegisterDetailedVO.class) |
| | | @ApiOperation(value = "分页查询登记明细列表", response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/list") |
| | | public R registerDetailedList(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return communityService.registerDetailedListAdmin(detailedAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询登记明细详情",response = ComActReserveRegisterDetailedVO.class) |
| | | @ApiOperation(value = "查询登记明细详情", response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/detailed/detail") |
| | | public R registerDetailedDetail(@RequestParam("reserveRecordId") Long reserveRecordId) { |
| | | return communityService.registerDetailedDetailAdmin(reserveRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 数据转换--登记明细用户填写答案导出数据格式转换 |
| | | * |
| | | * @param answerContentVOList 用户答题记录 |
| | | * @return 用户填写答案数据 |
| | | */ |
| | | private List<List<Object>> dataList(List<ComActQuestnaireAnswerContentVO> answerContentVOList) { |
| | | //结果数据集合 |
| | | List<List<Object>> resultList = new ArrayList<>(); |
| | | //构建单个用户数据 |
| | | List<Object> userData = new ArrayList<>(); |
| | | //遍历答案列表 |
| | | Long reserveRecordId = 0L; |
| | | Long reserveSubId = 0L; |
| | | StringBuffer sb = new StringBuffer(); |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5)) { |
| | | continue; |
| | | } |
| | | //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是 |
| | | if (reserveRecordId.equals(0L)) { |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | } |
| | | //根据reserveRecordId判断是否是第二条填报记录 |
| | | if (!reserveRecordId.equals(userAnswers.getReserveRecordId())) { |
| | | reserveSubId = 0L; |
| | | |
| | | resultList.add(userData); |
| | | userData = new ArrayList<>(); |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent())){ |
| | | userData.add(userAnswers.getAnswerContent()); |
| | | }else{ |
| | | userData.add(" "); |
| | | } |
| | | }else{ |
| | | if(reserveSubId.equals(0L)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | } |
| | | |
| | | if(!reserveSubId.equals(userAnswers.getReserveSubId())){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | }else{ |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | } |
| | | } |
| | | } |
| | | // String answer = sb.toString(); |
| | | // if(StringUtils.isNotEmpty(answer)){ |
| | | // userData.add(answer.substring(0, answer.length() - 1)); |
| | | // } |
| | | resultList.add(userData); |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | } |
| | |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class) |
| | | @PostMapping("queryAll") |
| | | @PostMapping("queryAll/noToken") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | commonPage.setParamId(2L); |
| | | return propertyService.comPropertyAlarmSelectAll(commonPage); |
| | | } |
| | | |
| | |
| | | import com.panzhihua.common.utlis.*; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 编辑巡查记录 editPatrolRecord 编辑巡查记录 |
| | | * @param comSwPatrolRecordEditDTO 编辑巡查记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/editPatrolRecord") |
| | | @ApiOperation(value = "编辑巡查记录") |
| | | public R editPatrolRecord(@RequestBody ComSwPatrolRecordEditDTO comSwPatrolRecordEditDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | comSwPatrolRecordEditDTO.setUpdateBy(userId); |
| | | return communityService.editPatrolRecord(comSwPatrolRecordEditDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据巡查记录id查询详情 |
| | | * |
| | | * @param patrolRecordId |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | return communityService.pageSafetyWorkRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑安全工作记录 editSafetyWork 编辑安全工作记录 |
| | | * @param comSwSafetyWorkEditDTO 编辑安全工作记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/editSafetyWorkRecord") |
| | | @ApiOperation(value = "编辑安全工作记录") |
| | | public R editSafetyWork(@RequestBody ComSwSafetyWorkEditDTO comSwSafetyWorkEditDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | comSwSafetyWorkEditDTO.setUpdateBy(userId); |
| | | return communityService.editSafetyWork(comSwSafetyWorkEditDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | return communityService.pageDangerReport(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑隐患报告 editDangerReport 编辑隐患报告 |
| | | * @param comSwDangerReportEditDTO 编辑隐患报告参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/editDangerReport") |
| | | @ApiOperation(value = "编辑隐患报告") |
| | | public R editDangerReport(@RequestBody ComSwDangerReportEditDTO comSwDangerReportEditDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | comSwDangerReportEditDTO.setUpdateBy(userId); |
| | | return communityService.editDangerReport(comSwDangerReportEditDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/", "安全工作记录.ftl", "d:/safetyWork/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/safetyWork/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "d:/safetyWork/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/safetyWork/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwSafetyWorkRecordVO.getPatrolTime() != null) { |
| | |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/safetyWork/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/", "巡查记录.ftl", "d:/patrolRecord/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/patrolRecord/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "d:/patrolRecord/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/patrolRecord/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwPatrolRecordVO.getPatrolTime() != null) { |
| | |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/patrolRecord/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/", "隐患报告.ftl", "d:/dangerReport/file/隐患报告.ftl"); |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/dangerReport/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "隐患报告.ftl", "d:/dangerReport/file/隐患报告.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/dangerReport/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getCheckTime())) { |
| | |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/dangerReport/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "特殊群体/分页查询标签列表", response = ComMngTagVO.class) |
| | | @PostMapping("/special/tags/page") |
| | | public R specialInputUserTags(@RequestBody PageInputUserDTO comMngUserTagDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comMngUserTagDTO.setCommunityId(communityId); |
| | | return userService.specialInputUserTags(comMngUserTagDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改特殊群体标签 |
| | | * |
| | | * @param comMngTagVO |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "特殊群体/新增或修改标签") |
| | | @PostMapping("/special/tags/save") |
| | | R saveSpecialInputUserTags(@RequestBody ComMngTagVO comMngTagVO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | comMngTagVO.setCommunityId(communityId); |
| | | return userService.saveSpecialInputUserTags(comMngTagVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除特殊群体标签 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "特殊群体/删除标签") |
| | | @DeleteMapping("/special/tags/delete") |
| | | R deleteSpecialInputUserTags(@RequestParam(value = "id") Long id) { |
| | | return userService.deleteSpecialInputUserTags(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询单位管理列表", response = ComMngRealCompanyVO.class) |
| | | @PostMapping("/company/page") |
| | |
| | | if (R.isOk(r)) { |
| | | ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | activitySignVO.setActivityId(id); |
| | | R r3 = this.detailActivity(id); |
| | | R r3 = this.detailActivity(id,null,null); |
| | | if (R.isOk(r3)) { |
| | | Object data = r3.getData(); |
| | | ComActActivityVO comActActivityVO = |
| | |
| | | |
| | | @ApiOperation(value = "活动详情", response = ComActActivityVO.class) |
| | | @GetMapping("detailactivity") |
| | | public R detailActivity(@RequestParam("id") Long id) { |
| | | public R detailActivity(@RequestParam("id") Long id,@RequestParam(value = "pageNum", required = false) Long pageNum,@RequestParam(value = "pageSize", required = false) Long pageSize) { |
| | | Long userId = this.getUserId(); |
| | | return communityService.detailActivity(id, userId); |
| | | return communityService.detailActivity(id, userId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询活动报名名单集合") |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导出活动签到统计") |
| | | @GetMapping("statistics/export") |
| | | @PostMapping("statistics/export") |
| | | public R activityStatisticsExport(@RequestBody ComActActRegistVO comActActRegistVO){ |
| | | String name = "活动签到统计导出数据.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动签到二维码下载") |
| | | @GetMapping("qrCode/export") |
| | | @PostMapping("qrCode/export") |
| | | public R activityRegistQRCodeExport(@RequestParam("activityId") Long activityId){ |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/", "社区活动二维码.ftl", "d:/comActivity/file/社区活动二维码.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "社区活动二维码.ftl", "d:/comActivity/file/社区活动二维码.ftl"); |
| | | try { |
| | | String text = String.valueOf(activityId); |
| | | String destPath = "d:/comActivity/file/"; |
| | |
| | | return communityService.getPictureList(userId); |
| | | } |
| | | |
| | | /** |
| | | * 获取系统预置图库 getSysPictureList |
| | | * @param type 图片类型 |
| | | * @return R 系统图库集 |
| | | * @author txb |
| | | * @date 2021/8/27 13:33 |
| | | */ |
| | | @ApiOperation(value = "获取社区活动系统预置图库", response = ComActActPictureVO.class) |
| | | @GetMapping("sysPicture/getList") |
| | | public R getSysPictureList(@RequestParam(value = "type") Integer type){ |
| | | return communityService.getSysPictureList(type); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前社区标签列表") |
| | | @GetMapping("userTags/getList") |
| | | public R getUserTagsList() { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | return userService.listTags(communityId); |
| | | return userService.listTags(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增社区动态") |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMicroWishVO.setCommunityId(communityId); |
| | | comActMicroWishVO.setBackUserId(userId); |
| | | // comActMicroWishVO.setBackUserId(userId); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWish(comActMicroWishVO); |
| | | } |
| | |
| | | if (ObjectUtils.isEmpty(type) || type > 5 || type < 1) { |
| | | return R.fail("操作类型不对"); |
| | | } |
| | | comActMicroWishVO.setUserId(userId); |
| | | R r = communityService.putlMicroWish(comActMicroWishVO); |
| | | if (R.isOk(r)) { |
| | | if (R.isOk(r)) { |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.community_backstage.config.MinioUtil; |
| | |
| | | @PostMapping(value = "/minio/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R minipuploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | log.info("开始上传文件" + DateUtils.getCurrentDateStr_MS()); |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | log.info("上传文件结束" + DateUtils.getCurrentDateStr_MS()); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.community_backstage.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class) |
| | | @GetMapping("listpartyorganization") |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "批量新增党员导入excel") |
| | | @PostMapping(value = "downloadtemplate", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | |
| | | String firstRowContent = "调查结果"; |
| | | List<String> head0 = new ArrayList<>(); |
| | | head0.add(firstRowContent); |
| | | head0.add("姓名"); |
| | | head0.add("调查人昵称"); |
| | | headList.add(head0); |
| | | List<String> head1 = new ArrayList<>(); |
| | | head1.add(firstRowContent); |
| | |
| | | subVOList.forEach(sub -> { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | headn.add(sub.getContent()); |
| | | if(sub.getType() == 11){ |
| | | headn.add(sub.getContent().substring(0, sub.getContent().indexOf("("))); |
| | | }else{ |
| | | headn.add(sub.getContent()); |
| | | } |
| | | headList.add(headn); |
| | | }); |
| | | List<List<Object>> datalist = new ArrayList<>(); |
| | | |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList = questnaireAnswersDTOS.getAnswers(); |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | Map<LoginUserInfoVO, LinkedHashMap<Long, List<ComActQuestnaireAnswerContentVO>>> answersMap = |
| | | new HashMap<>(); |
| | | |
| | | List<ComActQuestnaireAnswerContentVO> usersAnswers = questnaireAnswersDTOS.getAnswers(); |
| | | usersAnswers.forEach(userAnswers -> { |
| | | R<LoginUserInfoVO> loginUserInfoVOR = |
| | | userService.getUserInfoByUserId(userAnswers.getUserId().toString()); |
| | | if (R.isOk(loginUserInfoVOR)) { |
| | | LoginUserInfoVO loginUserInfoVO = loginUserInfoVOR.getData(); |
| | | LinkedHashMap<Long, List<ComActQuestnaireAnswerContentVO>> theUserList = |
| | | answersMap.get(loginUserInfoVO); |
| | | if (theUserList == null) { |
| | | theUserList = new LinkedHashMap<>(); |
| | | answersMap.put(loginUserInfoVO, theUserList); |
| | | } |
| | | /** |
| | | * 按题分类题目答案 |
| | | */ |
| | | Long subId = userAnswers.getSubId(); |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList1 = theUserList.get(subId); |
| | | if (answerContentVOList1 == null) { |
| | | answerContentVOList1 = new ArrayList<>(); |
| | | theUserList.put(subId, answerContentVOList1); |
| | | } |
| | | answerContentVOList1.add(userAnswers); |
| | | } |
| | | |
| | | }); |
| | | /** |
| | | * 构造导出数据 |
| | | */ |
| | | answersMap.forEach((user, answers) -> { |
| | | List<Object> userData = new ArrayList<>(); |
| | | userData.add(user.getName()); |
| | | // 获取提交时间 |
| | | Set<Long> keySet = answers.keySet(); |
| | | String dateStr = ""; |
| | | if (keySet != null && keySet.size() > 0) { |
| | | try { |
| | | ComActQuestnaireAnswerContentVO firstvo = answers.get(keySet.toArray()[0]).get(0); |
| | | if (firstvo != null) { |
| | | Date time = firstvo.getCreateAt(); |
| | | if (time != null) { |
| | | String sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time); |
| | | dateStr = sd; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | dateStr = ""; |
| | | } |
| | | } |
| | | userData.add(dateStr); |
| | | answers.forEach((id, answer) -> { |
| | | StringBuilder usersAnswerContent = new StringBuilder(); |
| | | answer.forEach(ans -> { |
| | | String context = (ans.getChoice() != null ? (ans.getChoice() + ".") : "") |
| | | + ans.getAnswerContent(); |
| | | usersAnswerContent.append(context + "\n"); |
| | | }); |
| | | userData.add(usersAnswerContent.toString()); |
| | | }); |
| | | datalist.add(userData); |
| | | }); |
| | | } |
| | | List<List<Object>> datalist = dataList(questnaireAnswersDTOS.getAnswers()); |
| | | |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | |
| | | return communityService.statisticsSummaryHeader(questId, loginUserInfo.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 数据转换 |
| | | * @param answerContentVOList 用户问答列表数据 |
| | | * @return 调查问卷需要导出数据 |
| | | */ |
| | | private List<List<Object>> dataList(List<ComActQuestnaireAnswerContentVO> answerContentVOList) { |
| | | //结果数据集合 |
| | | List<List<Object>> resultList = new ArrayList<>(); |
| | | //构建单个用户数据 |
| | | List<Object> userData = new ArrayList<>(); |
| | | //遍历答案列表 |
| | | Long reserveRecordId = 0L; |
| | | Long reserveSubId = 0L; |
| | | StringBuffer sb = new StringBuffer(); |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5)) { |
| | | continue; |
| | | } |
| | | //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是 |
| | | if (reserveRecordId.equals(0L)) { |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | } |
| | | //根据reserveRecordId判断是否是第二条填报记录 |
| | | if (!reserveRecordId.equals(userAnswers.getReserveRecordId())) { |
| | | reserveSubId = 0L; |
| | | |
| | | userData = new ArrayList<>(); |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent())){ |
| | | userData.add(userAnswers.getAnswerContent()); |
| | | }else{ |
| | | userData.add(" "); |
| | | } |
| | | }else{ |
| | | if(reserveSubId.equals(0L)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | } |
| | | |
| | | if(!reserveSubId.equals(userAnswers.getReserveSubId())){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | }else{ |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | } |
| | | } |
| | | } |
| | | resultList.add(userData); |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 15:30 |
| | | **/ |
| | | @Slf4j |
| | | @Api(tags = {"一起议"}) |
| | | @Api(tags = {"议事投票"}) |
| | | @RestController |
| | | @RequestMapping("/") |
| | | public class DiscussApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "一起议-新增") |
| | | @ApiOperation(value = "议事投票-新增-") |
| | | @PostMapping("discuss") |
| | | public R addDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | Integer type = comActDiscussDTO.getType(); |
| | | String voteTitle = comActDiscussDTO.getVoteTitle(); |
| | | List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions(); |
| | | if (type.equals(2)) { |
| | | if (ObjectUtils.isEmpty(voteTitle)) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | comActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | if (comActDiscussDTO.getType().equals(ComActDiscussDTO.type.tp)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getVoteTitle())) { |
| | | return R.fail("投票标题不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(discussOptions)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getDiscussOptions())) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comActDiscussDTO.setUserId(userId); |
| | | comActDiscussDTO.setCommunityId(communityId); |
| | | return communityService.addDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-详情", response = ComActDiscussVO.class) |
| | | @GetMapping("discuss") |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | return communityService.detailDiscuss(id); |
| | | @ApiOperation(value = "议事投票-编辑-") |
| | | @PostMapping("editDiscuss") |
| | | public R editDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | comActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | comActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | if (comActDiscussDTO.getType().equals(ComActDiscussDTO.type.tp)) { |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getVoteTitle())) { |
| | | return R.fail("投票标题不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(comActDiscussDTO.getDiscussOptions())) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | } |
| | | return communityService.editDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-删除") |
| | | @ApiOperation(value = "议事投票-详情-", response = ComActDiscussVO.class) |
| | | @PostMapping("discussDetail") |
| | | public R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return communityService.detailDiscuss(discussDetailDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-分页查询评论下回复列表-", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("discuss/commment/reply") |
| | | public R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return communityService.discussCommentReplyAdmin(discussDetailDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-删除-") |
| | | @DeleteMapping("discuss") |
| | | public R deleteDiscuss(@RequestParam("id") Long id) { |
| | | return communityService.deleteDiscuss(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-回复") |
| | | @PostMapping("discusscomment") |
| | | @ApiOperation(value = "议事投票-回复-") |
| | | @PostMapping("addDiscussComment") |
| | | public R addDiscussComment(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |
| | | String comment = comActDiscussCommentDTO.getComment(); |
| | | if (ObjectUtils.isEmpty(comment)) { |
| | |
| | | } |
| | | Long discussId = comActDiscussCommentDTO.getDiscussId(); |
| | | if (null == discussId || 0 == discussId) { |
| | | return R.fail("一起议主键不能为空"); |
| | | return R.fail("议事投票主键不能为空"); |
| | | } |
| | | comActDiscussCommentDTO.setUserId(this.getUserId()); |
| | | return communityService.addDiscussComment(comActDiscussCommentDTO); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-分页查询", response = ComActDiscussVO.class) |
| | | @ApiOperation(value = "议事投票-分页查询-", response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | pageComActDiscussDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageDiscuss(pageComActDiscussDTO); |
| | | return communityService.pageDiscussAdmin(pageComActDiscussDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-查看", response = ComActDiscussCommentVO.class) |
| | | @ApiOperation(value = "议事投票-评论详情", response = ComActDiscussCommentVO.class) |
| | | @GetMapping("discusscomment") |
| | | public R detailDiscussComment(@RequestParam("id") Long id) { |
| | | return communityService.detailDiscussComment(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-置顶") |
| | | @ApiOperation(value = "议事投票-评论详情-改版后", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("discusscomment") |
| | | public R detailDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return communityService.detailDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-评论-置顶-") |
| | | @GetMapping("discusscommenttop") |
| | | public R putDiscussCommentTop(@RequestParam("id") Long id) { |
| | | return communityService.putDiscussCommentTop(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-回复") |
| | | @ApiOperation(value = "议事投票-评论-回复-") |
| | | @PostMapping("discusscommentback") |
| | | public R addDiscussCommentBack(@RequestBody ComActDiscussCommentDTO comActDiscussCommentDTO) { |
| | | String comment = comActDiscussCommentDTO.getComment(); |
| | |
| | | return communityService.addDiscussCommentBack(comActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询", response = ComActDiscussCommentVO.class) |
| | | @ApiOperation(value = "议事投票-评论列表分页查询-", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("pagediscusscomment") |
| | | public R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | return R.fail("议事投票主键不能为空"); |
| | | } |
| | | return communityService.pageDiscussComment(pageComActDiscussCommentDTO); |
| | | return communityService.pageDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-公布结果/修改公布结果-") |
| | | @PostMapping("publishResult") |
| | | public R publishResult(@RequestBody ComActDiscussPublishResultDTO publishResultDTO) { |
| | | String result = publishResultDTO.getResult(); |
| | | if (ObjectUtils.isEmpty(result)) { |
| | | return R.fail("公布的结果不能为空"); |
| | | } |
| | | Long id = publishResultDTO.getId(); |
| | | if (null == id || 0 == id) { |
| | | return R.fail("议事投票id不能为空"); |
| | | } |
| | | publishResultDTO.setUserId(this.getUserId()); |
| | | return communityService.publishResultAdmin(publishResultDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "议事投票-评论/回复删除-") |
| | | @DeleteMapping("discuss/comment/del") |
| | | public R deleteDiscussCommentAdmin(@RequestParam("id") Long id) { |
| | | return communityService.deleteDiscussCommentAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区可发布议事投票权限配置") |
| | | @GetMapping("discuss/jurisdiction/get") |
| | | public R discussJurisdictionGet() { |
| | | return communityService.discussJurisdictionGet(this.getCommunityId(),this.getUserId()); |
| | | } |
| | | |
| | | @PutMapping("/discuss/jurisdiction/set/{value}") |
| | | @ApiOperation(value = "设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员)") |
| | | public R discussJurisdictionSet(@PathVariable("value") String value) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.discussJurisdictionSet(this.getCommunityId(), value); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.listen.ComElderAuthRecordImportExcelListen; |
| | | import com.panzhihua.common.listen.ComMngPopulationDrugExcelListen; |
| | | import com.panzhihua.common.listen.ComPensionAuthRecordImportExcelListen; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | 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.EldersAuthFeedbackAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExcelElderAuthDTO; |
| | | 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.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * |
| | |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @Value("${excel.elderimporturl}") |
| | | private Object elderimporturl; |
| | |
| | | return R.ok(elderimporturl); |
| | | } |
| | | |
| | | |
| | | //2021-8-30 身份认证改版(高龄老人认证管理)接口 |
| | | /** |
| | | * 分页查询高龄老人认证记录 pageElderAuthRecords 分页查询高龄老人认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-分页查询高龄老人认证记录---", response = ComElderAuthRecordVO.class) |
| | | @PostMapping("/authRecords/page") |
| | | public R pageElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthRecordsDTO.setCommunityId(communityId); |
| | | return communityService.pageElderAuthRecords(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据高龄认证记录id查询详情 detailElderAuthRecords 根据高龄认证记录id查询详情 |
| | | * @param authRecordId 高龄认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-根据高龄认证记录id查询详情---", response = ComElderAuthRecordVO.class) |
| | | @GetMapping("/authRecords/detail") |
| | | public R detailElderAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return communityService.detailElderAuthRecords(authRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证审核 examineElderAuthRecords 高龄认证审核 |
| | | * @param comElderAuthRecordVO 高龄认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证审核---") |
| | | @PostMapping("/authRecords/examine") |
| | | public R examineElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | comElderAuthRecordVO.setApproverId(this.getUserId()); |
| | | return communityService.examineElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证标记 examineElderAuthRecords 高龄认证标记 |
| | | * @param comElderAuthRecordVO 高龄认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证标记---") |
| | | @PostMapping("/authRecords/sign") |
| | | public R signElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | return communityService.signElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证导出 exportElderAuthRecords 高龄认证导出 |
| | | * @param ids 高龄认证记录id集合 |
| | | * @return R 导出结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证导出---") |
| | | @PostMapping("/authRecords/export") |
| | | public R exportElderAuthRecords(@RequestBody List<Long> ids) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证导出数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R r = communityService.getElderAuthRecordsByIds(ids); |
| | | List<ComElderAuthRecordExcleVO> list = new ArrayList<>(); |
| | | if (R.isOk(r)) { |
| | | list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComElderAuthRecordExcleVO.class); |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComElderAuthRecordExcleVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄认证导出数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-下载模板-线下认证居民导入---") |
| | | @GetMapping("/authRecords/uderLine/export") |
| | | public R exportUnderLineElderAuthRecords() { |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "高龄线下认证居民导入模板.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | list = headDataFilling(true); |
| | | EasyExcel.write(fileName).head(list).sheet("高龄线下认证居民导入模板").doWrite(null); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "下载导入失败高龄认证数据---") |
| | | @PostMapping("/download/error/authRecords") |
| | | public R downloadErrorAuthRecord(@RequestParam(value = "key") String key) { |
| | | List<ComElderAuthRecordImportMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComElderAuthRecordImportMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证记录导入错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComElderAuthRecordImportMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄认证记录导入错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-excel导入线下认证居民---") |
| | | @PostMapping(value = "/authRecords/uderLine/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R importUnderLineElderAuthRecords(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComElderAuthRecordImportExcelListen comElderAuthRecordImportExcelListen = new ComElderAuthRecordImportExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comElderAuthRecordImportExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-导出高龄认证统计---") |
| | | @PostMapping(value = "/authRecords/statistic/export") |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthRecordsDTO.setCommunityId(communityId); |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证统计导出数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R r = communityService.exportElderAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | List<ComElderAuthRecordStatisticExcleVO> list = new ArrayList<>(); |
| | | if (R.isOk(r)) { |
| | | list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComElderAuthRecordStatisticExcleVO.class); |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComElderAuthRecordStatisticExcleVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄认证统计导出数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 14:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-分页查询养老金人员认证记录---", response = ComPensionAuthRecordVO.class) |
| | | @PostMapping("/pensionAuthRecords/page") |
| | | public R pagePensionAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthRecordsDTO.setCommunityId(communityId); |
| | | return communityService.pagePensionAuthRecords(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据养老认证记录id查询详情 detailPensionAuthRecords 根据养老认证记录id查询详情 |
| | | * @param authRecordId 养老认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-根据养老认证记录id查询详情---", response = ComPensionAuthRecordVO.class) |
| | | @GetMapping("/pensionAuthRecords/detail") |
| | | public R detailPensionAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return communityService.detailPensionAuthRecords(authRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证审核 examinePensionAuthRecords 养老认证审核 |
| | | * @param comPensionAuthRecordVO 养老认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证审核---") |
| | | @PostMapping("/pensionAuthRecords/examine") |
| | | public R examinePensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return communityService.examinePensionAuthRecords(comPensionAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证标记 signPensionAuthRecords 养老认证标记 |
| | | * @param comPensionAuthRecordVO 养老认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证标记---") |
| | | @PostMapping("/pensionAuthRecords/sign") |
| | | public R signPensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return communityService.signPensionAuthRecords(comPensionAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证导出 exportPensionAuthRecords 养老认证导出 |
| | | * @param ids 养老认证记录id集合 |
| | | * @return R 导出结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "养老认证-养老认证导出---") |
| | | @PostMapping("/pensionAuthRecords/export") |
| | | public R exportPensionAuthRecords(@RequestBody List<Long> ids) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "养老认证导出数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R r = communityService.getPensionAuthRecordsByIds(ids); |
| | | List<ComPensionAuthRecordExcleVO> list = new ArrayList<>(); |
| | | if (R.isOk(r)) { |
| | | list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComPensionAuthRecordExcleVO.class); |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComPensionAuthRecordExcleVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("养老认证导出数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-下载模板-线下认证居民导入---") |
| | | @GetMapping("/pensionAuthRecords/uderLine/export") |
| | | public R exportUnderLinePensionAuthRecords() { |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "养老线下认证居民导入模板.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | list = headDataFilling(false); |
| | | EasyExcel.write(fileName).head(list).sheet("养老线下认证居民导入模板").doWrite(null); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-excel导入线下认证居民---") |
| | | @PostMapping(value = "/pensionAuthRecords/uderLine/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R importUnderLinePensionAuthRecords(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComPensionAuthRecordImportExcelListen comPensionAuthRecordImportExcelListen = new ComPensionAuthRecordImportExcelListen( |
| | | communityService, this.getCommunityId(), this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comPensionAuthRecordImportExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载导入失败养老认证数据---") |
| | | @PostMapping("/download/error/pensionAuthRecords") |
| | | public R downloadErrorPensionPopulation(@RequestParam(value = "key") String key) { |
| | | List<ComPensionAuthRecordImportMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComPensionAuthRecordImportMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "养老认证记录导入错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComPensionAuthRecordImportMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("养老认证记录导入错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-导出养老认证统计---") |
| | | @PostMapping(value = "/pensionAuthRecords/statistic/export") |
| | | public R exportPensionAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthRecordsDTO.setCommunityId(communityId); |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "养老认证统计导出数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R r = communityService.exportPensionAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | List<ComPensionAuthRecordStatisticExcleVO> list = new ArrayList<>(); |
| | | if (R.isOk(r)) { |
| | | list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComPensionAuthRecordStatisticExcleVO.class); |
| | | } |
| | | excelWriter = EasyExcel.write(fileName, ComPensionAuthRecordStatisticExcleVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("养老认证统计导出数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @ApiOperation(value = "查询社区养老认证方式---", response = R.class) |
| | | @GetMapping("/pensionAuthRecords/authtype") |
| | | public R communityPensionAuthType() { |
| | | Long communityId = this.getCommunityId(); |
| | | EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); |
| | | eldersAuthTypeQueryDTO.setCommunityId(communityId); |
| | | return communityService.communityPensionAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | @PutMapping("/pensionAuthRecords/authType/{type}") |
| | | @ApiOperation(value = "设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验)---", response = R.class) |
| | | R setPensionAuthType(@PathVariable("type") Integer type) { |
| | | if (type != 1 && type != 2) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.setPensionAuthType(this.getCommunityId(), type); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区高龄认证方式---", response = R.class) |
| | | @GetMapping("/authType") |
| | | public R communityAuthType() { |
| | | Long communityId = this.getCommunityId(); |
| | | EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); |
| | | eldersAuthTypeQueryDTO.setCommunityId(communityId); |
| | | return communityService.communityElderAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | @PutMapping("/authType/{type}") |
| | | @ApiOperation(value = "设置当前社区高龄认证方式:核验类型(1.视频认证 2.人脸核验)---", response = R.class) |
| | | public R setAuthType(@PathVariable("type") Integer type) { |
| | | if (type != 1 && type != 2) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.setEldersAuthType(this.getCommunityId(), type); |
| | | } |
| | | |
| | | /** |
| | | * 表头构建 |
| | | * @param isBigAge 是否是高龄认证 |
| | | * @return 表头数据 |
| | | */ |
| | | private List<List<String>> headDataFilling(Boolean isBigAge) { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("认证姓名"); |
| | | List<String> head1 = new ArrayList<String>(); |
| | | head1.add("认证身份证号码"); |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("联系电话"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("现居住地址"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("认证时间(年/月/日 如:2021/1/1)"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | if(isBigAge){ |
| | | head5.add("认证期数(年月 注:月份小于10,需要在月数前加0 如:202101)"); |
| | | }else{ |
| | | head5.add("认证期数(即认证年份,2021)"); |
| | | } |
| | | |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("标记(备注信息)"); |
| | | |
| | | list.add(head0); |
| | | list.add(head1); |
| | | list.add(head2); |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | list.add(head6); |
| | | return list; |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-分页查询高龄老人认证统计记录---",response = ComEldersAuthStatisticVO.class) |
| | | @PostMapping("/auth/statistic/page") |
| | | public R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pageElderAuthStatisticDTO.setCommunityId(communityId); |
| | | return communityService.pageAuthStatisticAdmin(pageElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-标记高龄老人认证统计记录---") |
| | | @PostMapping("/auth/statistic/sign") |
| | | public R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | signElderAuthStatisticDTO.setUserId(this.getUserId()); |
| | | return communityService.signAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄认证统计-表头统计---",response = ComEldersAuthStatisticHeaderVO.class) |
| | | @PostMapping(value = "/auth/header/statistic") |
| | | public R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | statisticHeaderDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.getAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-分页查询养老认证统计记录---",response = ComEldersAuthStatisticVO.class) |
| | | @PostMapping("/pensionAuthRecords/statistic/page") |
| | | public R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | pensionAuthStatisticDTO.setCommunityId(communityId); |
| | | return communityService.pagePensionAuthStatisticAdmin(pensionAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-标记养老认证统计记录---") |
| | | @PostMapping("/pensionAuthRecords/statistic/sign") |
| | | public R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | signElderAuthStatisticDTO.setUserId(this.getUserId()); |
| | | return communityService.signPensionAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "养老认证统计-表头统计---",response = ComEldersAuthStatisticHeaderVO.class) |
| | | @PostMapping(value = "/pension/auth/header/statistic") |
| | | public R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | statisticHeaderDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.getPensionAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取社区审核状态") |
| | | @GetMapping("getCircleExamineStatus") |
| | | public R getCircleExamineStatus(){ |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | //查询社区自动审核是否开着 |
| | | String key = NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE; |
| | | R isOk = communityService.getSysConfValue(key + communityId,communityId); |
| | | if(R.isOk(isOk)){ |
| | | if(isOk.getData() != null){ |
| | | return isOk; |
| | | }else{ |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1"); |
| | | isOk.setData("1"); |
| | | return isOk; |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑社区审核状态") |
| | | @GetMapping("editCircleExamineStatus") |
| | | public R editCircleExamineStatus(@RequestParam("status") Integer status){ |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | return communityService.editSysConfValue(communityId,status); |
| | | } |
| | | |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导入高龄老人") |
| | | @PostMapping(value = "/serve/importElder", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | public R importElder(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationElderExcelListen comMngPopulationElderExcelListen = |
| | | new ComMngPopulationElderExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationElderExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "excel导入养老金人员") |
| | | @PostMapping(value = "/serve/importPension", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | public R importPension(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | ComMngPopulationPensionExcelListen comMngPopulationPensionExcelListen = |
| | | new ComMngPopulationPensionExcelListen(communityService, this.getCommunityId(), |
| | | this.getLoginUserInfo().getUserId(), stringRedisTemplate); |
| | | EasyExcel.read(inputStream, null, comMngPopulationPensionExcelListen).sheet().doRead(); |
| | | } catch (IOException e) { |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | | * |
| | |
| | | @ApiOperation(value = "实有人口详情", response = ComMngPopulationVO.class) |
| | | @PostMapping("/detail") |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return communityService.detailPopulation(populationId); |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | return communityService.detailPopulation(populationId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询实有人口电子档案", response = UserElectronicFileVO.class) |
| | |
| | | data = formDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headDrugDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headCorrectDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headMajorDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headCultDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headRehabilitationDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headKeyDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headSentenceDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headVeteransDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headDisabilityDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | list = headLowSecurityDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(communityId); |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | |
| | | } |
| | | } |
| | | return R.ok(excelUrl + "低保户导入模板.xlsx"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "高龄老人-下载模板") |
| | | @GetMapping("/export/elder") |
| | | public R exportElder() { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = 2L;// this.getCommunityId(); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "高龄老人导入模板.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | list = headElderDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"高龄老人".equals(TagsList.get(i))) { |
| | | List<String> head = new ArrayList<>(); |
| | | head.add(TagsList.get(i) + "(是/否)"); |
| | | list.add(head); |
| | | } |
| | | } |
| | | } |
| | | EasyExcel.write(fileName).head(list).sheet("高龄老人导入模板").doWrite(dataList); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "养老金居民-下载模板") |
| | | @GetMapping("/export/pension") |
| | | public R exportPension() { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = 2L;// this.getCommunityId(); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "养老金居民导入模板.xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | List<List<String>> list = new ArrayList<>(); |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | list = headPensionDataFilling(); |
| | | |
| | | // 查询当前社区标签列表 |
| | | R tagsResult = userService.listTags(); |
| | | if (Constants.SUCCESS.equals(tagsResult.getCode())) { |
| | | List<String> TagsList = (List<String>)tagsResult.getData(); |
| | | // 动态加载标签列表到表头 |
| | | for (int i = 0; i < TagsList.size(); i++) { |
| | | if (!"养老金居民".equals(TagsList.get(i))) { |
| | | List<String> head = new ArrayList<>(); |
| | | head.add(TagsList.get(i) + "(是/否)"); |
| | | list.add(head); |
| | | } |
| | | } |
| | | } |
| | | EasyExcel.write(fileName).head(list).sheet("养老金居民导入模板").doWrite(dataList); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | |
| | | return list; |
| | | } |
| | | |
| | | // 高龄老人 |
| | | private List<List<String>> headElderDataFilling() { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("姓名"); |
| | | List<String> head1 = new ArrayList<String>(); |
| | | head1.add("身份证(性别和年龄自动根据身份证号识别)"); |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("政治面貌(群众/中共党员/共青团员)"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("是否租住"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("*街/路/巷"); |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("*小区号(政府对于每个小区都有特定编号)"); |
| | | List<String> head7 = new ArrayList<String>(); |
| | | head7.add("楼排号"); |
| | | List<String> head8 = new ArrayList<String>(); |
| | | head8.add("单元号"); |
| | | List<String> head9 = new ArrayList<String>(); |
| | | head9.add("户室(四位数表示。前两位楼层,后两位户号)"); |
| | | List<String> head10 = new ArrayList<String>(); |
| | | head10.add("房屋状态(自住/租住/其他)"); |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("控状态(常规/关注/管控)"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("联系方式"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | | head14.add("籍贯"); |
| | | List<String> head15 = new ArrayList<String>(); |
| | | head15.add("文化程度"); |
| | | List<String> head16 = new ArrayList<String>(); |
| | | head16.add("婚姻状况"); |
| | | List<String> head17 = new ArrayList<String>(); |
| | | head17.add("健康状况"); |
| | | List<String> head18 = new ArrayList<String>(); |
| | | head18.add("本地/外地"); |
| | | List<String> head19 = new ArrayList<String>(); |
| | | head19.add("户口所在地"); |
| | | List<String> head20 = new ArrayList<String>(); |
| | | head20.add("*高龄老人登记(是/否)"); |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("*健在(是/否)"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("*高龄津贴开始领取时间(年-月-日)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("*现居住地址"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | | head24.add("备注"); |
| | | |
| | | list.add(head0); |
| | | list.add(head1); |
| | | list.add(head2); |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | list.add(head6); |
| | | list.add(head7); |
| | | list.add(head8); |
| | | list.add(head9); |
| | | list.add(head10); |
| | | list.add(head11); |
| | | list.add(head12); |
| | | list.add(head13); |
| | | list.add(head14); |
| | | list.add(head15); |
| | | list.add(head16); |
| | | list.add(head17); |
| | | list.add(head18); |
| | | list.add(head19); |
| | | list.add(head20); |
| | | list.add(head21); |
| | | list.add(head22); |
| | | list.add(head23); |
| | | list.add(head24); |
| | | return list; |
| | | } |
| | | |
| | | // 养老金居民 |
| | | private List<List<String>> headPensionDataFilling() { |
| | | List<List<String>> list = new ArrayList<List<String>>(); |
| | | List<String> head0 = new ArrayList<String>(); |
| | | head0.add("姓名"); |
| | | List<String> head1 = new ArrayList<String>(); |
| | | head1.add("身份证(性别和年龄自动根据身份证号识别)"); |
| | | List<String> head2 = new ArrayList<String>(); |
| | | head2.add("民族"); |
| | | List<String> head3 = new ArrayList<String>(); |
| | | head3.add("政治面貌(群众/中共党员/共青团员)"); |
| | | List<String> head4 = new ArrayList<String>(); |
| | | head4.add("是否租住"); |
| | | List<String> head5 = new ArrayList<String>(); |
| | | head5.add("*街/路/巷"); |
| | | List<String> head6 = new ArrayList<String>(); |
| | | head6.add("*小区号(政府对于每个小区都有特定编号)"); |
| | | List<String> head7 = new ArrayList<String>(); |
| | | head7.add("楼排号"); |
| | | List<String> head8 = new ArrayList<String>(); |
| | | head8.add("单元号"); |
| | | List<String> head9 = new ArrayList<String>(); |
| | | head9.add("户室(四位数表示。前两位楼层,后两位户号)"); |
| | | List<String> head10 = new ArrayList<String>(); |
| | | head10.add("房屋状态(自住/租住/其他)"); |
| | | List<String> head11 = new ArrayList<String>(); |
| | | head11.add("房屋用途(住宅/公寓/宿舍/仓库/其他)"); |
| | | List<String> head12 = new ArrayList<String>(); |
| | | head12.add("控状态(常规/关注/管控)"); |
| | | List<String> head13 = new ArrayList<String>(); |
| | | head13.add("联系方式"); |
| | | List<String> head14 = new ArrayList<String>(); |
| | | head14.add("籍贯"); |
| | | List<String> head15 = new ArrayList<String>(); |
| | | head15.add("文化程度"); |
| | | List<String> head16 = new ArrayList<String>(); |
| | | head16.add("婚姻状况"); |
| | | List<String> head17 = new ArrayList<String>(); |
| | | head17.add("健康状况"); |
| | | List<String> head18 = new ArrayList<String>(); |
| | | head18.add("本地/外地"); |
| | | List<String> head19 = new ArrayList<String>(); |
| | | head19.add("户口所在地"); |
| | | List<String> head20 = new ArrayList<String>(); |
| | | head20.add("*养老登记(是/否)"); |
| | | List<String> head21 = new ArrayList<String>(); |
| | | head21.add("*健在(是/否)"); |
| | | List<String> head22 = new ArrayList<String>(); |
| | | head22.add("*养老金开始领取时间(年-月-日)"); |
| | | List<String> head23 = new ArrayList<String>(); |
| | | head23.add("*现居住地址"); |
| | | List<String> head24 = new ArrayList<String>(); |
| | | head24.add("备注"); |
| | | |
| | | list.add(head0); |
| | | list.add(head1); |
| | | list.add(head2); |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | list.add(head6); |
| | | list.add(head7); |
| | | list.add(head8); |
| | | list.add(head9); |
| | | list.add(head10); |
| | | list.add(head11); |
| | | list.add(head12); |
| | | list.add(head13); |
| | | list.add(head14); |
| | | list.add(head15); |
| | | list.add(head16); |
| | | list.add(head17); |
| | | list.add(head18); |
| | | list.add(head19); |
| | | list.add(head20); |
| | | list.add(head21); |
| | | list.add(head22); |
| | | list.add(head23); |
| | | list.add(head24); |
| | | return list; |
| | | } |
| | | |
| | | private List<Object> formDataFilling() { |
| | | List<Object> data = new ArrayList<>(); |
| | | data.add("张三"); |
| | |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "下载导入失败高龄老人数据") |
| | | @PostMapping("/download/error/populationElder") |
| | | public R downloadErrorElderPopulation(@RequestParam(value = "key") String key) { |
| | | List<ComMngPopulationElderMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComMngPopulationElderMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄老人错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationElderMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("高龄老人错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "下载导入失败养老金人员数据") |
| | | @PostMapping("/download/error/populationPension") |
| | | public R downloadErrorPensionPopulation(@RequestParam(value = "key") String key) { |
| | | List<ComMngPopulationPensionMistakeExcelVO> list = new ArrayList<>(); |
| | | Boolean isExits = stringRedisTemplate.hasKey(key); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | if (isExits) { |
| | | String json = valueOperations.get(key); |
| | | list = JSONArray.parseArray(json, ComMngPopulationPensionMistakeExcelVO.class); |
| | | } |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "养老金人员错误数据" + nowDate + ".xlsx"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationPensionMistakeExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("养老金人员错误数据").build(); |
| | | excelWriter.write(list, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.minio.ObjectStat; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio工具类 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | @EnableConfigurationProperties(MinioConfig.class) |
| | | public class MinioUtil { |
| | |
| | | UUID uuid = UUID.randomUUID(); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(uuid.toString().replace("-", "")).append("/"); |
| | | log.info("开始连接minio服务器" + DateUtils.getCurrentDateStr_MS()); |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | log.info("结束连接minio服务器" + DateUtils.getCurrentDateStr_MS()); |
| | | // bucket 不存在,创建 |
| | | if (!minioClient.bucketExists(minioProperties.getBucket())) { |
| | | log.info("bucket 不存在,创建"); |
| | | minioClient.makeBucket(minioProperties.getBucket()); |
| | | } |
| | | // 得到文件流 |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 100MB |
| | | max-request-size: 100MB |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | |
| | | eureka: |
| | | client: |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | <!--minio文件存储--> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | | <artifactId>minio</artifactId> |
| | | <version>6.0.8</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.grid_app.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private String url; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @ApiOperation(value = "上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "批量上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploads", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile[] files, HttpServletRequest request) throws IOException { |
| | | public R uploads(@RequestParam MultipartFile[] files, HttpServletRequest request) throws IOException { |
| | | // 微信图片内容校验 |
| | | // WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | String property = System.getProperty("user.dir"); |
| | |
| | | return R.ok(urlList); |
| | | } |
| | | |
| | | @ApiOperation(value = "新批量文件上传接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R ossUploads(@RequestParam MultipartFile[] files, HttpServletRequest request) { |
| | | try { |
| | | List<String> urlList = new ArrayList<>(); |
| | | for (MultipartFile file : files) { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | urlList.add(imageUrl); |
| | | } |
| | | return R.ok(urlList); |
| | | } catch (Exception e) { |
| | | log.error("上传文件失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getConf/noToken") |
| | | @ApiOperation(value = "根据code查询系统配置") |
| | | public R getConf(@RequestParam("code") String code) { |
New file |
| | |
| | | package com.panzhihua.grid_app.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio存储信息配置 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Data |
| | | @ConfigurationProperties(prefix = "minio") |
| | | public class MinioConfig { |
| | | |
| | | private String host; |
| | | |
| | | private String accessKey; |
| | | |
| | | private String secretKey; |
| | | |
| | | private String url; |
| | | |
| | | private String bucket; |
| | | |
| | | private String aliasName; |
| | | |
| | | private String aliasPCName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_app.config; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.minio.ObjectStat; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio工具类 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Component |
| | | @EnableConfigurationProperties(MinioConfig.class) |
| | | public class MinioUtil { |
| | | |
| | | @Resource |
| | | private MinioConfig minioProperties; |
| | | |
| | | public static byte[] toByteArray(InputStream input) throws IOException { |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[4096]; |
| | | int n = 0; |
| | | while (-1 != (n = input.read(buffer))) { |
| | | output.write(buffer, 0, n); |
| | | } |
| | | return output.toByteArray(); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传 |
| | | * |
| | | * @param file |
| | | * 要上传的文件 |
| | | * @return |
| | | */ |
| | | public String upload(MultipartFile file, String name) { |
| | | if (null != file) { |
| | | try { |
| | | UUID uuid = UUID.randomUUID(); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(uuid.toString().replace("-", "")).append("/"); |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | // bucket 不存在,创建 |
| | | if (!minioClient.bucketExists(minioProperties.getBucket())) { |
| | | minioClient.makeBucket(minioProperties.getBucket()); |
| | | } |
| | | // 得到文件流 |
| | | InputStream input = file.getInputStream(); |
| | | // 文件名 |
| | | // String fileName = uuid + "/images." + FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String fileName = s.append(name).toString(); |
| | | String contentType = file.getContentType(); |
| | | minioClient.putObject(minioProperties.getBucket(), fileName, input, contentType); |
| | | StringBuilder fileUrl = new StringBuilder(minioProperties.getUrl()); |
| | | String url = fileUrl.append(fileName).toString(); |
| | | return url; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public void download(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | ObjectStat stat = minioClient.statObject(minioProperties.getBucket(), fileName); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | response.setContentType(stat.contentType()); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); |
| | | IOUtils.copy(inputStream, response.getOutputStream()); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public byte[] getBytes(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | byte[] bytes = new byte[0]; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | bytes = toByteArray(inputStream); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return bytes; |
| | | } |
| | | } |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | <!--minio文件存储--> |
| | | <dependency> |
| | | <groupId>io.minio</groupId> |
| | | <artifactId>minio</artifactId> |
| | | <version>6.0.8</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import java.util.UUID; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.panzhihua.grid_backstage.config.MinioUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | @Resource |
| | | private MinioUtil minioUtil; |
| | | |
| | | @ApiOperation(value = "上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "新上传照片接口") |
| | | @PostMapping(value = "/uploadimages", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | try { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | String imageUrl = minioUtil.upload(file, name); |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio存储信息配置 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Data |
| | | @ConfigurationProperties(prefix = "minio") |
| | | public class MinioConfig { |
| | | |
| | | private String host; |
| | | |
| | | private String accessKey; |
| | | |
| | | private String secretKey; |
| | | |
| | | private String url; |
| | | |
| | | private String bucket; |
| | | |
| | | private String aliasName; |
| | | |
| | | private String aliasPCName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.config; |
| | | |
| | | import io.minio.MinioClient; |
| | | import io.minio.ObjectStat; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * program 攀枝花智慧社区项目 description minio工具类 |
| | | * |
| | | * @author manailin Date 2021-08-19 15:30 |
| | | **/ |
| | | @Component |
| | | @EnableConfigurationProperties(MinioConfig.class) |
| | | public class MinioUtil { |
| | | |
| | | @Resource |
| | | private MinioConfig minioProperties; |
| | | |
| | | public static byte[] toByteArray(InputStream input) throws IOException { |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[4096]; |
| | | int n = 0; |
| | | while (-1 != (n = input.read(buffer))) { |
| | | output.write(buffer, 0, n); |
| | | } |
| | | return output.toByteArray(); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传 |
| | | * |
| | | * @param file |
| | | * 要上传的文件 |
| | | * @return |
| | | */ |
| | | public String upload(MultipartFile file, String name) { |
| | | if (null != file) { |
| | | try { |
| | | UUID uuid = UUID.randomUUID(); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(uuid.toString().replace("-", "")).append("/"); |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | // bucket 不存在,创建 |
| | | if (!minioClient.bucketExists(minioProperties.getBucket())) { |
| | | minioClient.makeBucket(minioProperties.getBucket()); |
| | | } |
| | | // 得到文件流 |
| | | InputStream input = file.getInputStream(); |
| | | // 文件名 |
| | | // String fileName = uuid + "/images." + FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String fileName = s.append(name).toString(); |
| | | String contentType = file.getContentType(); |
| | | minioClient.putObject(minioProperties.getBucket(), fileName, input, contentType); |
| | | StringBuilder fileUrl = new StringBuilder(minioProperties.getUrl()); |
| | | String url = fileUrl.append(fileName).toString(); |
| | | return url; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public void download(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | ObjectStat stat = minioClient.statObject(minioProperties.getBucket(), fileName); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | response.setContentType(stat.contentType()); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); |
| | | IOUtils.copy(inputStream, response.getOutputStream()); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 文件下载 |
| | | * |
| | | * @param response |
| | | * @param url |
| | | */ |
| | | public byte[] getBytes(HttpServletResponse response, String url) { |
| | | // 从链接中得到文件名 |
| | | String replace = url.replace(minioProperties.getBucket() + "/", "#"); |
| | | String fileName = replace.split("#")[1]; |
| | | InputStream inputStream; |
| | | byte[] bytes = new byte[0]; |
| | | try { |
| | | MinioClient minioClient = new MinioClient(minioProperties.getHost(), minioProperties.getAccessKey(), |
| | | minioProperties.getSecretKey()); |
| | | inputStream = minioClient.getObject(minioProperties.getBucket(), fileName); |
| | | bytes = toByteArray(inputStream); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return bytes; |
| | | } |
| | | } |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 10MB |
| | | max-request-size: 10MB |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | |
| | | eureka: |
| | | client: |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class LcApiServiceImpl implements LcApiService { |
| | | |
| | | @Value("${langchao.url}") |
| | | private String host; |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | |
| | | } else { |
| | | // 如果第一次请求浪潮的token请求,请求完成后,保存对于的token到数据库中。便于12小时内重复调用 |
| | | HttpRequest request = HttpUtil.createPost( |
| | | host + |
| | | LcApiConstants.GRID_GET_TOKEN_URL.replace("#username", name).replace("#password", password)); |
| | | HttpResponse result = request.execute(); |
| | | ValueOperations<String, String> valueOperations = redisTemplate.opsForValue(); |
| | |
| | | |
| | | @Override |
| | | public String getAllEventTypeList() { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_EVENT_CATEGORY_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_EVENT_CATEGORY_URL); |
| | | request.auth(getAuthToken()); |
| | | HttpResponse result = request.execute(); |
| | | return result.body(); |
| | |
| | | |
| | | @Override |
| | | public String submitEventRegister(EventInfo eventInfo) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_REGIST_EVENT_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_REGIST_EVENT_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | |
| | | |
| | | @Override |
| | | public R submitEventOrVisitRecordRelationFile(EventFile eventFile) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_EVENT_FILE_UPLOAD_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_EVENT_FILE_UPLOAD_URL); |
| | | request.auth(getAuthToken()); |
| | | try { |
| | | HttpURLConnection httpUrl = (HttpURLConnection)new URL(eventFile.getFiles()).openConnection(); |
| | |
| | | |
| | | @Override |
| | | public String getEventInfoById(String eventId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_APP_EVENT_INFO_DETAIL_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_APP_EVENT_INFO_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("eventId", eventId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | |
| | | @Override |
| | | public List<LcGridData> getGridTreeByAreaId(String areaId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_GET_EVENT_INFO_AREA_ID_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_GET_EVENT_INFO_AREA_ID_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | request.form("level", 4); |
| | |
| | | |
| | | @Override |
| | | public List<LcGridData> getGridDataListByAreaId(String areaId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.GRID_GET_GRID_DATA_AREA_ID_URL); |
| | | log.info("浪潮请求url"); |
| | | log.info(host + LcApiConstants.GRID_GET_GRID_DATA_AREA_ID_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.GRID_GET_GRID_DATA_AREA_ID_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | @Override |
| | | public List<GridMemberPageListDTO> getGridMemberListByAreaIdOrName(String areaId, String param, Long pageNum, |
| | | Long pageSize) { |
| | | HttpRequest request = HttpUtil.createGet(LcApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL); |
| | | HttpRequest request = HttpUtil.createGet(host + LcApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("areaId", areaId); |
| | | request.form("limit", pageSize); |
| | |
| | | |
| | | @Override |
| | | public String getFlowPersonVisitRecordDetailById(String recordId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_FLOW_PERSON_DETAIL_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.VISIT_RECORD_FLOW_PERSON_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("id", recordId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | public String getFlowPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, |
| | | Long loginUserId) { |
| | | HttpResponse result = getHttpResponse(personVisitRecordQueryDTO, loginUserId, |
| | | host + |
| | | LcApiConstants.VISIT_RECORD_FLOW_PERSON_PAGE_URL, "flowPeopleId"); |
| | | return result.body(); |
| | | } |
| | | |
| | | @Override |
| | | public String uploadFlowPersonVisitRecord(LcFlowPersonVisitRecordDTO lcFlowPersonVisitRecordDTO) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_FLOW_PERSON_SAVE_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.VISIT_RECORD_FLOW_PERSON_SAVE_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | |
| | | |
| | | @Override |
| | | public String uploadKeyPersonVisitRecord(LcKeyPersonVisitRecordDTO lcKeyPersonVisitRecordDTO) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL); |
| | | request.auth(getAuthToken()); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | |
| | | |
| | | @Override |
| | | public String getKeyPersonVisitRecordDetailById(String recordId) { |
| | | HttpRequest request = HttpUtil.createPost(LcApiConstants.VISIT_RECORD_KEY_PERSON_DETAIL_URL); |
| | | HttpRequest request = HttpUtil.createPost(host + LcApiConstants.VISIT_RECORD_KEY_PERSON_DETAIL_URL); |
| | | request.auth(getAuthToken()); |
| | | request.form("id", recordId); |
| | | HttpResponse result = request.execute(); |
| | |
| | | public String getKeyPersonVisitRecordPage(LcKeyPersonVisitRecordQueryDTO personVisitRecordQueryDTO, |
| | | Long loginUserId) { |
| | | HttpResponse result = getHttpResponse(personVisitRecordQueryDTO, loginUserId, |
| | | host + |
| | | LcApiConstants.VISIT_RECORD_KEY_PERSON_PAGE_URL, "keyPersonId"); |
| | | return result.body(); |
| | | } |
| | |
| | | String lcGrid = gridService.getLcGridIdByLocal(lcEventVisitingTasksListDTO.getGridId()); |
| | | String lcGridUserId = |
| | | gridService.getLcUserIdByLocalUserId(lcEventVisitingTasksListDTO.getGridMember().toString()); |
| | | R populationDetail = communityService.detailPopulation(lcEventVisitingTasksListDTO.getVisiterId()); |
| | | R populationDetail = communityService.detailPopulation(lcEventVisitingTasksListDTO.getVisiterId(), null); |
| | | ComMngPopulationVO comMngPopulationVO = (ComMngPopulationVO)populationDetail.getData(); |
| | | BcDictionaryItemVO diction = communityService.getByCode(DictionItemConstants.LC_CULTURE_LEVEL, |
| | | comMngPopulationVO.getCultureLevel().toString()); |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActMicroWishOperationRecordService; |
| | | import com.panzhihua.service_community.service.ComActMicroWishService; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-27 10:28:04 |
| | | * @describe 前端控制器 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/comActMicroWishOperationRecord") |
| | | public class ComActMicroWishOperationRecordApi { |
| | | @Resource |
| | | private ComActMicroWishOperationRecordService comActMicroWishOperationRecordService; |
| | | |
| | | /** |
| | | * 根据心愿id查询操作记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getByWishId") |
| | | public R getByWishId(@RequestParam("id") Long id){ |
| | | return comActMicroWishOperationRecordService.getByWishId(id); |
| | | } |
| | | } |
| | | |
| | |
| | | public R registerDetailedDetailAdmin(@RequestParam("reserveRecordId") Long reserveRecordId){ |
| | | return comActReserveRecordService.registerDetailedDetailAdmin(reserveRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 小程序查询所有进行中的预约登记 |
| | | * @param communityId 社区id |
| | | * @return 社区所有进行中的预约登记列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public R list(@RequestParam("communityId") Long communityId){ |
| | | return comActReserveService.reserveListApplets(communityId); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 编辑巡查记录 editPatrolRecord 编辑巡查记录 |
| | | * @param comSwPatrolRecordEditDTO 编辑巡查记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/edit") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editPatrolRecord(@RequestBody ComSwPatrolRecordEditDTO comSwPatrolRecordEditDTO) { |
| | | return comSwPatrolRecordService.editPatrolRecord(comSwPatrolRecordEditDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据巡查记录id查询详情 |
| | | * |
| | | * @param patrolRecordId |
| | |
| | | @PostMapping("/safetyWorkRecord/page") |
| | | public R pageSafetyWorkRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | return comSwSafetyWorkRecordService.pageSafetyWorkRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑安全工作记录 editSafetyWork 编辑安全工作记录 |
| | | * @param comSwSafetyWorkEditDTO 编辑安全工作记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/safetyWorkRecord/edit") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editSafetyWork(@RequestBody ComSwSafetyWorkEditDTO comSwSafetyWorkEditDTO) { |
| | | return comSwSafetyWorkRecordService.editSafetyWork(comSwSafetyWorkEditDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 编辑隐患报告 editDangerReport 编辑隐患报告 |
| | | * @param comSwDangerReportEditDTO 编辑隐患报告参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | @PostMapping("/dangerReport/edit") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editDangerReport(@RequestBody ComSwDangerReportEditDTO comSwDangerReportEditDTO) { |
| | | return comSwDangerReportService.editDangerReport(comSwDangerReportEditDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据隐患报告id查询详情 |
| | | * |
| | | * @param dangerReportId |
| | |
| | | * @return 导入结果 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("/population/importLowSecurity") |
| | | @PostMapping("population/importLowSecurity") |
| | | public R listSavePopulationLowSecurityExcelVO(@RequestBody List<ComMngPopulationLowSecurityExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId) { |
| | | return comMngPopulationService.listSaveLowSecurityPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入高龄老人 listSavePopulationElderExcelVO 批量导入高龄老人 |
| | | * @param list 高龄老人数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("population/importElder") |
| | | public R listSavePopulationElderExcelVO(@RequestBody List<ComMngPopulationElderExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comMngPopulationService.listSaveEdlerPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入养老金人员 listSavePopulationPensionExcelVO 批量导入养老金人员 |
| | | * @param list 养老金人员数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("population/importPension") |
| | | R listSavePopulationPensionExcelVO(@RequestBody List<ComMngPopulationPensionExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comMngPopulationService.listSavePensionPopulation(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 实有人口详情查询结果 |
| | | */ |
| | | @PostMapping("/population/detail") |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return comMngPopulationService.detailPopulation(populationId); |
| | | public R detailPopulation(@RequestParam(value = "populationId") Long populationId, @RequestParam(value = "communityId") Long communityId) { |
| | | return comMngPopulationService.detailPopulation(populationId, communityId); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import static java.util.stream.Collectors.toList; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | 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.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActPrizeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | |
| | | 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.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActPrizeDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDynDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthHistoryRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | import com.panzhihua.service_community.service.ComActActEvaluateService; |
| | | import com.panzhihua.service_community.service.ComActActPrizeService; |
| | | import com.panzhihua.service_community.service.ComActActivityService; |
| | | import com.panzhihua.service_community.service.ComActDynService; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoActivityService; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoService; |
| | | import com.panzhihua.service_community.service.ComActMessageService; |
| | | import com.panzhihua.service_community.service.ComActMicroWishService; |
| | | import com.panzhihua.service_community.service.ComActQuestnaireService; |
| | | import com.panzhihua.service_community.service.ComActService; |
| | | import com.panzhihua.service_community.service.ComEldersAuthUserService; |
| | | import com.panzhihua.service_community.service.ComMngStructAreaDistrictService; |
| | | import com.panzhihua.service_community.service.ComMngStructAreaService; |
| | | import com.panzhihua.service_community.service.ComMngStructHouseService; |
| | | import com.panzhihua.service_community.service.ComMngStructOtherBuildService; |
| | | import com.panzhihua.service_community.service.ComMngVolunteerMngService; |
| | | import com.panzhihua.service_community.service.EldersAuthService; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | private ComActEasyPhotoActivityService comActEasyPhotoActivityService; |
| | | @Resource |
| | | private ComActActEvaluateService comActActEvaluateService; |
| | | @Resource |
| | | private ComEldersAuthElderlyService comEldersAuthElderlyService; |
| | | @Resource |
| | | private ComActMicroWishOperationRecordService wishOperationRecordService; |
| | | @Resource |
| | | private ComActActEvaluateDAO comActActEvaluateDAO; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | } else { |
| | | comActActivityVO1.setType(2); |
| | | } |
| | | fillActivitySignList(id, comActActivityVO1); |
| | | }); |
| | | page.setRecords(content); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("detailactivity") |
| | | public R detailActivity(@RequestParam("id") Long id, |
| | | @RequestParam(value = "userId", required = false) Long userId) { |
| | | @RequestParam(value = "userId", required = false) Long userId, |
| | | @RequestParam(value = "pageNum",defaultValue = "1", required = false) Long pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10", required = false) Long pageSize) { |
| | | ComActActivityVO comActActivityVO = comActActivityService.inforActivity(id, userId); |
| | | if (ObjectUtils.isEmpty(comActActivityVO)) { |
| | | return R.fail("活动不存在"); |
| | |
| | | comActActivityVO.setComActActPrizeVOList(comActActPrizeVOS); |
| | | } |
| | | //活动评价 |
| | | List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateService |
| | | .list(new QueryWrapper<ComActActEvaluateDO>().lambda().eq(ComActActEvaluateDO::getActivityId, id)); |
| | | if (!ObjectUtils.isEmpty(comActActEvaluateDOList)) { |
| | | List<ComActActEvaluateVO> comActActEvaluateVOList = new ArrayList<>(); |
| | | comActActEvaluateDOList.forEach(comActActEvaluateDO -> { |
| | | ComActActEvaluateVO comActActEvaluateVO = new ComActActEvaluateVO(); |
| | | BeanUtils.copyProperties(comActActEvaluateDO, comActActEvaluateVO); |
| | | comActActEvaluateVOList.add(comActActEvaluateVO); |
| | | }); |
| | | comActActivityVO.setComActActEvaluateVOList(comActActEvaluateVOList); |
| | | //活动评价总数 |
| | | comActActivityVO.setEvaluateAmount(comActActEvaluateDOList.size()); |
| | | //当前用户对活动的评分 |
| | | Optional.ofNullable(userId).ifPresent(currentUserId -> { |
| | | Optional<ComActActEvaluateDO> optional = comActActEvaluateDOList.stream() |
| | | .filter(comActActEvaluateDO -> comActActEvaluateDO.getUserId().equals(currentUserId)).findFirst(); |
| | | if (optional.isPresent()) { |
| | | comActActivityVO.setMyRating(optional.get().getStarLevel()); |
| | | } |
| | | }); |
| | | IPage<ComActActEvaluateVO> comActActEvaluatePage = comActActEvaluateDAO.getEvaluateListPage(new Page(pageNum,pageSize),id); |
| | | comActActivityVO.setComActActEvaluateVOList(comActActEvaluatePage.getRecords()); |
| | | //活动评价总数 |
| | | comActActivityVO.setEvaluateAmount(comActActEvaluatePage.getTotal()); |
| | | //当前用户对活动的评分 |
| | | ComActActEvaluateVO userActEvaluateVO = comActActEvaluateDAO.getEvaluateListByUserId(id,userId); |
| | | if(userActEvaluateVO != null){ |
| | | comActActivityVO.setMyRating(userActEvaluateVO.getStarLevel()); |
| | | } |
| | | //签到时间 |
| | | Optional.ofNullable(userId).ifPresent(currentUserId -> { |
| | | R listSignInResult = comActActivityService.listSignInActivity(currentUserId); |
| | | if (R.isOk(listSignInResult) && !ObjectUtils.isEmpty(listSignInResult.getData())) { |
| | | Optional<ComActActRegistVO> optional = JSONArray.parseArray(JSONArray.toJSONString(listSignInResult.getData()), ComActActRegistVO.class).stream() |
| | | .filter(activitySignInVO -> activitySignInVO.getActivityId().equals(id)) |
| | | .sorted(Comparator.comparing(ComActActRegistVO::getCreateAt).reversed()).findFirst(); |
| | | if (optional.isPresent()) { |
| | | comActActivityVO.setActivitySignInDate(optional.get().getCreateAt()); |
| | | } |
| | | } |
| | | }); |
| | | fillActivitySignList(id, comActActivityVO); |
| | | comActActivityVO.setIntegral(0); |
| | | return R.ok(comActActivityVO); |
| | | } |
| | | |
| | | /** |
| | | * 填充活动报名名单 |
| | | * @param activityId 活动id |
| | | * @param comActActivityVO 需填充VO |
| | | */ |
| | | private void fillActivitySignList(Long activityId, ComActActivityVO comActActivityVO) { |
| | | //活动报名名单 |
| | | ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | activitySignVO.setActivityId(id); |
| | | activitySignVO.setActivityId(activityId); |
| | | R r = comActActivityService.listActivitySigns(activitySignVO); |
| | | if (R.isOk(r)) { |
| | | List<ActivitySignVO> activitySignVOS = |
| | |
| | | } |
| | | } |
| | | List<ActivitySignVO> collect = activitySignVOS.stream() |
| | | .filter(activitySignVO1 -> activitySignVO1.getIsVolunteer() == 1).collect(Collectors.toList()); |
| | | .filter(activitySignVO1 -> activitySignVO1.getIsVolunteer() == 1).collect(toList()); |
| | | if (!ObjectUtils.isEmpty(collect)) { |
| | | int size = collect.size(); |
| | | if (size >= 6) { |
| | |
| | | } |
| | | } |
| | | List<ActivitySignVO> collect1 = activitySignVOS.stream() |
| | | .filter(activitySignVO1 -> activitySignVO1.getIsVolunteer() == 0).collect(Collectors.toList()); |
| | | .filter(activitySignVO1 -> activitySignVO1.getIsVolunteer() == 0).collect(toList()); |
| | | if (!ObjectUtils.isEmpty(collect1)) { |
| | | int size = collect1.size(); |
| | | if (size >= 6) { |
| | |
| | | } |
| | | |
| | | } |
| | | comActActivityVO.setIntegral(0); |
| | | return R.ok(comActActivityVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取系统预置图库 getSysPictureList |
| | | * @param type 图库类型 |
| | | * @return R 系统图库集 |
| | | * @author txb |
| | | * @date 2021/8/27 13:33 |
| | | */ |
| | | @GetMapping("/activity/sysPicture/getList") |
| | | public R getSysPictureList(@RequestParam(value = "type") Integer type){ |
| | | return comActActivityService.getSysPictureList(type); |
| | | } |
| | | |
| | | /** |
| | | * 新增社区动态 |
| | | * |
| | | * @param comActDynVO |
| | |
| | | int size = list.size(); |
| | | if (size == 4) { |
| | | List<ComActDynDO> collect = list.stream().sorted(Comparator.comparing(ComActDynDO::getCreateAt)) |
| | | .collect(Collectors.toList()); |
| | | .collect(toList()); |
| | | ComActDynDO comActDynDO1 = collect.get(0); |
| | | comActDynDO1.setIsTopping(0); |
| | | boolean update = comActDynService.updateById(comActDynDO1); |
| | |
| | | int size = list.size(); |
| | | if (size == 4) { |
| | | List<ComActDynDO> collect = list.stream().sorted(Comparator.comparing(ComActDynDO::getUpdateAt)) |
| | | .collect(Collectors.toList()); |
| | | .collect(toList()); |
| | | ComActDynDO comActDynDO1 = collect.get(0); |
| | | comActDynDO1.setIsTopping(0); |
| | | boolean updateById = comActDynService.updateById(comActDynDO1); |
| | |
| | | return comActMicroWishService.pageMicroWish(comActMicroWishVO); |
| | | } |
| | | |
| | | @PostMapping("pagemicrowish/applets") |
| | | public R pageMicroWishApplets(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | return comActMicroWishService.pageMicroWishApplets(comActMicroWishVO); |
| | | } |
| | | |
| | | /** |
| | | * 心愿详情 |
| | | * |
| | |
| | | BeanUtils.copyProperties(comActMicroWishVO, comActMicroWishDO); |
| | | boolean save = comActMicroWishService.save(comActMicroWishDO); |
| | | if (save) { |
| | | wishOperationRecordService.addOperationRecord("用户提交微心愿",comActMicroWishVO.getSponsorId() |
| | | ,comActMicroWishDO.getId(), ComActMicroWishOperationRecordDO.type.ytj,"用户提交微心愿",null); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | if (authUserDO == null) { |
| | | return R.fail("未查询到老人信息"); |
| | | } |
| | | |
| | | Long elderId = authUserDO.getId(); |
| | | boolean canReAuthThisMonth = comEldersAuthUserService.checkReAuthAgain(elderId); |
| | | if (!canReAuthThisMonth) { |
| | | return R.fail("当月已认证,不能再次进行认证"); |
| | | } |
| | | |
| | | //根据身份证获取出生日期并获取岁数 |
| | | String idCard = authUserDO.getIdCard(); |
| | | |
| | | Long loginUserId = eldersAuthAddByFamilyDTO.getUserId(); |
| | | EldersAuthDO eldersAuthDO = new EldersAuthDO(); |
| | | eldersAuthDO.setSumitUserId(loginUserId); |
| | | eldersAuthDO.setCreateBy(loginUserId); |
| | | eldersAuthDO.setCreateAt(new Date()); |
| | | eldersAuthDO.setIdCard(idCard); |
| | | eldersAuthDO.setAuthUserName(authUserDO.getName()); |
| | | eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl()); |
| | | eldersAuthDO.setFamilyUserId(authUserDO.getId()); |
| | | eldersAuthDO.setAge(IdcardUtil.getAgeByIdCard(idCard)); |
| | | // 根据身份证查询出籍贯 出生日期 |
| | | // String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); |
| | | String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard()); |
| | | if (StringUtils.isEmpty(domicile)) { |
| | | domicile = "暂无"; |
| | | } |
| | | |
| | | Date birthDay = IdCard.birthDay(idCard); |
| | | eldersAuthDO.setDomicile(domicile); |
| | | eldersAuthDO.setBirthDay(birthDay); |
| | | int add = eldersAuthService.getBaseMapper().insert(eldersAuthDO); |
| | | if (add == 1) { |
| | | // 设置认证成功 |
| | | Long familyUserId = eldersAuthDO.getFamilyUserId(); |
| | | ComEldersAuthUserDO comEldersAuthUserDO = new ComEldersAuthUserDO(); |
| | | comEldersAuthUserDO.setId(familyUserId); |
| | | comEldersAuthUserDO.setIsAuth(1); |
| | | boolean updated = comEldersAuthUserService.updateById(comEldersAuthUserDO); |
| | | if (!updated) { |
| | | throw new ServiceException("添加认证失败,更新认证状态"); |
| | | } |
| | | // 认证成功 添加认证记录 |
| | | List<ComEldersAuthHistoryRecordDO> authHistoryRecordDOList = |
| | | comEldersAuthHistoryRecordMapper.selectList(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getIdCard, idCard) |
| | | .ge(ComEldersAuthHistoryRecordDO::getCreateAt, DateUtils.getFirstDayOfMonth())); |
| | | if (authHistoryRecordDOList.isEmpty()) { |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | authHistoryRecordDO.setUserId(eldersAuthAddByFamilyDTO.getFamilyUserId()); |
| | | authHistoryRecordDO.setAuthId(eldersAuthDO.getId()); |
| | | BeanUtils.copyProperties(eldersAuthDO, authHistoryRecordDO); |
| | | authHistoryRecordDO.setId(null); |
| | | authHistoryRecordDO.setBrithday(AgeUtils.getAgeFormatBirthday(IdcardUtil.getBirthByIdCard(idCard))); |
| | | authHistoryRecordDO.setAge(IdcardUtil.getAgeByIdCard(idCard)); |
| | | authHistoryRecordDO.setIsAuth(1); |
| | | authHistoryRecordDO.setDomicile(domicile); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | return R.ok(eldersAuthDO.getId()); |
| | | } |
| | | long year=DateUtil.betweenYear(birthDay,DateUtil.date(),true); |
| | | if(authUserDO.getBigAgeId()!=null){ |
| | | ComEldersAuthElderlyDO comEldersAuthElderlyDO=comEldersAuthElderlyService.getById(authUserDO.getBigAgeId()); |
| | | if(comEldersAuthElderlyDO!=null&&comEldersAuthElderlyDO.getIsExist()==ComEldersAuthElderlyDO.isExist.yes&&comEldersAuthElderlyDO.getIsBigAge()==ComEldersAuthElderlyDO.isBigAge.yes&&year>=80){ |
| | | Long elderId = authUserDO.getId(); |
| | | boolean canReAuthThisMonth = comEldersAuthUserService.checkReAuthAgain(elderId); |
| | | if (!canReAuthThisMonth) { |
| | | return R.fail("当月已认证,不能再次进行认证"); |
| | | } |
| | | Long loginUserId = eldersAuthAddByFamilyDTO.getUserId(); |
| | | EldersAuthDO eldersAuthDO = new EldersAuthDO(); |
| | | eldersAuthDO.setSumitUserId(loginUserId); |
| | | eldersAuthDO.setCreateBy(loginUserId); |
| | | eldersAuthDO.setCreateAt(new Date()); |
| | | eldersAuthDO.setIdCard(idCard); |
| | | eldersAuthDO.setAuthUserName(authUserDO.getName()); |
| | | eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl()); |
| | | eldersAuthDO.setFamilyUserId(authUserDO.getId()); |
| | | eldersAuthDO.setAge(IdcardUtil.getAgeByIdCard(idCard)); |
| | | // 根据身份证查询出籍贯 出生日期 |
| | | // String domicile = IdCard.domicile(eldersAuthDO.getIdCard()); |
| | | String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard()); |
| | | if (StringUtils.isEmpty(domicile)) { |
| | | domicile = "暂无"; |
| | | } |
| | | eldersAuthDO.setDomicile(domicile); |
| | | eldersAuthDO.setBirthDay(birthDay); |
| | | int add = eldersAuthService.getBaseMapper().insert(eldersAuthDO); |
| | | if (add == 1) { |
| | | // 设置认证成功 |
| | | Long familyUserId = eldersAuthDO.getFamilyUserId(); |
| | | ComEldersAuthUserDO comEldersAuthUserDO = new ComEldersAuthUserDO(); |
| | | comEldersAuthUserDO.setId(familyUserId); |
| | | comEldersAuthUserDO.setIsAuth(1); |
| | | boolean updated = comEldersAuthUserService.updateById(comEldersAuthUserDO); |
| | | if (!updated) { |
| | | throw new ServiceException("添加认证失败,更新认证状态"); |
| | | } |
| | | // 认证成功 添加认证记录 |
| | | List<ComEldersAuthHistoryRecordDO> authHistoryRecordDOList = |
| | | comEldersAuthHistoryRecordMapper.selectList(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getIdCard, idCard) |
| | | .ge(ComEldersAuthHistoryRecordDO::getCreateAt, DateUtils.getFirstDayOfMonth())); |
| | | if (authHistoryRecordDOList.isEmpty()) { |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | authHistoryRecordDO.setUserId(eldersAuthAddByFamilyDTO.getFamilyUserId()); |
| | | authHistoryRecordDO.setAuthId(eldersAuthDO.getId()); |
| | | BeanUtils.copyProperties(eldersAuthDO, authHistoryRecordDO); |
| | | authHistoryRecordDO.setId(null); |
| | | authHistoryRecordDO.setBrithday(AgeUtils.getAgeFormatBirthday(IdcardUtil.getBirthByIdCard(idCard))); |
| | | authHistoryRecordDO.setAge(IdcardUtil.getAgeByIdCard(idCard)); |
| | | authHistoryRecordDO.setIsAuth(1); |
| | | authHistoryRecordDO.setDomicile(domicile); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | return R.ok(eldersAuthDO.getId()); |
| | | } |
| | | |
| | | return R.fail(); |
| | | } |
| | | return R.fail("不满足认证条件"); |
| | | } |
| | | return R.fail("未查询到高龄老人库数据"); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取首页弹窗接口 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 首页弹窗接口 |
| | | */ |
| | | @PostMapping("easyphoto/getUserRewards") |
| | | public R getUserRewards(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId) { |
| | | return comActEasyPhotoService.getUserReward(userId, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * @param userId |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:52 |
| | | **/ |
| | |
| | | private ComActDiscussService comActDiscussService; |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 议事投票-编辑 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | return comActDiscussService.detailDiscuss(id); |
| | | @PostMapping("editdiscuss") |
| | | public R editDiscuss(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.editDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("detaildiscuss") |
| | | public R detailDiscuss(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return comActDiscussService.detailDiscuss(discussDetailDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @PostMapping("discussCommentReplyAdmin") |
| | | public R discussCommentReplyAdmin(@RequestBody ComActDiscussDetailDTO discussDetailDTO) { |
| | | return comActDiscussService.discussCommentReplyAdmin(discussDetailDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @PostMapping("pagediscussAdmin") |
| | | public R pageDiscussAdmin(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | return comActDiscussService.pageDiscussAdmin(pageComActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @PostMapping("detaildiscusscommentAdmin") |
| | | public R detailDiscusscommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return comActDiscussService.detailDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @PostMapping("pagediscusscommentAdmin") |
| | | public R pageDiscussCommentAdmin(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | return comActDiscussService.pageDiscussCommentAdmin(pageComActDiscussCommentDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 评论点赞 |
| | |
| | | return comActDiscussService.putDiscussCommentUser(comActDiscussUserDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @PostMapping("publishResultAdmin") |
| | | public R publishResultAdmin(@RequestBody ComActDiscussPublishResultDTO publishResultDTO) { |
| | | return comActDiscussService.publishResultAdmin(publishResultDTO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("deleteDiscussCommentAdmin") |
| | | public R deleteDiscussCommentAdmin(@RequestParam("id") Long id) { |
| | | return comActDiscussService.deleteDiscussCommentAdmin(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @GetMapping("discussJurisdictionGet") |
| | | public R discussJurisdictionGet(@RequestParam("communityId") Long communityId,@RequestParam("userId") Long userId) { |
| | | return comActDiscussService.discussJurisdictionGet(communityId,userId); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @GetMapping("discussJurisdictionSet") |
| | | public R discussJurisdictionSet(@RequestParam("communityId") Long communityId,@RequestParam("value") String value) { |
| | | return comActDiscussService.discussJurisdictionSet(communityId,value); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("timedTaskDiscussInspectStatus") |
| | | public R timedTaskDiscussInspectStatus() { |
| | | return comActDiscussService.timedTaskDiscussInspectStatus(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @PostMapping("discuss/increase-view-num") |
| | | public void increaseViewNum(@RequestParam("discussId") Long discussId) { |
| | | comActDiscussService.increaseViewNum(discussId); |
| | | } |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @PostMapping("discuss/edit-result") |
| | | public R editDiscussResult(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.editDiscussResult(comActDiscussDTO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每半小时执行一次将一起议浏览量写入到表中 |
| | | */ |
| | | @PostMapping("discuss/write-view-num") |
| | | public R timedTaskWriteDiscussViewNumToTable() { |
| | | return comActDiscussService.writeDiscussViewNumToTable(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("discuss/permissions") |
| | | public R getDiscussPermissions(@RequestBody ComActDiscussDTO comActDiscussDTO) { |
| | | return comActDiscussService.getDiscussPermissions(comActDiscussDTO); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthElderlyDO; |
| | | import com.panzhihua.service_community.service.*; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthHistoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthElderlyDetailsVO; |
| | | import com.panzhihua.common.model.vos.elders.ComElderAuthUserDetailVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthUserDO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | import com.panzhihua.service_community.service.ComEldersAuthUserService; |
| | | import com.panzhihua.service_community.service.EldersAuthService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | private ComEldersAuthUserService comEldersAuthUserService; |
| | | @Resource |
| | | private EldersAuthService eldersAuthService; |
| | | @Resource |
| | | private ComEldersAuthElderlyService comEldersAuthElderlyService; |
| | | @Resource |
| | | private ComElderAuthRecordsService comElderAuthRecordsService; |
| | | @Resource |
| | | private ComPensionAuthRecordService comPensionAuthRecordService; |
| | | @Resource |
| | | private ComPensionAuthHistoryRecordService comPensionAuthHistoryRecordService; |
| | | |
| | | @PostMapping("/getAuth") |
| | | public R getAuth(@RequestParam("authUserId") Long authUserId) { |
| | |
| | | if (authUserDO == null) { |
| | | return R.fail("未查询到老人信息"); |
| | | } |
| | | |
| | | //判断当前提交用户是否符合认证条件 |
| | | ComEldersAuthElderlyDO authElderlyDO = comEldersAuthElderlyService.getOne(new QueryWrapper<ComEldersAuthElderlyDO>() |
| | | .lambda().eq(ComEldersAuthElderlyDO::getId,authUserDO.getBigAgeId())); |
| | | if(authElderlyDO == null){ |
| | | return R.fail("未查询到老人信息"); |
| | | } |
| | | |
| | | int age = IdcardUtil.getAgeByIdCard(authElderlyDO.getIdCard()); |
| | | if(age < 80 || authElderlyDO.getIsBigAge().equals(ComEldersAuthElderlyDO.isBigAge.no) |
| | | || authElderlyDO.getIsExist().equals(ComEldersAuthElderlyDO.isExist.no)){ |
| | | return R.fail("未满足认证条件"); |
| | | } |
| | | |
| | | if (authUserDO.getIsAuth().equals(ComEldersAuthUserDO.isAuth.yes)) { |
| | | List<EldersAuthDO> eldersAuthDOList = eldersAuthService.list(new QueryWrapper<EldersAuthDO>().lambda() |
| | | .eq(EldersAuthDO::getType, 2).ge(EldersAuthDO::getCreateAt, DateUtils.getFirstDayOfMonth())); |
| | | .eq(EldersAuthDO::getType, 2).eq(EldersAuthDO::getFamilyUserId,authUserId) |
| | | .ge(EldersAuthDO::getCreateAt, DateUtils.getFirstDayOfMonth())); |
| | | if (!eldersAuthDOList.isEmpty()) { |
| | | return R.fail("该老人已认证"); |
| | | } |
| | | |
| | | } |
| | | ComElderAuthUserDetailVO authUserDetailVO = new ComElderAuthUserDetailVO(); |
| | | BeanUtils.copyProperties(authUserDO, authUserDetailVO); |
| | |
| | | * @param eldersAuthTypeQueryDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/authtype") |
| | | R communityElderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | @PostMapping("/authType") |
| | | public R elderAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return eldersAuthService.communityAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | |
| | | return eldersAuthService.getAuthHistoryExport(pageEldersAuthElderlyDTO); |
| | | } |
| | | |
| | | @PostMapping("/auth/task") |
| | | public R timedTaskEldersAuthJobHandler() { |
| | | return eldersAuthService.timedTaskEldersAuthJobHandler(); |
| | | } |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/auth/record/task") |
| | | public R timedTaskEldersRecordAuthJobHandler() { |
| | | return eldersAuthService.timedTaskEldersRecordAuthJobHandler(); |
| | | } |
| | | |
| | | //2021-8-30 身份认证改版(高龄老人认证管理)接口 |
| | | /** |
| | | * 分页查询高龄老人认证记录 pageElderAuthRecords 分页查询高龄老人认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/page") |
| | | public R pageElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | return comElderAuthRecordsService.pageElderAuthRecords(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据高龄认证记录id查询详情 detailElderAuthRecords 根据高龄认证记录id查询详情 |
| | | * @param authRecordId 高龄认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @GetMapping("/authRecords/detail") |
| | | public R detailElderAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return comElderAuthRecordsService.detailElderAuthRecords(authRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证审核 examineElderAuthRecords 高龄认证审核 |
| | | * @param comElderAuthRecordVO 高龄认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/examine") |
| | | public R examineElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | return comElderAuthRecordsService.examineElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证标记 examineElderAuthRecords 高龄认证标记 |
| | | * @param comElderAuthRecordVO 高龄认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/sign") |
| | | public R signElderAuthRecords(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | return comElderAuthRecordsService.signElderAuthRecords(comElderAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 根据高龄认证记录id批量查询 getElderAuthRecordsByIds 根据高龄认证记录id批量查询 |
| | | * @param ids 高龄认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/getList") |
| | | public R getElderAuthRecordsByIds(@RequestBody List<Long> ids){ |
| | | return comElderAuthRecordsService.getElderAuthRecordsByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入高龄老人线下认证记录 listSaveElderAuthRecordExcelVO 批量导入高龄老人线下认证记录 |
| | | * @param list 高龄老人线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("/authRecords/underLine/import") |
| | | public R listSaveElderAuthRecordExcelVO(@RequestBody List<ComElderAuthRecordImportExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comElderAuthRecordsService.listSaveElderAuthRecordExcelVO(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 导出高龄认证记录 exportElderAuthRecordsStatistic 导出高龄认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/statistic/export") |
| | | public R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO){ |
| | | return comElderAuthRecordsService.exportElderAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 14:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/page") |
| | | public R pagePensionAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | return comPensionAuthRecordService.pagePensionAuthRecords(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据养老认证记录id查询详情 detailPensionAuthRecords 根据养老认证记录id查询详情 |
| | | * @param authRecordId 养老认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @GetMapping("/pensionAuthRecords/detail") |
| | | public R detailPensionAuthRecords(@RequestParam(value = "authRecordId") Long authRecordId) { |
| | | return comPensionAuthRecordService.detailPensionAuthRecords(authRecordId); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证审核 examinePensionAuthRecords 养老认证审核 |
| | | * @param comPensionAuthRecordVO 养老认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/examine") |
| | | public R examinePensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return comPensionAuthRecordService.examinePensionAuthRecords(comPensionAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证标记 signPensionAuthRecords 养老认证标记 |
| | | * @param comPensionAuthRecordVO 养老认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/sign") |
| | | public R signPensionAuthRecords(@RequestBody ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | return comPensionAuthRecordService.signPensionAuthRecords(comPensionAuthRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 根据养老认证记录id批量查询 getPensionAuthRecordsByIds 根据养老认证记录id批量查询 |
| | | * @param ids 养老认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/getList") |
| | | public R getPensionAuthRecordsByIds(@RequestBody List<Long> ids){ |
| | | return comPensionAuthRecordService.getPensionAuthRecordsByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 批量导入养老线下认证记录 listSavePensionAuthRecordExcelVO 批量导入养老线下认证记录 |
| | | * @param list 养老线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/08 10:03 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @PostMapping("/pensionAuthRecords/underLine/import") |
| | | R listSavePensionAuthRecordExcelVO(@RequestBody List<ComPensionAuthRecordImportExcelVO> list, |
| | | @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){ |
| | | return comPensionAuthRecordService.listSavePensionAuthRecordExcelVO(list, communityId, userId); |
| | | } |
| | | |
| | | /** |
| | | * 导出养老认证记录 exportPensionAuthRecordsStatistic 导出养老认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/statistic/export") |
| | | public R exportPensionAuthRecordsStatistic(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO){ |
| | | return comPensionAuthRecordService.exportPensionAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/pensionAuthRecords/authType/{type}") |
| | | public R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { |
| | | return comPensionAuthRecordService.setPensionAuthType(communityId, type); |
| | | } |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/authtype") |
| | | public R communityPensionAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return comPensionAuthRecordService.communityPensionAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/authRecords/statistics") |
| | | public R timedTaskElderAuthStatisticsJobHandler(){ |
| | | return comElderAuthRecordsService.timedTaskElderAuthStatisticsJobHandler(); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每年3月1号0点统计养老认证本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/pensionAuthRecords/statistics") |
| | | R timedTaskPensionAuthStatisticsJobHandler(){ |
| | | return comPensionAuthRecordService.timedTaskPensionAuthStatisticsJobHandler(); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PutMapping("/new/authType/{type}") |
| | | public R setAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type) { |
| | | return eldersAuthService.setAuthType(communityId, type); |
| | | } |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | @PostMapping("/new/authtype") |
| | | public R communityAuthType(@RequestBody EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | return eldersAuthService.getAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @PostMapping("/auth/statistic/page") |
| | | public R pageAuthStatisticAdmin(@RequestBody PageElderAuthStatisticDTO pageElderAuthStatisticDTO) { |
| | | return eldersAuthService.pageAuthStatisticAdmin(pageElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/auth/statistic/sign") |
| | | public R signAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | return eldersAuthService.signAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @PostMapping("/auth/header/statistic") |
| | | public R getAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | return eldersAuthService.getAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | @PostMapping("/pension/auth/statistic/page") |
| | | public R pagePensionAuthStatisticAdmin(@RequestBody PagePensionAuthStatisticDTO pensionAuthStatisticDTO) { |
| | | return comPensionAuthHistoryRecordService.pagePensionAuthStatisticAdmin(pensionAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @PostMapping("/pension/auth/statistic/sign") |
| | | public R signPensionAuthStatisticAdmin(@RequestBody SignElderAuthStatisticDTO signElderAuthStatisticDTO) { |
| | | return comPensionAuthHistoryRecordService.signPensionAuthStatisticAdmin(signElderAuthStatisticDTO); |
| | | } |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | @PostMapping("/pension/auth/header/statistic") |
| | | public R getPensionAuthHeaderStatisticAdmin(@RequestBody ElderAuthStatisticHeaderDTO statisticHeaderDTO) { |
| | | return comPensionAuthHistoryRecordService.getPensionAuthHeaderStatisticAdmin(statisticHeaderDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthTypeEnum.ELDER_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthTypeEnum.PENSION_AUTH; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | 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.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.utlis.TencentUtils; |
| | | import com.panzhihua.service_community.dao.ComElderAuthElderliesDAO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | import com.panzhihua.service_community.service.ComPensionAuthRecordService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: IdentityAuthApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 身份认证相关api |
| | | * @author: hans |
| | | * @date: 2021/09/01 18:06 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/identity-auth") |
| | | public class IdentityAuthApi { |
| | | |
| | | private static final String ELDER_AUTH_TYPE_PREFIX = "ELDER_AUTH_TYPE_"; |
| | | private static final String PENSION_AUTH_TYPE_PREFIX = "PENSION_AUTH_TYPE_"; |
| | | |
| | | @Resource |
| | | private ComElderAuthRecordsService comElderAuthRecordsService; |
| | | @Resource |
| | | private ComPensionAuthRecordService comPensionAuthRecordService; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | @Resource |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | /** |
| | | * 新增身份认证 |
| | | * @param addIdentityAuthDTO 新增身份认证请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R addIdentityAuth(@RequestBody AddIdentityAuthDTO addIdentityAuthDTO) { |
| | | String eidToken = addIdentityAuthDTO.getEidToken(); |
| | | boolean isEidTokenBlank = isBlank(eidToken); |
| | | if (!Boolean.logicalXor(isEidTokenBlank, isBlank(addIdentityAuthDTO.getAuthVideo()))) { |
| | | return R.fail("缺少认证参数"); |
| | | } |
| | | if (!isEidTokenBlank) { |
| | | String result = TencentUtils.getEidResult(eidToken); |
| | | JSONObject object = JSON.parseObject(result); |
| | | if (object == null) { |
| | | return R.fail("核验失败"); |
| | | } |
| | | JSONObject textObject = object.getJSONObject("Text"); |
| | | String code = textObject.getString("ErrCode"); |
| | | if (!code.equals("0")) { |
| | | log.error("人脸核验失败,错误原因:" + textObject.toJSONString()); |
| | | return R.fail("核验失败"); |
| | | } |
| | | addIdentityAuthDTO.setAuthMethod(FACE_AUTH.getMethod()); |
| | | addIdentityAuthDTO.setVerificationResult(object.toJSONString()); |
| | | } |
| | | int authType = addIdentityAuthDTO.getAuthType().intValue(); |
| | | if (authType == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.addElderAuth(addIdentityAuthDTO); |
| | | } else if (authType == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.addPensionAuth(addIdentityAuthDTO); |
| | | } else { |
| | | return R.fail("请核对需要认证的类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 分页查询身份认证记录 |
| | | * @param pageIdentityAuthRecordDTO 分页查询身份认证记录参数 |
| | | * @return 身份认证记录列表 |
| | | */ |
| | | @PostMapping("/record/page") |
| | | public R queryRecordWithPage(@RequestBody PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO) { |
| | | int authType = pageIdentityAuthRecordDTO.getAuthType().intValue(); |
| | | if (authType == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } else if (authType == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.queryRecordWithPage(pageIdentityAuthRecordDTO); |
| | | } else { |
| | | return R.fail("请核对需要查询的身份认证类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param authType 认证类型 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R retrieveIdentityAuthDetail(@RequestParam("authType") Integer authType, |
| | | @RequestParam("identityAuthId") Long identityAuthId) { |
| | | if (authType.intValue() == ELDER_AUTH.getType()) { |
| | | return comElderAuthRecordsService.retrieveElderAuthDetail(identityAuthId); |
| | | } else if (authType.intValue() == PENSION_AUTH.getType()) { |
| | | return comPensionAuthRecordService.retrievePensionAuthDetail(identityAuthId); |
| | | } else { |
| | | return R.fail("请核对认证类型"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证方式 |
| | | * @param communityId |
| | | * @param identityAuthType |
| | | * @return 认证方式 |
| | | */ |
| | | @GetMapping("/mode") |
| | | public R getIdentityAuthMode(@RequestParam(value = "communityId") Long communityId, |
| | | @RequestParam(value = "identityAuthType") Integer identityAuthType) { |
| | | String identityCode; |
| | | if (identityAuthType.intValue() == ELDER_AUTH.getType()) { |
| | | //高龄认证 |
| | | identityCode = ELDER_AUTH_TYPE_PREFIX + communityId; |
| | | } else if (identityAuthType.intValue() == PENSION_AUTH.getType()) { |
| | | //养老认证 |
| | | identityCode = PENSION_AUTH_TYPE_PREFIX + communityId; |
| | | } else { |
| | | return R.fail("身份认证类型错误"); |
| | | } |
| | | SysConfDO sysConfDO = sysConfDao.selectOne(new QueryWrapper<SysConfDO>() |
| | | .lambda().eq(SysConfDO::getCode, identityCode).eq(SysConfDO::getCommunityId, communityId)); |
| | | if (nonNull(sysConfDO)) { |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(sysConfDO, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.fail("获取失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 获取身份认证人脸核验token |
| | | * @param getIdentityEidTokenDTO |
| | | * @return token |
| | | */ |
| | | @PostMapping("/getEidToken") |
| | | public R getEidToken(@RequestBody GetIdentityEidTokenDTO getIdentityEidTokenDTO) { |
| | | int isExist; |
| | | String idCard; |
| | | try { |
| | | idCard = AESUtil.encrypt128(getIdentityEidTokenDTO.getIdCard(), aesKey); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("加密失败【{}】", e.getMessage()); |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (getIdentityEidTokenDTO.getAuthType().intValue() == ELDER_AUTH.getType()) { |
| | | //高龄认证 |
| | | isExist = comElderAuthElderliesDAO.selectCount(new QueryWrapper<ComElderAuthElderliesDO>() |
| | | .lambda().eq(ComElderAuthElderliesDO::getName, getIdentityEidTokenDTO.getName()) |
| | | .eq(ComElderAuthElderliesDO::getIdCard, idCard)); |
| | | } else if (getIdentityEidTokenDTO.getAuthType().intValue() == PENSION_AUTH.getType()) { |
| | | //养老认证 |
| | | isExist = comPensionAuthPensionerDAO.selectCount(new QueryWrapper<ComPensionAuthPensionerDO>() |
| | | .lambda().eq(ComPensionAuthPensionerDO::getName, getIdentityEidTokenDTO.getName()) |
| | | .eq(ComPensionAuthPensionerDO::getIdCard, idCard)); |
| | | } else { |
| | | return R.fail("请核对身份认证类型"); |
| | | } |
| | | if (isExist <= 0) { |
| | | return R.fail("该人员未在社区报道无法认证"); |
| | | } |
| | | // 获取EidToken |
| | | return R.ok(TencentUtils.getEidToken(getIdentityEidTokenDTO.getName(), getIdentityEidTokenDTO.getIdCard())); |
| | | } |
| | | } |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("getNeighborTopicByApp") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId); |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("addNeighborTopicByApp") |
| | | public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO){ |
| | | return comActNeighborCircleTopicService.addNeighborTopicByApp(circleTopicAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-删除邻里圈 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("deleteNeighborByApp") |
| | | public R deleteNeighborByApp(@RequestBody DeleteNeighborCircleAppDTO circleTopicAppDTO){ |
| | | return comActNeighborCircleService.deleteNeighborByApp(circleTopicAppDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | return R.ok(value); |
| | | } |
| | | |
| | | /** |
| | | * 根据系统code以及社区id查询配置表value值 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value值 |
| | | */ |
| | | @GetMapping("getSysConfValue") |
| | | public R getSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId) { |
| | | return sysConfService.getSysConfValue(key,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 新增系统code配置数据 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 新增结果 |
| | | */ |
| | | @GetMapping("addSysConfValue") |
| | | public R addSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId,@RequestParam("name") String name,@RequestParam("value") String value) { |
| | | return sysConfService.addSysConfValue(key,communityId,name,value); |
| | | } |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | @GetMapping("editSysConfValue") |
| | | public R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status) { |
| | | return sysConfService.editSysConfValue(communityId,status); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideClassifyService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | public class WorkGuideApi extends BaseController { |
| | | @Resource |
| | | private ComActWorkGuideService workGuideService; |
| | | @Resource |
| | | private ComActWorkGuideClassifyService comActWorkGuideClassifyService; |
| | | |
| | | /** |
| | | * 办事指南_新增 |
| | |
| | | return workGuideService.delectWorkGuide(workGuideId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询办事执念-分类管理 addWorkGuideClassify 分页查询办事执念-分类管理 |
| | | * @param comActWorkGuideClassifyVO 查询参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @PostMapping("workGuide/classify/apage") |
| | | public R pageWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | return comActWorkGuideClassifyService.pageWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 办事执念-分类管理新增或修改 addWorkGuideClassify 办事执念-分类管理新增或修改 |
| | | * @param comActWorkGuideClassifyVO 新增或修改参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @PostMapping("workGuide/classify/add") |
| | | public R addWorkGuideClassify(@RequestBody ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | return comActWorkGuideClassifyService.addWorkGuideClassify(comActWorkGuideClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 办事执念-分类管理删除 addWorkGuideClassify 办事执念-分类管理删除 |
| | | * @param workGuideClassifyId 办事执念-分类管理id |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("workGuide/classify/delete") |
| | | public R deleteWorkGuideClassify(@RequestParam("workGuideClassifyId") Long workGuideClassifyId) { |
| | | return comActWorkGuideClassifyService.deleteWorkGuideClassify(workGuideClassifyId); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南-分类管理列表查询 getWorkGuideClassifyList 办事指南-分类管理列表查询 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | @GetMapping("workGuide/classify/getList") |
| | | public R getWorkGuideClassifyList() { |
| | | return comActWorkGuideClassifyService.getWorkGuideClassifyList(); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @PostMapping("listworkguide") |
| | | public R listWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return workGuideService.listWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @GetMapping("listworkguide/classify") |
| | | public R listWorkGuideByClassifyId(@RequestParam("classifyId") Long classifyId) { |
| | | return workGuideService.listWorkGuideByClassifyId(classifyId); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | List<ComActActEvaluateExcelVO> getEvaluateLists(@Param("comActActEvaluateVO") ComActActEvaluateVO comActActEvaluateVO); |
| | | |
| | | /** |
| | | * 分页查询活动评价列表 |
| | | * @param page 分页参数 |
| | | * @param activityId 活动id |
| | | * @return 活动评价列表 |
| | | */ |
| | | IPage<ComActActEvaluateVO> getEvaluateListPage(Page page, @Param("activityId") Long activityId); |
| | | |
| | | /** |
| | | * 查询某活动的用户评价 |
| | | * @param activityId 活动id |
| | | * @param userId 用户id |
| | | * @return 用户评价记录 |
| | | */ |
| | | ComActActEvaluateVO getEvaluateListByUserId(@Param("activityId") Long activityId,@Param("userId") Long userId); |
| | | |
| | | } |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, " |
| | | + "a.`status`, " + "a.publish_at, " + "a.begin_at, " + "a.cover, " + "a.end_at, " + "a.volunteer_max, " |
| | | @Select("<script> " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " |
| | | + "a.activity_addr, " + "a.aattend_people," |
| | | + "a.`status`, " + "a.is_qr_code, " + "a.publish_at, " + "a.begin_at, " + "a.cover, " + "a.end_at, " + "a.volunteer_max, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " |
| | | + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.participant_max, " + "a.sign_up_begin, " |
| | | + "a.sign_up_end, " + "ca.name as communityName " + "FROM " + "com_act_activity a " |
| | | + "join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join com_act ca on a.community_id=ca.community_id " + " where 1=1 " + |
| | | |
| | | "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id=#{comActActivityVO.communityId} " + " </if> " |
| | |
| | | @Select("SELECT " + "u.name sponsorName, " + "ca.name communityName, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " |
| | | + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.* " + "FROM " + "com_act_activity a " |
| | | + "join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join sys_user u on a.sponsor_id=u.user_id " + "left join com_act_act_sign s on a.id=s.activity_id " |
| | | + "left join com_act ca on a.community_id=ca.community_id " + "where a.id=#{id} " + " group by a.id ") |
| | | ComActActivityVO inforActivity(Long id); |
| | | |
| | |
| | | + "</foreach> " + "</script>") |
| | | int updateIdBatch(@Param("longs") List<Long> longs); |
| | | |
| | | @Update("update com_act_activity set `status`=2 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0") |
| | | @Update("update com_act_activity set `status`=3 where `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0") |
| | | int updateStatusToNotBegin(); |
| | | |
| | | @Update("update com_act_activity set `status`=3 where `status`=2 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_begin)<=0") |
| | | int updateStatusToBeginSign(); |
| | | |
| | | @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | | @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0") |
| | | int updateStatusToBeginActiveOrEnd(); |
| | | |
| | | @Select("<script> " + "select t.* from ( " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " |
| | | + "a.activity_addr, " + "a.participant_max, " + "count(if(s.is_volunteer=1,null,s.id))participant_now, " |
| | | + "a.volunteer_max, " + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " |
| | | + "a.publish_at, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " |
| | | + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " |
| | | + " com_act_activity a " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " |
| | | + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE " |
| | | + " a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} " |
| | |
| | | + " </if> " + "group by a.id " + " " + " union all " + "select t1.* from ( " + " " + " SELECT " + "a.id, " |
| | | + "a.activity_name, " + "u.`name` sponsorName, " + "a.activity_addr, " + "a.participant_max, " |
| | | + "count(if(s.is_volunteer=1,null,s.id))participant_now, " + "a.volunteer_max, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.begin_at, " |
| | | + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " |
| | | + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a " |
| | | + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " |
| | | + "WHERE " + " a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} " |
| | |
| | | IPage<ComActActivityVO> pageActivityCommunityBack(Page page, |
| | | @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | @Select("select id from com_act_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | | @Select("select id from com_act_activity where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0") |
| | | List<Long> getActivityEndIds(); |
| | | |
| | | @Update("update com_act_activity set `status`=4 where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("" + |
| | | "SELECT\n" + |
| | | "u.`name` userName,\n" + |
| | | "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" + |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | | "c.`comment`,\n" + |
| | | "c.`parent_id`,\n" + |
| | | "c.`is_author`,\n" + |
| | | "c.`is_topping`,\n" + |
| | | "COUNT( cu.id ) num,\n" + |
| | | "c.create_at,\n" + |
| | | "c.id \n" + |
| | | "FROM\n" + |
| | | "com_act_discuss_comment c\n" + |
| | | "JOIN sys_user u ON c.user_id = u.user_id\n" + |
| | | "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" + |
| | | "WHERE\n" + |
| | | "FIND_IN_SET(\n" + |
| | | "\tc.id,\n" + |
| | | "getChildren ( #{id} )) and c.parent_id !=0 \n" + |
| | | "GROUP BY c.id\n" + |
| | | "ORDER BY\n" + |
| | | "create_at desc") |
| | | List<ComActDiscussCommentVO> selectChilds(Long id); |
| | | // @Select("" + |
| | | // "SELECT\n" + |
| | | // "u.`name` userName,\n" + |
| | | // "IFNULL(u.`nick_name`,'社区管理员') as userNickName,\n" + |
| | | // "u.`image_url`,\n" + |
| | | // "u.phone,\n" + |
| | | // "c.`comment`,\n" + |
| | | // "c.`parent_id`,\n" + |
| | | // "c.`is_author`,\n" + |
| | | // "c.`is_topping`,\n" + |
| | | // "COUNT( cu.id ) num,\n" + |
| | | // "c.create_at,\n" + |
| | | // "c.id \n" + |
| | | // "FROM\n" + |
| | | // "com_act_discuss_comment c\n" + |
| | | // "JOIN sys_user u ON c.user_id = u.user_id\n" + |
| | | // "LEFT JOIN com_act_discuss_comment_user cu on c.id=cu.disscuss_comment_id\n" + |
| | | // "WHERE\n" + |
| | | // "FIND_IN_SET(\n" + |
| | | // "\tc.id,\n" + |
| | | // "getChildren ( #{id} )) and c.parent_id !=0 \n" + |
| | | // "GROUP BY c.id\n" + |
| | | // "ORDER BY\n" + |
| | | // "create_at desc") |
| | | |
| | | /** |
| | | * 获取子评论 |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | List<ComActDiscussCommentVO> selectChilds(@Param("parentId") Long parentId); |
| | | |
| | | /** |
| | | * 该评论下所有回复内容 |
| | | * @param page 分页参数 |
| | | * @param id 评论id |
| | | * @return 回复列表 |
| | | */ |
| | | IPage<ComActDiscussCommentVO> getDiscussCommentList(Page page, @Param("id") Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @Select("select type,name,phone,image_url,nick_name from sys_user where user_id=#{userId}") |
| | | LoginUserInfoVO selectUserByUserId(Long userId); |
| | | |
| | | @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.`discuss_subject`, " + "d.type, " |
| | | + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at " |
| | | + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | + "</script>") |
| | | // @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.`discuss_subject`, " + "d.type, " |
| | | // + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at " |
| | | // + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | // + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | // + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | // + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | // + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | // + "</script>") |
| | | IPage<ComActDiscussVO> pageDiscuss(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | IPage<ComActDiscussVO> pageDiscussAdmin(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "u.nick_name userNickName, " |
| | | + "u.phone, " + "c.`comment`, " + "c.`parent_id`, " + "COUNT(DISTINCT cu.id ) num, " + "c.create_at, " |
| | |
| | | IPage<ComActDiscussCommentVO> pageDiscussComment(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.vote_title, " |
| | | + "if(d.address is null or d.address='null',a.name,d.address )address, " + "d.photo_pah, " |
| | | + "d.`discuss_subject`, " + "d.type, " + "u.type as userType, " + "COUNT( DISTINCT c.id ) commentNum, " |
| | | + "COUNT( DISTINCT du.id ) signNum, " + "if(u.type=1,u.name,a.name) userName, " |
| | | + "if(u.type=1,u.nick_name,a.name) userNickName, " + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | + "if(du.id is not null,1,0) haveSign, " + "if(ou.id is not null,1,0) haveVote, " + " </if> " + "u.image_url, " |
| | | + "d.create_at " + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | + "JOIN com_act a ON d.community_id = a.community_id " |
| | | + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | + "LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id " |
| | | + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " |
| | | + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " |
| | | + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.userId != null and pageComActDiscussDTO.userId !=0 '>" |
| | | + " and d.`user_id` = #{pageComActDiscussDTO.userId} " + " </if> " |
| | | + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | + "AND #{pageComActDiscussDTO.end} " + " </if> " + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | + "</script>") |
| | | /** |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentAdmin(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 默认查询评论下两条回复信息 |
| | | * @param commentId 评论id |
| | | * @return 回复列表 |
| | | */ |
| | | List<ComActDiscussCommentVO> getDiscussCommentReplyList(@Param("commentId") Long commentId); |
| | | |
| | | |
| | | // @Select("<script> " + "select t.* from (" + "SELECT " + "d.id, " + "d.vote_title, " |
| | | // + "if(d.address is null or d.address='null',a.name,d.address )address, " + "d.photo_pah, " |
| | | // + "d.`discuss_subject`, " + "d.type, " + "d.end_time, " + "d.status, " + "d.views_num, " + "d.join_num, " |
| | | // + "d.fabulous_num as signNum, " + "d.comment_num as commentNum, " + "d.release_at, " + "u.type as userType, " |
| | | // + "if(u.type=1,u.name,a.name) userName, " |
| | | // + "if(u.type=1,u.nick_name,a.name) userNickName, " + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | // + "if(du.id is not null,1,0) haveSign, " + "if(ou.id is not null,1,0) haveVote, " + " </if> " + "u.image_url, " |
| | | // + "d.create_at " + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | // + "JOIN com_act a ON d.community_id = a.community_id " |
| | | // + "LEFT JOIN com_act_discuss_option do ON d.id = do.discuss_id " |
| | | // + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " |
| | | // + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | // + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " |
| | | // + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" + " and d.is_del = 2" |
| | | // + "<if test='pageComActDiscussDTO.type != null '>" |
| | | // + " and d.`type` = #{pageComActDiscussDTO.type} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | // + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.userId != null and pageComActDiscussDTO.userId !=0 '>" |
| | | // + " and d.`user_id` = #{pageComActDiscussDTO.userId} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | | // + "AND #{pageComActDiscussDTO.end} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 1'>" |
| | | // + " and d.`end_time` > now() " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.displayStatus != null and pageComActDiscussDTO.displayStatus == 2'>" |
| | | // + " and d.`end_time` < now() " + " </if> " |
| | | // + "GROUP BY " + "d.id" + ")t order by t.create_at desc " |
| | | // + "</script>") |
| | | IPage<ComActDiscussVO> pageDiscussApplets(Page page, |
| | | @Param("pageComActDiscussDTO") PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "IFNULL(u.`nick_name`,'社区管理员') as userNickName, " |
| | | + "u.`image_url`, " + "u.phone, " + "u.type as userType, " + "c.`comment`, " + "c.`parent_id`, " |
| | | + "c.`is_author`, " + "c.`is_topping`, " + "COUNT( cu.id ) num, " + "c.create_at, " + "c.id " + "FROM " |
| | | + "com_act_discuss_comment c " + "JOIN sys_user u ON c.user_id = u.user_id " |
| | | + "JOIN com_act_discuss d ON c.discuss_id = d.id " |
| | | + "<if test='pageComActDiscussCommentDTO.name != null and pageComActDiscussCommentDTO.name.trim() != ""'>" |
| | | + "AND u.`name` LIKE concat( #{pageComActDiscussCommentDTO.name}, '%' ) " + " </if> " |
| | | + "<if test='pageComActDiscussCommentDTO.account != null and pageComActDiscussCommentDTO.account.trim() != ""'>" |
| | | + "AND u.phone LIKE concat( #{pageComActDiscussCommentDTO.account}, '%' ) " + " </if> " |
| | | + "LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id " |
| | | + " where c.discuss_id=#{pageComActDiscussCommentDTO.id} and parent_id=0 " |
| | | + "<if test='pageComActDiscussCommentDTO.comment != null and pageComActDiscussCommentDTO.comment.trim() != ""'>" |
| | | + " and c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.comment" + "}, '%' ) " + " </if> " |
| | | + "GROUP BY " + "c.id " + ")t order by t.is_topping desc , t.create_at desc" + "</script>") |
| | | // @Select("<script> " + "select * from (" + "SELECT " + "u.`name` userName, " + "IFNULL(u.`nick_name`,'社区管理员') as userNickName, " |
| | | // + "u.`image_url`, " + "u.phone, " + "u.type as userType, " + "c.`comment`, " + "c.`parent_id`, " |
| | | // + "c.`is_author`, " + "c.`is_topping`, " + "COUNT( cu.id ) num, " + "c.create_at, " + "c.id " + "FROM " |
| | | // + "com_act_discuss_comment c " + "JOIN sys_user u ON c.user_id = u.user_id " |
| | | // + "JOIN com_act_discuss d ON c.discuss_id = d.id " |
| | | // + "<if test='pageComActDiscussCommentDTO.name != null and pageComActDiscussCommentDTO.name.trim() != ""'>" |
| | | // + "AND u.`name` LIKE concat( #{pageComActDiscussCommentDTO.name}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussCommentDTO.account != null and pageComActDiscussCommentDTO.account.trim() != ""'>" |
| | | // + "AND u.phone LIKE concat( #{pageComActDiscussCommentDTO.account}, '%' ) " + " </if> " |
| | | // + "LEFT JOIN com_act_discuss_comment_user cu ON c.id = cu.disscuss_comment_id " |
| | | // + " where c.discuss_id=#{pageComActDiscussCommentDTO.id} and parent_id=0 and c.is_del = 2" |
| | | // + "<if test='pageComActDiscussCommentDTO.comment != null and pageComActDiscussCommentDTO.comment.trim() != ""'>" |
| | | // + " and c.`comment` LIKE concat( '%', #{pageComActDiscussCommentDTO.comment" + "}, '%' ) " + " </if> " |
| | | // + "GROUP BY " + "c.id " + ")t order by t.is_topping desc , t.create_at desc" + "</script>") |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentApplets(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | |
| | | + ",( SELECT count( id ) FROM com_act_discuss_option_user WHERE discuss_option_id = c.id ) AS num " + " FROM " |
| | | + " com_act_discuss_option AS c " + " WHERE c.discuss_id = #{discussId}" + " ORDER BY " + " num DESC") |
| | | List<ComActDiscussOptionVO> getScreenDiscussOptionList(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 添加议事投票评论数 |
| | | * @param discussId 议事投票 |
| | | * @param num 添加数量 |
| | | */ |
| | | void addCommentCount(@Param("discussId") Long discussId,@Param("num") Integer num); |
| | | |
| | | /** |
| | | * 更新一起议主题状态 |
| | | * @param discussId |
| | | * @param status |
| | | */ |
| | | void updateStatusById(@Param("discussId") Long discussId, @Param("status") int status); |
| | | |
| | | /** |
| | | * 增加评论总数和参与讨论总数 |
| | | * @param discussId 一起议主键id |
| | | * @param isFirstComment 是否首次参与 |
| | | */ |
| | | void incrCommentAndJoinNumById(@Param("discussId") Long discussId, @Param("isFirstComment") boolean isFirstComment); |
| | | |
| | | /** |
| | | * 一起议点赞/取消点赞 增加/减少点赞总数 |
| | | * @param discussId 一起议主键id |
| | | * @param isIncr 是否是新增 |
| | | */ |
| | | void incrOrDecrFabulousNumByType(@Param("discussId") Long discussId, @Param("isIncr") Boolean isIncr); |
| | | |
| | | /** |
| | | * 批量更新浏览量 |
| | | * @param needDealMap id-viewNum参数合集 |
| | | * @return |
| | | */ |
| | | int batchUpdateViewNum(@Param("needDealMap") HashMap<Long, Integer> needDealMap); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | List<ComActDiscussOptionVO> getDiscussOptionList(@Param("discussId") Long discussId); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @Select("select count(id) from com_act_discuss_option_user where discuss_option_id = #{discussOptionId} and user_id = #{userId}") |
| | | int selectHaveVotes(@Param("discussOptionId") Long discussOptionId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询用户当天当前投票栏目下已投次数 |
| | | * @param discussId 一起议主键id |
| | | * @param userId 用户id |
| | | * @return 总数 |
| | | */ |
| | | int selectVotedVotesInToday(@Param("discussId") Long discussId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询当前投票主题下的记录 最多6条用于展示 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | List<ComActDiscussOptionUserVO> selectVotedRecords(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 查询当前投票主题参与人数 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | int selectVotedPersonNum(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 批量插入投票记录 |
| | | * @param comActDiscussOptionUserDOList |
| | | * @return |
| | | */ |
| | | int batchInsert(@Param("comActDiscussOptionUserDOList") List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList); |
| | | } |
| | |
| | | "p.id, " + |
| | | "p.sponsor_id, " + |
| | | "p.feedback_at, " + |
| | | "p.is_publicity, " + |
| | | "p.examine_at, " + |
| | | "p.create_at, " + |
| | | "u.`name` sponsorName, " + |
| | |
| | | "u.`image_url`, " + |
| | | "u.phone, " + |
| | | "p.detail, " + |
| | | "p.lng_lat, " + |
| | | "p.is_need_feed_back, " + |
| | | "p.examine_at, " + |
| | | "p.status, " + |
| | |
| | | "count(DISTINCT c.id)commentNum, " + |
| | | "u.image_url, " + |
| | | "p.happen_addr, " + |
| | | "p.addr_remark, " + |
| | | "su.`name` handler_name, " + |
| | | "p.`status`, " + |
| | | "p.`is_hide`, " + |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Mapper |
| | | public interface ComActMicroWishDAO extends BaseMapper<ComActMicroWishDO> { |
| | | |
| | | @Select("<script> " + "SELECT " + "w.id, " + "u.name sponsor_name, " + "u.nick_name userNickName, " |
| | | + "u.image_url , " + "w.sponsor_phone, " + "w.wish_name, " + "w.`status`, " + "w.`feedback_at`, " |
| | | + "w.`examine_at`, " + "w.`distribution_at`, " + "w.`evaluate_at`, " + "w.`photo_path_list`, " |
| | | + "count(wu.id)star_num, " + "w.`detail`, " + "w.form, " + "w.reject_reason, " + "su.`name` responsible_name, " |
| | | + "w.score, " + "w.create_at " + "FROM " + "com_act_micro_wish w " |
| | | + "left join com_act_micro_wish_user wu on w.id=wu.micro_wish_id " |
| | | + "JOIN sys_user u ON w.sponsor_id = u.user_id " |
| | | + "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" |
| | | + "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') " + " </if> " |
| | | + "<if test='comActMicroWishVO.responsibleName == null or comActMicroWishVO.responsibleName.trim() == ""'>" |
| | | + "LEFT JOIN com_pb_service_team su ON w.responsible_id = su.id " + " </if> " |
| | | + "<if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName.trim() != ""'>" |
| | | + " JOIN com_pb_service_team su ON w.responsible_id = su.id " |
| | | + "AND su.`name` like concat(#{comActMicroWishVO.responsibleName},'%') " + " </if> " + " <where>" |
| | | + "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" |
| | | + " and w.community_id=#{comActMicroWishVO.communityId} " + " </if> " |
| | | + "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" |
| | | + "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%') " + " </if> " |
| | | + "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.status!=3 and comActMicroWishVO.isPageMyWish==null'>" |
| | | + "AND w.`status` = #{comActMicroWishVO.status} " + " </if> " |
| | | + "<if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isPageMyWish==null'>" + "AND w.`status` = 3 " |
| | | + " </if> " |
| | | + "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" |
| | | + "AND w.`status` =1 " + " </if> " |
| | | + "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status==3 and comActMicroWishVO.isPageMyWish!=null '>" |
| | | + "AND w.`status` in (2, 3) " + " </if> " + "<if test='comActMicroWishVO.createBegin != null '>" |
| | | + "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} " + "AND #{comActMicroWishVO.createEnd}" |
| | | + " </if> " + "<if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'>" |
| | | + "AND w.status in (3, 5, 6) " + " </if> " |
| | | + "<if test='comActMicroWishVO.userId != null and comActMicroWishVO.userId != 0'>" |
| | | + "AND w.sponsor_id =#{comActMicroWishVO.userId} " + " </if> " |
| | | + "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==3 '>" |
| | | + "AND w.responsible_id =#{comActMicroWishVO.backUserId} " + " </if> " |
| | | + "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==0 '>" |
| | | + "and (w.status in(1,2,4,5,6) or (w.status=3 and w.responsible_id =#{comActMicroWishVO.backUserId})) " |
| | | + " </if> " + " </where>" + " group by w.id " + "ORDER BY w.create_at desc " + "</script>") |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | "w.id, " + |
| | | "u.name sponsor_name, " + |
| | | "u.nick_name userNickName, " + |
| | | "u.image_url , " + |
| | | "w.sponsor_phone, " + |
| | | "w.wish_name, " + |
| | | "w.`status`, " + |
| | | "w.`feedback_at`, " + |
| | | "w.`examine_at`, " + |
| | | "w.`distribution_at`, " + |
| | | "w.`evaluate_at`, " + |
| | | "w.`photo_path_list`, " + |
| | | "count(wu.id)star_num, " + |
| | | "w.`detail`, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "su1.`name` responsible_name, " + |
| | | "w.score, " + |
| | | "w.img_width, " + |
| | | "w.finish_at, " + |
| | | "w.aim_num, " + |
| | | "w.img_height, " + |
| | | "w.create_at " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "left join com_act_micro_wish_user wu on w.id=wu.micro_wish_id "+ |
| | | "left JOIN sys_user u ON w.sponsor_id = u.user_id " + |
| | | "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != ""'>" + |
| | | "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%') " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.responsibleName == null or comActMicroWishVO.responsibleName.trim() == ""'>" + |
| | | "LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName.trim() != ""'>" + |
| | | " JOIN sys_user su1 ON w.responsible_id = su1.user_id " + |
| | | "AND su1.`name` like concat(#{comActMicroWishVO.responsibleName},'%') " + |
| | | " </if> " + |
| | | " <where>" + |
| | | "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" + |
| | | " and w.community_id=#{comActMicroWishVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" + |
| | | "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%') " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.status!=3 and comActMicroWishVO.isPageMyWish==null'>" + |
| | | "AND w.`status` = #{comActMicroWishVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isPageMyWish==null'>" + |
| | | "AND w.`status` in (2,3) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status!=0 and comActMicroWishVO.isPageMyWish!=null and comActMicroWishVO.status==1'>" + |
| | | "AND w.`status` =1 " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status != null and comActMicroWishVO.status==3 and comActMicroWishVO.isPageMyWish!=null '>" + |
| | | "AND w.`status` in (2, 3) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.createBegin != null '>" + |
| | | "AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} " + |
| | | "AND #{comActMicroWishVO.createEnd}" + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0 and comActMicroWishVO.status != null and comActMicroWishVO.status != 7'>" + |
| | | "AND w.status in (3, 5, 6) " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.userId != null and comActMicroWishVO.userId != 0'>" + |
| | | "AND w.sponsor_id =#{comActMicroWishVO.userId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==3 '>" + |
| | | "AND w.responsible_id =#{comActMicroWishVO.backUserId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and comActMicroWishVO.status==0 '>" + |
| | | "and (w.status in(1,2,4,5,6) or (w.status=3 and w.responsible_id =#{comActMicroWishVO.backUserId})) " + |
| | | " </if> " + |
| | | " </where>" + |
| | | " group by w.id "+ |
| | | "ORDER BY w.create_at desc "+ |
| | | "</script>") |
| | | IPage<ComActMicroWishVO> pageMicroWish(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | @Select("SELECT " + "w.id, " + "u.name sponsor_name, " + "u.nick_name userNickName, " + "w.create_at, " |
| | | + "u.image_url, " + "w.sponsor_phone, " + "w.`status`, " + "w.`sponsor_id`, " + "w.wish_name, " |
| | | + "count(wu.id)starNum, " + "w.detail, " + "w.photo_path_list, " + "su.`name` responsible_name, " + "w.form, " |
| | | + "w.reject_reason, " + "w.examine_at, " + "w.finish, " + "w.finish_photo_path_list, " + "w.finish_at, " |
| | | + "w.score, " + "w.feedback, " + "w.feedback_at, " + "w.feedback_photo_path_list, " + "w.distribution_at, " |
| | | + "w.evaluate_at, " + "w.evaluate " + "FROM " + "com_act_micro_wish w " |
| | | + "JOIN sys_user u ON w.sponsor_id = u.user_id " |
| | | + "LEFT JOIN com_pb_service_team su ON w.responsible_id = su.id " |
| | | + "LEFT JOIN com_act_micro_wish_user wu ON w.id = wu.micro_wish_id " + "WHERE " + "w.id =#{id}" |
| | | + " group by w.id " + "order by w.create_at desc") |
| | | IPage<ComActMicroWishVO> pageMicroWishApplets(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | @Select("SELECT " + |
| | | "w.id, " + |
| | | "u.name sponsor_name, " + |
| | | "u.nick_name userNickName, " + |
| | | "w.create_at, " + |
| | | "w.aim_num, " + |
| | | "u.image_url, " + |
| | | "w.sponsor_phone, " + |
| | | "w.`status`, " + |
| | | "w.`sponsor_id`, " + |
| | | "w.wish_name, " + |
| | | "count(wu.id)starNum, " + |
| | | "w.detail, " + |
| | | "w.photo_path_list, " + |
| | | "su.`name` responsible_name, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "w.community_id, " + |
| | | "w.examine_at, " + |
| | | "w.finish, " + |
| | | "w.finish_photo_path_list, " + |
| | | "w.finish_at, " + |
| | | "w.score, " + |
| | | "w.feedback, " + |
| | | "w.feedback_at, " + |
| | | "w.feedback_photo_path_list, " + |
| | | "w.distribution_at, " + |
| | | "w.evaluate_at, " + |
| | | "w.img_width, " + |
| | | "w.img_height, " + |
| | | "w.evaluate " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "LEFT JOIN sys_user u ON w.sponsor_id = u.user_id " + |
| | | "LEFT JOIN com_pb_service_team su ON w.responsible_id = su.id " + |
| | | "LEFT JOIN com_act_micro_wish_user wu ON w.id = wu.micro_wish_id " + |
| | | "WHERE " + |
| | | "w.id =#{id}"+ |
| | | " group by w.id " + |
| | | "order by w.create_at desc" |
| | | ) |
| | | ComActMicroWishVO detailMicroWish(Long id); |
| | | |
| | | @Select("SELECT " + "'2' type " + "FROM " + "com_act_micro_wish w " + "WHERE " |
| | | + "w.community_id = #{communityId} " + "AND w.`status` = 1 " + " " + "union all " + " " + "SELECT " |
| | | + "'2' type " + "FROM " + " com_act_micro_wish w " + "WHERE " + " w.community_id = #{communityId} " |
| | | + " AND w.`status` = 3 " + " AND w.form = 1 " + " AND w.responsible_id = #{userId} " + "GROUP BY " |
| | | + " w.community_id ") |
| | | @Select("SELECT " + |
| | | "'2' type " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "WHERE " + |
| | | "w.community_id = #{communityId} " + |
| | | "AND w.`status` = 1 " + |
| | | " " + |
| | | "union all " + |
| | | " " + |
| | | "SELECT " + |
| | | "'2' type " + |
| | | "FROM " + |
| | | " com_act_micro_wish w " + |
| | | "WHERE " + |
| | | " w.community_id = #{communityId} " + |
| | | " AND w.`status` = 3 " + |
| | | " AND w.form = 1 " + |
| | | " AND w.responsible_id = #{userId} " + |
| | | "GROUP BY " + |
| | | " w.community_id ") |
| | | List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId); |
| | | |
| | | @Update("update com_act_micro_wish set `status`=6, evaluate_at=now() where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72") |
| | | @Update("update com_act_micro_wish set `status`=6, evaluate_at=now() where `status`=5 and TIMESTAMPDIFF(HOUR, finish_at, SYSDATE())>=72") |
| | | int updateStatusAutoConfirm(); |
| | | |
| | | @Select("SELECT COUNT(id) AS completedNum," |
| | | + "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5)) AS willNum ," |
| | | + "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " |
| | | + "FROM com_act_micro_wish WHERE community_id = #{communityId} AND status = 6 ") |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate); |
| | | @Select("select id from com_act_micro_wish where `status`=5 and TIMESTAMPDIFF(HOUR, feedback_at, SYSDATE())>=72 ") |
| | | List<Long> getWishAutoConfirmIds(); |
| | | |
| | | @Select("SELECT COUNT(id) AS completedNum," + |
| | | "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5)) AS willNum ," + |
| | | "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " + |
| | | "FROM com_act_micro_wish WHERE community_id = #{communityId} AND status = 6 ") |
| | | Map<String, Long> countByCommunityId(@Param("communityId") Long communityId,@Param("nowDate") String nowDate); |
| | | |
| | | @Select("SELECT photo_path_list FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) ORDER BY create_at DESC limit #{pageSize}") |
| | | List<String> getAllImgs(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize); |
| | | List<String> getAllImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize); |
| | | |
| | | @Select("<script> " + "SELECT " + " camw.id, " + " su.`name` AS userName, " + " camw.sponsor_id, " |
| | | + " su.image_url, " + " su.phone, " + " camw.`status`, " + " camw.create_at, " + " camw.wish_name, " |
| | | + " camw.finish, " + " camw.finish_photo_path_list, " + " camw.form, " + " camw.evaluate_at, " |
| | | + " su1.name as responsibleName, " + " camw.score, " + " camw.distribution_at, " + " camw.detail, " |
| | | + " camw.photo_path_list " + "FROM " + " com_act_micro_wish AS camw " |
| | | + " LEFT JOIN sys_user AS su ON su.user_id = camw.sponsor_id " |
| | | + " LEFT JOIN com_pb_service_team AS su1 ON su1.id = camw.responsible_id " + " <where> " |
| | | + "<if test='microListDTO.status != null'>" + "AND camw.`status` =#{microListDTO.status} " + " </if> " |
| | | + "<if test='microListDTO.communityId != null'>" + "AND camw.community_id =#{microListDTO.communityId} " |
| | | + " </if> " + "<if test='microListDTO.startTime!=null and microListDTO.startTime != ""'>" |
| | | + " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{microListDTO.startTime} " + " </if> " |
| | | + "<if test='microListDTO.endTime!=null and microListDTO.endTime != ""'>" |
| | | + " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{microListDTO.endTime} " + " </if> " |
| | | + " </where>" + "ORDER BY camw.create_at desc " + " </script>") |
| | | @Select("<script> " + |
| | | "SELECT " + |
| | | " camw.id, " + |
| | | " su.`name` AS userName, " + |
| | | " camw.sponsor_id, " + |
| | | " su.image_url, " + |
| | | " su.phone, " + |
| | | " camw.`status`, " + |
| | | " camw.create_at, " + |
| | | " camw.wish_name, " + |
| | | " camw.finish, " + |
| | | " camw.finish_photo_path_list, " + |
| | | " camw.form, " + |
| | | " camw.evaluate_at, " + |
| | | " su1.name as responsibleName, " + |
| | | " camw.score, " + |
| | | " camw.distribution_at, " + |
| | | " camw.detail, " + |
| | | " camw.photo_path_list " + |
| | | "FROM " + |
| | | " com_act_micro_wish AS camw " + |
| | | " LEFT JOIN sys_user AS su ON su.user_id = camw.sponsor_id " + |
| | | " LEFT JOIN com_pb_service_team AS su1 ON su1.id = camw.responsible_id " + |
| | | " <where> " + |
| | | "<if test='microListDTO.status != null'>" + |
| | | "AND camw.`status` =#{microListDTO.status} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.communityId != null'>" + |
| | | "AND camw.community_id =#{microListDTO.communityId} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.startTime!=null and microListDTO.startTime != ""'>" + |
| | | " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{microListDTO.startTime} " + |
| | | " </if> " + |
| | | "<if test='microListDTO.endTime!=null and microListDTO.endTime != ""'>" + |
| | | " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{microListDTO.endTime} " + |
| | | " </if> " + |
| | | " </where>" + |
| | | "ORDER BY camw.create_at desc "+ |
| | | " </script>") |
| | | IPage<MicroListVO> getScreenMicroList(Page page, @Param("microListDTO") ScreenMicroListDTO microListDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishFeedbackVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishFeedbackDO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-26 14:26:50 |
| | | * @describe mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActMicroWishFeedbackMapper extends BaseMapper<ComActMicroWishFeedbackDO> { |
| | | /** |
| | | * 根据心愿Id查询反馈列表 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<ComActMicroWishFeedbackVO> selectByWishId(Long id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishOperationRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-27 10:28:04 |
| | | * @describe mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComActMicroWishOperationRecordMapper extends BaseMapper<ComActMicroWishOperationRecordDO> { |
| | | /** |
| | | * 根据心愿Id查询操作记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<ComActMicroWishOperationRecordVO> getByWishId(Long id); |
| | | |
| | | /** |
| | | * 查询下一个Id数组 |
| | | * @param comActMicroWishVO |
| | | * @return |
| | | */ |
| | | List<Long> selectId(ComActMicroWishVO comActMicroWishVO); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishUserDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | * @create: 2020-12-10 16:19 |
| | | **/ |
| | | @Mapper |
| | | public interface ComActMicroWishUserDAO extends BaseMapper<ComActMicroWishUserDO> {} |
| | | public interface ComActMicroWishUserDAO extends BaseMapper<ComActMicroWishUserDO> { |
| | | List<Long> select(Integer id); |
| | | } |
| | |
| | | @Mapper |
| | | public interface ComActNeighborCircleDAO extends BaseMapper<ComActNeighborCircleDO> { |
| | | |
| | | @Select("<script> " + "SELECT " + "canc.id," + "canc.release_content," + "canc.release_images," |
| | | + "canc.comment_num," + "canc.fabulous_num," + "canc.forward_num," + "canc.views_num," + "canc.is_boutique," |
| | | + "canc.create_at," + "canc.reply_at," + "canc.last_comment_num," + "canc.last_fabulous_num," |
| | | + "canc.last_views_num," + "canc.type," + "canc.topic_id," + "su.nick_name as name," + "su.community_id," |
| | | + "canct.name as topicName," + "su.image_url as headUrl " + " FROM " + " com_act_neighbor_circle AS canc" |
| | | + " left join sys_user as su on su.user_id = canc.release_id " |
| | | + " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " |
| | | + " where canc.status = 2 and canc.community_id = #{neighborCircleAppDTO.communityId} " |
| | | + "<if test='neighborCircleAppDTO.topicId != null '>" + " and canc.topic_id = #{neighborCircleAppDTO.topicId} " |
| | | + " </if> " + "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 1'>" |
| | | + " order by (canc.last_views_num + canc.last_comment_num + canc.last_fabulous_num) desc " + " </if> " |
| | | + "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 2'>" |
| | | + " order by canc.create_at desc " + " </if> " |
| | | + "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 3'>" |
| | | + " order by (canc.views_num + canc.comment_num + canc.fabulous_num) desc " + " </if> " + " </script>") |
| | | IPage<ComActNeighborCircleAppVO> pageNeighborByApp(Page page, |
| | | @Param("neighborCircleAppDTO") ComActNeighborCircleAppDTO neighborCircleAppDTO); |
| | | |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | | * @param neighborCircleAppDTO 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | IPage<ComActNeighborCircleAppVO> pageNeighborByApp(Page page, @Param("neighborCircleAppDTO") ComActNeighborCircleAppDTO neighborCircleAppDTO); |
| | | |
| | | @Select("<script> " + "select canc.id,su.nick_name as name,su.image_url as headUrl,canc.release_content " |
| | | + ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canct.name as topicName " |
| | | + ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canct.name as topicName,canc.refuse_reason " |
| | | + ",canc.is_boutique,canc.create_at,canc.reply_at,su.community_id,canc.type from com_act_neighbor_circle as canc " |
| | | + " left join sys_user as su on su.user_id = canc.release_id " |
| | | + " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id where canc.id = #{circleId}" |
| | | + " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id where canc.id = #{circleId} and canc.is_del = 2" |
| | | + " </script>") |
| | | ComActNeighborCircleDetailAppVO neighborDetailByApp(@Param("circleId") Long circleId); |
| | | |
| | | @Select("<script> \n" + "SELECT\n" + "nc.*,\n" |
| | | + "u.`nick_name` AS releaseName,u.image_url,canct.`name` as topicName ,u.`type` as userType\n" |
| | | + ",u.name as communityName\n" + "FROM\n" + "com_act_neighbor_circle nc\n" |
| | | + "LEFT JOIN sys_user u ON nc.release_id = u.user_id \n" |
| | | + "LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id \n" + "<where>" |
| | | + "nc.community_id = #{neighborCircleAdminDTO.communityId} \n" |
| | | + "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != ""'>" |
| | | + "and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%') \n" + " </if> " |
| | | + "<if test='neighborCircleAdminDTO.topicName != null and neighborCircleAdminDTO.topicName != ""'>" |
| | | + "and canct.`name` = #{neighborCircleAdminDTO.topicName} " + " </if> " |
| | | + "<if test='neighborCircleAdminDTO.startAt != null and neighborCircleAdminDTO.endAt !=null '>" |
| | | + "and nc.create_at between #{neighborCircleAdminDTO.startAt} and #{neighborCircleAdminDTO.endAt} \n" |
| | | + " </if> " + "<if test='neighborCircleAdminDTO.status != null '>" |
| | | + "and nc.status = #{neighborCircleAdminDTO.status} \n" + " </if> " + "</where>" + "order by " |
| | | + "case when nc.`status`=1 then 0 else 1 end, \n" + "nc.`status` asc,nc.create_at desc " + "</script>") |
| | | IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page, |
| | | @Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | |
| | | @Select("select * from sys_user where user_id=#{userId}") |
| | | AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId); |
| | |
| | | + ",canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canc.refuse_reason,su.nick_name as name,su.image_url as headUrl " |
| | | + " from com_act_neighbor_circle as canc " + " left join sys_user as su on su.user_id = canc.release_id " |
| | | + " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " |
| | | + " where canc.release_id = #{userId} and canc.status != 3 order by create_at desc" + " </script>") |
| | | + " where canc.release_id = #{userId} and canc.is_del = 2 and canc.status != 3 order by create_at desc" + " </script>") |
| | | IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page, @Param("userId") Long userId); |
| | | |
| | | @Select("select reply.id,reply.comment_id,reply.reply_content,reply.fabulous_num,reply.create_at" |
| | |
| | | List<PieElementVO> countAllNoneCompletedWorkByCommunityId(@Param("communityId") Long communityId); |
| | | |
| | | @Select(" SELECT AVG(b.t)AS avgTime " |
| | | + " FROM (SELECT TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t FROM com_act_easy_photo WHERE community_id = #{communityId} and STATUS = 4 " |
| | | + " UNION ALL SELECT TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t FROM com_act_micro_wish WHERE community_id = #{communityId} and STATUS = 6 " |
| | | + " )AS b ") |
| | | Map<String, Object> countAvgByCommunityId(@Param("communityId") Long communityId); |
| | | + " FROM (SELECT TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t FROM com_act_easy_photo WHERE community_id = #{communityId} and STATUS = 4 " |
| | | + " UNION ALL SELECT TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t FROM com_act_micro_wish WHERE community_id = #{communityId} and STATUS = 6 " |
| | | + " )AS b ") |
| | | Map<String, Object> countAvgByCommunityId(@Param("communityId")Long communityId); |
| | | |
| | | void addHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum); |
| | | |
| | | void addTopicHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum); |
| | | } |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId); |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name); |
| | | |
| | | /** |
| | | * 添加邻里圈话题热度 |
| | | * @param circleTopicId 邻里圈话题id |
| | | * @param hotNum 热度值 |
| | | */ |
| | | void addHotNum(@Param("circleTopicId") Long circleTopicId,@Param("hotNum") Long hotNum); |
| | | |
| | | /** |
| | | * 添加邻里圈话题邻里圈数量 |
| | | * @param circleTopicId 邻里圈话题id |
| | | */ |
| | | void addCount(@Param("circleTopicId") Long circleTopicId); |
| | | } |
| | |
| | | * @param questId |
| | | * 问卷ID |
| | | */ |
| | | @Select("<script> " + "SELECT ac.* \n" |
| | | + "FROM com_act_questnaire_answer_content ac left JOIN com_act_questnaire_sub qs ON ac.sub_id = qs.id \n" |
| | | + " LEFT JOIN com_act_questnaire qn ON qs.que_Id = qn.id \n" + "WHERE qn.id=#{questId}\n" |
| | | + "ORDER BY ac.user_id, qs.id " + "</script>") |
| | | List<ComActQuestnaireAnswerContentDO> selectListByQuestnaire(@Param("questId") Long questId); |
| | | List<ComActQuestnaireAnswerContentVO> selectListByQuestnaire(@Param("questId") Long questId); |
| | | |
| | | /** |
| | | * 查询问卷用户回答数据 |
| | |
| | | + " left join com_act_questnaire_user_answer as caqua on caqua.questnaire_id = caq.id and caqua.user_id = #{pageQuestnaireDTO.userId} " |
| | | + "WHERE " + " caq.state IN ( 2, 3 ) " |
| | | + " AND caq.community_id = #{pageQuestnaireDTO.communityId} and caq.is_hide = 0 " + "ORDER BY " |
| | | + " caq.state ASC, " + " isAnswer desc, " + " caq.create_at DESC" + "</script>") |
| | | + " caq.state ASC, " + " isAnswer ASC, " + " caq.create_at DESC" + "</script>") |
| | | IPage<QuestnaireListVo> selectPageList(Page page, @Param("pageQuestnaireDTO") PageQuestnaireDTO pageQuestnaireDTO); |
| | | |
| | | @Select("<script>" |
| | |
| | | */ |
| | | void addReserveCountById(@Param("reserveId") Long reserveId); |
| | | |
| | | /** |
| | | * 小程序查询所有进行中的预约登记 |
| | | * @param communityId 社区id |
| | | * @return 社区所有进行中的预约登记列表 |
| | | */ |
| | | List<ComActReserveIndexVo> getReserveIndexList(@Param("communityId") Long communityId); |
| | | |
| | | } |
| | |
| | | */ |
| | | @Mapper |
| | | public interface ComActReserveRecordMapper extends BaseMapper<ComActReserveRecordDO> { |
| | | IPage<ComActReserveRecordDO> pageReserveList(Page page, @Param("pageUserReserveDTO") PageUserReserveDTO pageUserReserveDTO); |
| | | IPage<ComActReserveAppletsVO> pageReserveList(Page page, @Param("pageUserReserveDTO") PageUserReserveDTO pageUserReserveDTO); |
| | | |
| | | /** |
| | | * 社区后台-根据预约id查询预约明细 |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyDAO 社区》办事指南》分类管理mapper类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区》办事指南》分类管理mapper类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/31 14:21 |
| | | */ |
| | | @Mapper |
| | | public interface ComActWorkGuideClassifyDAO extends BaseMapper<ComActWorkGuideClassifyDO> { |
| | | IPage<ComActWorkGuideClassifyVO> pageWorkGuideClassify(Page page, |
| | | @Param("comActWorkGuideClassifyVO") ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 查询办事指南分类列表 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | List<ComActWorkGuideAppletsVO> listWorkGuideClassify(); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description: 办事指南 |
| | | **/ |
| | | @Mapper |
| | | public interface ComActWorkGuideDAO extends BaseMapper<ComActWorkGuideDO> { |
| | | @Select("<script> " + "select id ,title,content,time_at,address,phone,create_at from com_act_work_guide " |
| | | @Select("<script> " + "select id ,title,content,classify,time_at,address,phone,create_at from com_act_work_guide " |
| | | + " <where>" |
| | | + "<if test='pageActWorkGuideDTO.classify != null'>" |
| | | + "and classify = #{pageActWorkGuideDTO.classify} " + " </if> " |
| | | + "<if test='pageActWorkGuideDTO.title != null and pageActWorkGuideDTO.title.trim() != ""'>" |
| | | + "title like concat('%',#{pageActWorkGuideDTO.title},'%')" + " </if> " + " </where>" + "order by update_at asc" |
| | | + "and title like concat('%',#{pageActWorkGuideDTO.title},'%')" + " </if> " + " </where>" + "order by update_at desc" |
| | | + "</script>") |
| | | IPage<ComActWorkGuideVO> pageWorkGuide(Page page, |
| | | @Param("pageActWorkGuideDTO") PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南 |
| | | * @param classifyId 办事指南分类id |
| | | * @param pageSize 默认展示条数 |
| | | * @return 办事指南列表 |
| | | */ |
| | | List<ComActWorkGuideDetailAppletsVO> getWorkGuideListByClassifyId(@Param("classifyId") Long classifyId,@Param("pageSize") Long pageSize); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesDAO 社区政务》高龄老人认证》高龄老人表mapper类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》高龄老人表mapper类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | @Mapper |
| | | public interface ComElderAuthElderliesDAO extends BaseMapper<ComElderAuthElderliesDO> { |
| | | |
| | | int haveElderAuthElderliesAmount(@Param("communityId") Long communityId, @Param("authPeriod") String authPeriod); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsDAO 社区政务》高龄老人认证》认证记录表mapper类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》认证记录表mapper类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | @Mapper |
| | | public interface ComElderAuthRecordsDAO extends BaseMapper<ComElderAuthRecordsDO> { |
| | | |
| | | IPage<ComElderAuthRecordVO> pageElderAuthRecords(Page page, |
| | | @Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | ComElderAuthRecordVO detailElderAuthRecords(@Param("authRecordId") Long authRecordId); |
| | | |
| | | List<ComElderAuthRecordExcleVO> getElderAuthRecordsByIds(@Param("ids") List<Long> ids); |
| | | |
| | | void updateAll(@Param("comElderAuthRecordsDOS") List<ComElderAuthRecordsDO> comElderAuthRecordsDOS); |
| | | |
| | | List<ComElderAuthRecordStatisticExcleVO> exportElderAuthRecordsStatistic(@Param("pageElderAuthRecordsDTO") PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询高龄认证记录 |
| | | * @param page 分页参数 |
| | | * @param pageIdentityAuthRecordDTO |
| | | * @return |
| | | */ |
| | | IPage<IdentityAuthRecordDetailVO> queryRecordWithPage(@Param("page") Page page, @Param("pageIdentityAuthRecordDTO") PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取身份认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return ComElderAuthRecordVO |
| | | */ |
| | | IdentityAuthRecordDetailVO findById(@Param("identityAuthId") Long identityAuthId); |
| | | /** |
| | | * 查询社区待审核高龄认证记录id集合 |
| | | * @param communityId 社区id |
| | | * @param authRecordId 需要排除的详情id |
| | | * @return 待审核高龄认证记录id集合 |
| | | */ |
| | | List<Long> getNextIds(@Param("communityId") Long communityId,@Param("authRecordId") Long authRecordId); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | IPage<ComEldersAuthHistoryRecordVO> findByPage(Page page, |
| | | @Param("pageComEldersAuthHistoryRecordDTO") PageComEldersAuthHistoryRecordDTO pageComEldersAuthHistoryRecordDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | IPage<ComEldersAuthStatisticVO> pageAuthStatisticAdmin(Page page, |
| | | @Param("pageElderAuthStatisticDTO") PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | ComEldersAuthStatisticHeaderVO getAuthHeaderStatisticAdmin(@Param("statisticHeaderDTO") ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | int countCurrentMonthValidAuthRecord(@Param("elderId") Long elderId); |
| | | |
| | | void updateAuthStatus(); |
| | | } |
| | |
| | | IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); |
| | | |
| | | @Select("<script> " |
| | | + "select id,tag_name,community_id,create_at,sys_flag from com_mng_user_tag where community_id = #{comMngUserTagDTO.communityId}" |
| | | + "select id,tag_name,community_id,create_at,sys_flag from com_mng_user_tag <where> " |
| | | + "<if test='comMngUserTagDTO.tagName != null and comMngUserTagDTO.tagName != ""'>" |
| | | + " AND tag_name LIKE concat(#{comMngUserTagDTO.tagName},'%') " + " </if> " + " order by create_at desc " |
| | | + " AND tag_name LIKE concat(#{comMngUserTagDTO.tagName},'%') " + " </if> " + "</where>" + " order by create_at desc " |
| | | + "</script>") |
| | | IPage<ComMngTagVO> specialInputUserTags(Page page, @Param("comMngUserTagDTO") PageInputUserDTO comMngUserTagDTO); |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticHeaderVO; |
| | | import com.panzhihua.common.model.vos.elders.ComPensionAuthStatisticVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表mapper类 |
| | | */ |
| | | @Mapper |
| | | public interface ComPensionAuthHistoryRecordMapper extends BaseMapper<ComPensionAuthHistoryRecordDO> { |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | IPage<ComPensionAuthStatisticVO> pageAuthStatisticAdmin(Page page, |
| | | @Param("pensionAuthStatisticDTO") PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | ComEldersAuthStatisticHeaderVO getAuthHeaderStatisticAdmin(@Param("statisticHeaderDTO") ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthPensionerDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老金人口表mapper |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:06 |
| | | */ |
| | | @Mapper |
| | | public interface ComPensionAuthPensionerDAO extends BaseMapper<ComPensionAuthPensionerDO> { |
| | | |
| | | int havePensionAuthPensionerAmount(@Param("communityId") Long communityId, @Param("authPeriod") String authPeriod); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录表mapper |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:28 |
| | | */ |
| | | @Mapper |
| | | public interface ComPensionAuthRecordDAO extends BaseMapper<ComPensionAuthRecordDO> { |
| | | IPage<ComPensionAuthRecordVO> pagePensionAuthRecords(Page page, |
| | | @Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | ComPensionAuthRecordVO detailPensionAuthRecords(@Param("authRecordId") Long authRecordId); |
| | | |
| | | List<ComPensionAuthRecordExcleVO> getPensionAuthRecordsByIds(@Param("ids") List<Long> ids); |
| | | |
| | | void updateAll(@Param("comPensionAuthRecordDOS") List<ComPensionAuthRecordDO> comPensionAuthRecordDOS); |
| | | |
| | | List<ComPensionAuthRecordStatisticExcleVO> exportPensionAuthRecordsStatistic(@Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询养老认证记录 |
| | | * @param page 分页参数 |
| | | * @param pageIdentityAuthRecordDTO |
| | | * @return |
| | | */ |
| | | IPage<IdentityAuthRecordDetailVO> queryRecordWithPage(@Param("page") Page page, @Param("pageIdentityAuthRecordDTO") PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取养老认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return ComPensionAuthRecordVO |
| | | */ |
| | | IdentityAuthRecordDetailVO findById(@Param("identityAuthId") Long identityAuthId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthStatisticsDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证统计表mapper |
| | | * @author: txb |
| | | * @date: 2021/09/07 17:28 |
| | | */ |
| | | @Mapper |
| | | public interface ComPensionAuthStatisticsDAO extends BaseMapper<ComPensionAuthStatisticsDO> { |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthRecordForCommunityVO; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | |
| | |
| | | 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.AUTH_USER_NAME , ea.ID_CARD, ea.BIRTH_DAY, ea.FAMILY_USER_ID,ea.type, " |
| | | + " ea.DOMICILE, ea.SUMIT_USER_ID, u.phone as submitUserAccount , ea.VIDEO_URL , ea.FAMILY_USER_ID, " |
| | | + " 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}" |
| | |
| | | + " left join com_elders_auth e on t.id = e.id " + " LEFT JOIN sys_user u ON e.SUMIT_USER_ID = u.user_id " |
| | | + "<where>" + " <if test='pageEldersAuthRecordDTO.name!=null'>\n" |
| | | + " AND e.AUTH_USER_NAME like concat('%', #{pageEldersAuthRecordDTO.name}, '%')" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.idCard!=null'>\n" |
| | | + " AND e.ID_CARD like concat('%', #{pageEldersAuthRecordDTO.idCard}, '%')\n" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=""'>\n" |
| | | + " AND e.ID_CARD = #{pageEldersAuthRecordDTO.idCard}\n" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.type!=null'>\n" + " AND e.type = #{pageEldersAuthRecordDTO.type}\n" |
| | | + "</if>" + " <if test='pageEldersAuthRecordDTO.month!=null'>\n" |
| | | + " AND month(e.CREATE_AT) = #{pageEldersAuthRecordDTO.month}\n" + "</if>\n" + "</where>\n" |
| | |
| | | IPage<ComEldersAuthRecordForCommunityVO> selectCommunityEldersRecordByPage(Page page, |
| | | @Param("pageEldersAuthRecordDTO") PageEldersAuthRecordDTO pageEldersAuthRecordDTO); |
| | | |
| | | /** |
| | | * 根据社区id查询当前社区有多少人未认证和认证 |
| | | * @param communityId 社区id |
| | | * @return 前社区有多少人未认证和认证 |
| | | */ |
| | | Map<String,Object> getEldersAuthStatistics(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询社区上月所有视频认证记录 |
| | | * @param communityId 社区id |
| | | * @return 上月所有视频认证记录 |
| | | */ |
| | | List<ComEldersAuthHistoryVO> getEldersAuthRecords(@Param("communityId") Long communityId); |
| | | |
| | | } |
| | |
| | | */ |
| | | IPage<SysConfVO> findByPage(Page page, @Param("pageSysConfDTO") PageSysConfDTO pageSysConfDTO); |
| | | |
| | | String getSysConfValue(@Param("key")String key,@Param("communityId") Long communityId); |
| | | |
| | | } |
| | |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 类型(1.党建 2.节日 3.天气预报 4.疫情 5.灾害预警 6.志愿者) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 用户id, 和用户信息表的相关id关联 |
| | | */ |
| | | private Long userId; |
| | |
| | | */ |
| | | private String pictureName; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActActPictureDO{" + |
| | | "id=" + id + |
| | | ", activityId=" + activityId + |
| | | ", userId=" + userId + |
| | | ", createAt=" + createAt + |
| | | ", uploadPicture=" + uploadPicture + |
| | | ", pictureName=" + pictureName + |
| | | "}"; |
| | | } |
| | | /** |
| | | * 是否系统预置(1.是 0.否) |
| | | */ |
| | | private Integer sysFlag; |
| | | |
| | | } |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | private Date publishAt; |
| | | |
| | | /** |
| | | * 互动结束时间 |
| | | * 活动结束时间 |
| | | */ |
| | | private Date endAt; |
| | | |
| | |
| | | * 用户主键 |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 回复量 |
| | | */ |
| | | private Integer replyNum; |
| | | |
| | | /** |
| | | * 是否删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 是否删除枚举(1.是 2.否) |
| | | */ |
| | | public interface isDelete{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:48 |
| | | **/ |
| | |
| | | private String discussSubject; |
| | | |
| | | /** |
| | | * 类型 1 图文 2 投票 |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | private Integer type; |
| | | |
| | |
| | | */ |
| | | private String voteTitle; |
| | | |
| | | /** |
| | | * 是否可重复投票(1.是 2.否) |
| | | */ |
| | | private Integer isRepeat; |
| | | |
| | | /** |
| | | * 每人票数 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 单张图片宽度 |
| | | */ |
| | | private BigDecimal imgWidth; |
| | | |
| | | /** |
| | | * 单张图片高度 |
| | | */ |
| | | private BigDecimal imgHeight; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 评论数 |
| | | */ |
| | | private Integer commentNum; |
| | | |
| | | /** |
| | | * 点赞数 |
| | | */ |
| | | private Integer fabulousNum; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewsNum; |
| | | |
| | | /** |
| | | * 参与人数 |
| | | */ |
| | | private Integer joinNum; |
| | | |
| | | /** |
| | | * 状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布) |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | /** |
| | | * 公布结果 |
| | | */ |
| | | private String publishResult; |
| | | |
| | | /** |
| | | * 公布时间 |
| | | */ |
| | | private Date publishAt; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date releaseAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 公布人id |
| | | */ |
| | | private Long publishBy; |
| | | |
| | | /** |
| | | * 类型 1 议事 2 投票 |
| | | */ |
| | | public interface type{ |
| | | int ys = 1; |
| | | int tp = 2; |
| | | } |
| | | |
| | | /** |
| | | * 是否枚举(1.是 2.否) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | /** |
| | | * 状态(1.未开始 2.进行中 3.待公布 4.已公布 5.已发布) |
| | | */ |
| | | public interface status{ |
| | | int wks = 1; |
| | | int jxz = 2; |
| | | int dgb = 3; |
| | | int ygb = 4; |
| | | int yfb = 5; |
| | | } |
| | | |
| | | } |
| | |
| | | * 投票时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 一起议id |
| | | */ |
| | | private Long discussId; |
| | | } |
| | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value = "remark", updateStrategy = FieldStrategy.IGNORED) |
| | | private String remark; |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | private String wishName; |
| | | |
| | | /** |
| | | * 状态 状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成 |
| | | * 状态 |
| | | * 状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 形式 1分配人员 2发起活动 |
| | | * 形式 1分配人员 2发起活动 |
| | | */ |
| | | private Integer form; |
| | | |
| | |
| | | * 反馈图片集合,逗号分隔 |
| | | */ |
| | | private String feedbackPhotoPathList; |
| | | /** |
| | | * 目标集心数 |
| | | */ |
| | | private Integer aimNum; |
| | | |
| | | /** |
| | | * 单张图片宽度 |
| | | */ |
| | | private BigDecimal imgWidth; |
| | | |
| | | /** |
| | | * 单张图片高度 |
| | | */ |
| | | private BigDecimal imgHeight; |
| | | |
| | | /** |
| | | * 状态 1待审核 2待分配 3进行中 4已驳回 5待确认6 已完成 7集心中 |
| | | */ |
| | | public interface status{ |
| | | int dsh=1; |
| | | int dfp=2; |
| | | int jxz=3; |
| | | int ybh=4; |
| | | int dqr=5; |
| | | int ywc=6; |
| | | int jx=7; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-26 14:26:50 |
| | | * @describe 实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_micro_wish_feedback") |
| | | public class ComActMicroWishFeedbackDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 微心愿Id |
| | | */ |
| | | private Long microId; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 反馈内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 反馈图片 |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | /** |
| | | * 反馈时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActMicroWishFeedbackDO{" + |
| | | "id=" + id + |
| | | ", microId=" + microId + |
| | | ", userId=" + userId + |
| | | ", content=" + content + |
| | | ", imgUrl=" + imgUrl + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-27 10:28:04 |
| | | * @describe 实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_micro_wish_operation_record") |
| | | public class ComActMicroWishOperationRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 操作内容 |
| | | */ |
| | | private String content; |
| | | |
| | | /** |
| | | * 人员id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 心愿Id |
| | | */ |
| | | private Long wishId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 7反馈 8系统自动确认 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 反馈图片url |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActMicroWishOperationRecordDO{" + |
| | | "id=" + id + |
| | | ", content='" + content + '\'' + |
| | | ", userId=" + userId + |
| | | ", wishId=" + wishId + |
| | | ", createTime=" + createTime + |
| | | ", type=" + type + |
| | | '}'; |
| | | } |
| | | /** |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 7反馈 8系统自动确认 |
| | | */ |
| | | public interface type{ |
| | | int ytj=1; |
| | | int sh=2; |
| | | int bh=3; |
| | | int jx=4; |
| | | int fp=5; |
| | | int wc=6; |
| | | int fk=7; |
| | | int zd=8; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 热度 |
| | | */ |
| | | private Long hotNum; |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | private Integer isDel; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActNeighborCircleDO{" + "id=" + id + ", releaseId=" + releaseId + ", releasePhone=" + releasePhone |
| | |
| | | int mini = 1; |
| | | int admin = 2; |
| | | } |
| | | |
| | | /** |
| | | * 是否已删除(1.是 2.否) |
| | | */ |
| | | public interface isDel{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 热度 |
| | | */ |
| | | private Long hotNum; |
| | | |
| | | /** |
| | | * 邻里圈数量 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 状态(1.启用 2.禁用) |
| | | */ |
| | | public interface status{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActNeighborCircleTopicDO{" + "id=" + id + ", name=" + name + ", status=" + status + ", createAt=" |
| | |
| | | * 题目选项id |
| | | */ |
| | | private Long selectionId; |
| | | /** |
| | | * 答题记录id |
| | | */ |
| | | private Long answerId; |
| | | } |
| | |
| | | /** |
| | | * 类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 |
| | | */ |
| | | private int type; |
| | | private Integer type; |
| | | /** |
| | | * 题目内容 |
| | | */ |
| | |
| | | */ |
| | | @TableField("`key`") |
| | | private String key; |
| | | |
| | | /** |
| | | * 类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 11图片上传 |
| | | */ |
| | | public interface type { |
| | | int danxuan = 0; |
| | | int duoxuan = 1; |
| | | int wenda = 2; |
| | | int phone = 3; |
| | | int card = 4; |
| | | int describe = 5; |
| | | int date = 6; |
| | | int time = 7; |
| | | int input = 8; |
| | | int name = 9; |
| | | int imgselect = 10; |
| | | int imgopload = 11; |
| | | } |
| | | } |
| | |
| | | @TableField("`key`") |
| | | private String key; |
| | | |
| | | /** |
| | | * 组件文件上传保存路径 |
| | | */ |
| | | private String url; |
| | | |
| | | } |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 处理人id |
| | | */ |
| | | private Long handleId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveRecordDO{" + |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 组件文件上传保存路径 |
| | | */ |
| | | private String url; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActReserveSubSelectionDO{" + |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyDO 社区》办事指南》分类管理实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区》办事指南》分类管理实体类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/31 14:21 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_act_work_guide_classify") |
| | | public class ComActWorkGuideClassifyDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 自增id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | private String classifyName; |
| | | |
| | | /** |
| | | * 图标地址 |
| | | */ |
| | | private String pictureUrl; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 系统预置:1-是 0-否 |
| | | */ |
| | | private Integer sysFlag; |
| | | } |
| | |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 办事指南分类 |
| | | */ |
| | | private Integer classify; |
| | | /** |
| | | * 办理时间 |
| | | */ |
| | | private String timeAt; |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesDO 社区政务》高龄老人认证》高龄老人表实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》高龄老人表实体类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_elder_auth_elderlies") |
| | | @EncryptDecryptClass |
| | | public class ComElderAuthElderliesDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 人口id |
| | | */ |
| | | private Long populationId; |
| | | |
| | | /** |
| | | * 街道id |
| | | */ |
| | | private Long streetId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | private Integer personnelCategory; |
| | | |
| | | /** |
| | | * 是否高龄老人登记(1.是 0.否) |
| | | */ |
| | | private Integer isRegister; |
| | | |
| | | /** |
| | | * 是否健在(1.是 0.否) |
| | | */ |
| | | private Integer isAlive; |
| | | |
| | | /** |
| | | * 居住地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 高龄津贴开始领取日期 |
| | | */ |
| | | private Date receiveAllowanceBegin; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 创建用户 |
| | | */ |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | public interface personnelCategory { |
| | | int under90 = 1; |
| | | int under100 = 2; |
| | | int above100 = 3; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsDO 社区政务》高龄老人认证》认证记录表实体类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》认证记录表实体类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_elder_auth_records") |
| | | public class ComElderAuthRecordsDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 高龄人口id |
| | | */ |
| | | private Long elderliesId; |
| | | |
| | | /** |
| | | * 认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | |
| | | /** |
| | | * 现居地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 审核人员 |
| | | */ |
| | | private Long approverId; |
| | | |
| | | /** |
| | | * 审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | private Integer approvalStatus; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | private String mark; |
| | | |
| | | /** |
| | | * 驳回原因 |
| | | */ |
| | | private String rejectReason; |
| | | |
| | | /** |
| | | * 认证状态(1.已认证 0.未认证) |
| | | */ |
| | | private Integer authStatus; |
| | | |
| | | /** |
| | | * 认证时间 |
| | | */ |
| | | private Date authDate; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | public interface approvalStatus{ |
| | | int dsh = 1; |
| | | int bh = 2; |
| | | int tg = 3; |
| | | } |
| | | |
| | | /** |
| | | * 认证状态(1.已认证 0.未认证) |
| | | */ |
| | | public interface authStatus{ |
| | | int yrz = 1; |
| | | int wrz = 0; |
| | | } |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | public interface authMethod{ |
| | | int sprz = 1; |
| | | int rlrz = 2; |
| | | int xxrz = 3; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComElderAuthRecordsDO{" + |
| | | "id=" + id + |
| | | ", elderliesId=" + elderliesId + |
| | | ", authPeriod=" + authPeriod + |
| | | ", submitUserId=" + submitUserId + |
| | | ", authVideo=" + authVideo + |
| | | ", address=" + address + |
| | | ", approverId=" + approverId + |
| | | ", approvalStatus=" + approvalStatus + |
| | | ", approvalDate=" + approvalDate + |
| | | ", mark=" + mark + |
| | | ", rejectReason=" + rejectReason + |
| | | ", authStatus=" + authStatus + |
| | | ", authDate=" + authDate + |
| | | ", createAt=" + createAt + |
| | | ", updateAt=" + updateAt + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 是否健在(1.是 2.否) 列: is_exist |
| | | */ |
| | | public interface isExist{ |
| | | int yes=1; |
| | | int no=2; |
| | | } |
| | | /** |
| | | * 是否办理高龄津贴(1.是 2.否) 列: is_exist |
| | | */ |
| | | public interface isBigAge{ |
| | | int yes=1; |
| | | int no=2; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 高龄人口id |
| | | */ |
| | | private Long elderliesId; |
| | | |
| | | /** |
| | | * 认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | private String mark; |
| | | |
| | | /** |
| | | * 是否健在 |
| | | */ |
| | | private Integer isAlive; |
| | | |
| | | /** |
| | | * 人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | private Integer personnelCategory; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 认证时间 |
| | | */ |
| | | private Date authDate; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | |
| | | /** |
| | | * 审核id |
| | | */ |
| | | private Long approverId; |
| | | |
| | | /** |
| | | * 本月是否已认证(1.是 2.否) |
| | | */ |
| | | public interface isAuth{ |
| | | int yes = 1; |
| | | int no = 2; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表实体类 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_pension_auth_history_record") |
| | | public class ComPensionAuthHistoryRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 老人用户id |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 出生年月 |
| | | */ |
| | | private String brithday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 户籍地 |
| | | */ |
| | | private String domicile; |
| | | |
| | | /** |
| | | * 本月是否已认证(1.是 2.否) |
| | | */ |
| | | private Integer isAuth; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 养老人口id |
| | | */ |
| | | private Long elderliesId; |
| | | |
| | | /** |
| | | * 认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | private String mark; |
| | | |
| | | /** |
| | | * 是否健在(1.是 0.否) |
| | | */ |
| | | private Integer isAlive; |
| | | |
| | | /** |
| | | * 性别(1.男 2.女 3.其他) |
| | | */ |
| | | private Integer sex; |
| | | |
| | | /** |
| | | * 认证成功记录id |
| | | */ |
| | | private Long authId; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String phone; |
| | | |
| | | /** |
| | | * 认证时间 |
| | | */ |
| | | private Date authDate; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | |
| | | /** |
| | | * 审核人员id |
| | | */ |
| | | private Long approverId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComPensionAuthHistoryRecordDO{" + |
| | | "id=" + id + |
| | | ", userId=" + userId + |
| | | ", name=" + name + |
| | | ", idCard=" + idCard + |
| | | ", brithday=" + brithday + |
| | | ", age=" + age + |
| | | ", domicile=" + domicile + |
| | | ", isAuth=" + isAuth + |
| | | ", createAt=" + createAt + |
| | | ", communityId=" + communityId + |
| | | ", elderliesId=" + elderliesId + |
| | | ", authPeriod=" + authPeriod + |
| | | ", submitUserId=" + submitUserId + |
| | | ", authMethod=" + authMethod + |
| | | ", verificationResult=" + verificationResult + |
| | | ", mark=" + mark + |
| | | ", isAlive=" + isAlive + |
| | | ", sex=" + sex + |
| | | ", authId=" + authId + |
| | | ", phone=" + phone + |
| | | ", authDate=" + authDate + |
| | | ", approvalDate=" + approvalDate + |
| | | ", approverId=" + approverId + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthPensionerDO 养老金人员表实体类 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老金人员表实体类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:30 |
| | | */ |
| | | @Data |
| | | @TableName("com_pension_auth_pensioners") |
| | | @EncryptDecryptClass |
| | | public class ComPensionAuthPensionerDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 人口id |
| | | */ |
| | | private Long populationId; |
| | | /** |
| | | * 街道id |
| | | */ |
| | | private Long streetId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 身份证号 |
| | | */ |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | /** |
| | | * 性别 |
| | | */ |
| | | private String sex; |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | private Integer age; |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | private String birthday; |
| | | /** |
| | | * 人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上) |
| | | */ |
| | | private Integer personnelCategory; |
| | | /** |
| | | * 是否养老登记(1.是 0.否) |
| | | */ |
| | | private Integer isRegister; |
| | | /** |
| | | * 是否健在(1.是 0.否) |
| | | */ |
| | | private Integer isAlive; |
| | | /** |
| | | * 居住地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 养老金开始领取日期 |
| | | */ |
| | | private Date receiveAllowanceBegin; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createAt; |
| | | /** |
| | | * 创建用户 |
| | | */ |
| | | private Long createBy; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateAt; |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 是否枚举(1.是 0.否) |
| | | */ |
| | | public interface isOk{ |
| | | int yes = 1; |
| | | int no = 0; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComPensionAuthPensionerDO{" + |
| | | "id=" + id + |
| | | ", populationId=" + populationId + |
| | | ", streetId=" + streetId + |
| | | ", communityId=" + communityId + |
| | | ", phone='" + phone + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", idCard='" + idCard + '\'' + |
| | | ", sex='" + sex + '\'' + |
| | | ", age=" + age + |
| | | ", birthday='" + birthday + '\'' + |
| | | ", personnelCategory=" + personnelCategory + |
| | | ", isRegister=" + isRegister + |
| | | ", isAlive=" + isAlive + |
| | | ", address='" + address + '\'' + |
| | | ", remark='" + remark + '\'' + |
| | | ", receiveAllowanceBegin=" + receiveAllowanceBegin + |
| | | ", createAt=" + createAt + |
| | | ", createBy=" + createBy + |
| | | ", updateAt=" + updateAt + |
| | | ", updateBy=" + updateBy + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordDO 养老认证表实体类 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证表实体类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 16:31 |
| | | */ |
| | | @Data |
| | | @TableName("com_pension_auth_records") |
| | | public class ComPensionAuthRecordDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | *养老金用户id |
| | | */ |
| | | private Long pensionerId; |
| | | /** |
| | | *提交用户id |
| | | */ |
| | | private Long submitUserId; |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | *认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | |
| | | /** |
| | | * 人脸核验结果数据 |
| | | */ |
| | | private String verificationResult; |
| | | |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | /** |
| | | * 现居地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | *审核人员id |
| | | */ |
| | | private Long approverId; |
| | | /** |
| | | *审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | private Integer approvalStatus; |
| | | /** |
| | | *审核时间 |
| | | */ |
| | | private Date approvalDate; |
| | | /** |
| | | *标记 |
| | | */ |
| | | private String mark; |
| | | /** |
| | | *驳回原因 |
| | | */ |
| | | private String rejectReason; |
| | | /** |
| | | *认证状态(1.已认证 0.未认证) |
| | | */ |
| | | private Integer authStatus; |
| | | /** |
| | | *认证时间 |
| | | */ |
| | | private Date authDate; |
| | | /** |
| | | *社区id |
| | | */ |
| | | private Long communityId; |
| | | /** |
| | | *创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | /** |
| | | *更新时间 |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | *审核状态(1.待审核 2.驳回 3.通过) |
| | | */ |
| | | public interface approvalStatus{ |
| | | int dsh = 1; |
| | | int bh = 2; |
| | | int tg = 3; |
| | | } |
| | | |
| | | /** |
| | | *认证状态(1.已认证 0.未认证) |
| | | */ |
| | | public interface authStatus{ |
| | | int rez = 1; |
| | | int wrz = 0; |
| | | } |
| | | |
| | | /** |
| | | * 认证方式(1.视频认证 2.人脸认证 3.线下认证) |
| | | */ |
| | | public interface authMethod{ |
| | | int sprz = 1; |
| | | int rlrz = 2; |
| | | int xxrz = 3; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthStatisticsDO 社区政务》养老认证》认证统计表 |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 社区政务》养老认证》认证统计表 |
| | | * @author: txb |
| | | * @date: 2021/09/07 16:31 |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("com_pension_auth_statistics") |
| | | public class ComPensionAuthStatisticsDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 年份 |
| | | */ |
| | | private Integer year; |
| | | |
| | | /** |
| | | * 月份 |
| | | */ |
| | | private Integer month; |
| | | |
| | | /** |
| | | * 总人数 |
| | | */ |
| | | private Integer sum; |
| | | |
| | | /** |
| | | * 认证人数 |
| | | */ |
| | | private Integer authSum; |
| | | |
| | | /** |
| | | * 未认证人数 |
| | | */ |
| | | private Integer noAuthSum; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComPensionAuthStatisticsDO{" + |
| | | "id=" + id + |
| | | ", year=" + year + |
| | | ", month=" + month + |
| | | ", sum=" + sum + |
| | | ", authSum=" + authSum + |
| | | ", noAuthSum=" + noAuthSum + |
| | | ", createAt=" + createAt + |
| | | ", communityId=" + communityId + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | R getPictureList(Long userId); |
| | | |
| | | /** |
| | | * 获取系统预置图库 getSysPictureList |
| | | * @return R 系统图库集 |
| | | * @author txb |
| | | * @date 2021/8/27 13:33 |
| | | */ |
| | | R getSysPictureList(Integer type); |
| | | |
| | | /** |
| | | * 分页展示我的所有活动 时间倒序排列 |
| | | * |
| | | * @param comActActivityVO |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:50 |
| | | **/ |
| | | public interface ComActDiscussService { |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | |
| | | R addDiscuss(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 议事投票-编辑 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | R detailDiscuss(Long id); |
| | | R editDiscuss(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param discussDetailDTO |
| | | * 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | R detailDiscuss(ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R deleteDiscuss(Long id); |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | |
| | | R addDiscussComment(ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscuss(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * @param pageComActDiscussDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | R pageDiscussAdmin(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscusscomment(Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | R detailDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R putDiscussCommentTop(Long id); |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | |
| | | R addDiscussCommentBack(ComActDiscussCommentDTO comActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | |
| | | R pageDiscussComment(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | R pageDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | |
| | | R pageDiscussApplets(PageComActDiscussDTO pageComActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | |
| | | R putDiscussUser(ComActDiscussUserDTO comActDiscussUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | |
| | | R pageDiscussCommentApplets(PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | |
| | | R detailDiscussApplets(Long id, Long userId); |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | |
| | | R addDiscussOptionUser(ComActDiscussOptionUserDTO comActDiscussOptionUserDTO); |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 评论点赞 |
| | |
| | | R putDiscussCommentUser(ComActDiscussCommentUserDTO comActDiscussUserDTO); |
| | | |
| | | /** |
| | | * 工作大屏-一起议列表 |
| | | * 工作大屏-议事投票列表 |
| | | * |
| | | * @param discussListDTO |
| | | * 请求参数 |
| | | * @return 一起议列表 |
| | | * @return 议事投票列表 |
| | | */ |
| | | R getScreenDiscussList(ScreenDiscussListDTO discussListDTO); |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | R publishResultAdmin(ComActDiscussPublishResultDTO publishResultDTO); |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteDiscussCommentAdmin(Long id); |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | R discussCommentReplyAdmin(ComActDiscussDetailDTO discussDetailDTO); |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | R discussJurisdictionGet(Long communityId,Long userId); |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | R discussJurisdictionSet(Long communityId,String value); |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskDiscussInspectStatus(); |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId |
| | | */ |
| | | void increaseViewNum(Long discussId); |
| | | |
| | | /** |
| | | * 将redis中前一天浏览量写入表中 |
| | | * @return 执行结果 |
| | | */ |
| | | R writeDiscussViewNumToTable(); |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | R editDiscussResult(ComActDiscussDTO comActDiscussDTO); |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | R getDiscussPermissions(ComActDiscussDTO comActDiscussDTO); |
| | | } |
| | |
| | | R getUserReward(Long userId, Long communityId); |
| | | |
| | | /** |
| | | * 获取首页弹窗接口 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 首页弹窗接口 |
| | | */ |
| | | R getUserRewards(Long userId, Long communityId); |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * @param userId |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-27 10:28:04 |
| | | * @describe 服务类 |
| | | */ |
| | | public interface ComActMicroWishOperationRecordService extends IService<ComActMicroWishOperationRecordDO> { |
| | | /** |
| | | * 根据心愿id查询操作记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getByWishId(Long id); |
| | | |
| | | /** |
| | | * 添加微心愿操作记录 |
| | | * @param content 操作内容 |
| | | * @param userId 操作用户id |
| | | * @param wishId 微心愿id |
| | | * @param type 操作类型 |
| | | * @param remark 操作备注 |
| | | * @param imgUrl 反馈图片 |
| | | */ |
| | | void addOperationRecord(String content,Long userId,Long wishId,Integer type,String remark,String imgUrl); |
| | | } |
| | |
| | | */ |
| | | R pageMicroWish(ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | R pageMicroWishApplets(ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | /** |
| | | * 心愿详情 |
| | | * |
| | |
| | | */ |
| | | R neighborCommentReplyByApp(ComActNeighborCommentReplyAppDTO commentReplyAppDTO); |
| | | |
| | | /** |
| | | * 小程序-删除邻里圈 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteNeighborByApp(DeleteNeighborCircleAppDTO circleTopicAppDTO); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAppDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DeleteNeighborCircleAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO; |
| | | |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | R getNeighborTopicByApp(Long communityId); |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero,String name); |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addNeighborTopicByApp(AddNeighborCircleTopicAppDTO circleTopicAppDTO); |
| | | |
| | | } |
| | |
| | | */ |
| | | R getById(Long id,Long userId,Long recordId,Integer isBack); |
| | | |
| | | /** |
| | | * 小程序查询所有进行中的预约登记 |
| | | * @param communityId 社区id |
| | | * @return 社区所有进行中的预约登记列表 |
| | | */ |
| | | R reserveListApplets(Long communityId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyService 社区》办事指南》分类管理服务类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区》办事指南》分类管理服务类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/31 14:21 |
| | | */ |
| | | public interface ComActWorkGuideClassifyService extends IService<ComActWorkGuideClassifyDO> { |
| | | |
| | | /** |
| | | * 分页查询办事执念-分类管理 addWorkGuideClassify 分页查询办事执念-分类管理 |
| | | * @param comActWorkGuideClassifyVO 查询参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | R pageWorkGuideClassify(ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 办事执念-分类管理新增或修改 addWorkGuideClassify 办事执念-分类管理新增或修改 |
| | | * @param comActWorkGuideClassifyVO 新增或修改参数 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | R addWorkGuideClassify(ComActWorkGuideClassifyVO comActWorkGuideClassifyVO); |
| | | |
| | | /** |
| | | * 办事执念-分类管理删除 addWorkGuideClassify 办事执念-分类管理删除 |
| | | * @param workGuideClassifyId 办事执念-分类管理id |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | R deleteWorkGuideClassify(Long workGuideClassifyId); |
| | | |
| | | /** |
| | | * 办事指南-分类管理列表查询 getWorkGuideClassifyList 办事指南-分类管理列表查询 |
| | | * @return R 返回结果 |
| | | * @author txb |
| | | * @date 2021/8/31 15:03 |
| | | */ |
| | | R getWorkGuideClassifyList(); |
| | | |
| | | } |
| | |
| | | * @return 删除结果 |
| | | */ |
| | | R delectWorkGuide(Long workGuideId); |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | R listWorkGuide(PageActWorkGuideDTO pageActWorkGuideDTO); |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | R listWorkGuideByClassifyId(Long classifyId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesService 社区政务》高龄老人认证》高龄老人表服务类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》高龄老人表服务类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | public interface ComElderAuthElderliesService extends IService<ComElderAuthElderliesDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsService 社区政务》高龄老人认证》认证记录表服务类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》认证记录表服务类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | public interface ComElderAuthRecordsService extends IService<ComElderAuthRecordsDO> { |
| | | |
| | | |
| | | /** |
| | | * 分页查询高龄老人认证记录 pageElderAuthRecords 分页查询高龄老人认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R pageElderAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 根据高龄认证记录id查询详情 detailElderAuthRecords 根据高龄认证记录id查询详情 |
| | | * @param authRecordId 高龄认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R detailElderAuthRecords(Long authRecordId); |
| | | |
| | | /** |
| | | * 高龄认证审核 examineElderAuthRecords 高龄认证审核 |
| | | * @param comElderAuthRecordVO 高龄认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R examineElderAuthRecords(ComElderAuthRecordVO comElderAuthRecordVO); |
| | | |
| | | /** |
| | | * 高龄认证标记 examineElderAuthRecords 高龄认证标记 |
| | | * @param comElderAuthRecordVO 高龄认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R signElderAuthRecords(ComElderAuthRecordVO comElderAuthRecordVO); |
| | | |
| | | /** |
| | | * 根据高龄认证记录id批量查询 getElderAuthRecordsByIds 根据高龄认证记录id批量查询 |
| | | * @param ids 高龄认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R getElderAuthRecordsByIds(@RequestBody List<Long> ids); |
| | | |
| | | /** |
| | | * 批量导入高龄老人线下认证记录 listSaveElderAuthRecordExcelVO 批量导入高龄老人线下认证记录 |
| | | * @param list 高龄老人线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | R listSaveElderAuthRecordExcelVO(List<ComElderAuthRecordImportExcelVO> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 导出高龄认证记录 exportElderAuthRecordsStatistic 导出高龄认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R exportElderAuthRecordsStatistic(PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskElderAuthStatisticsJobHandler(); |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addElderAuth(AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询高龄认证记录 |
| | | * @param pageIdentityAuthRecordDTO 查询参数 |
| | | * @return 高龄认证记录列表 |
| | | */ |
| | | R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取高龄认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | R retrieveElderAuthDetail(Long identityAuthId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.user.ComMngTagVO; |
| | | import com.panzhihua.common.model.vos.user.UserElectronicFileVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 实有人口Service |
| | |
| | | * 实有人口id |
| | | * @return 实有人口详情 |
| | | */ |
| | | R detailPopulation(Long populationId); |
| | | R detailPopulation(Long populationId, Long communityId); |
| | | |
| | | /** |
| | | * 分页查询实有人口 |
| | |
| | | R listSaveLowSecurityPopulation(List<ComMngPopulationLowSecurityExcelVO> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 批量导入高龄老人 listSavePopulationElderExcelVO 批量导入高龄老人 |
| | | * @param list 高龄老人数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | R listSaveEdlerPopulation(List<ComMngPopulationElderExcelVO> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 批量导入养老金人员 listSavePopulationPensionExcelVO 批量导入养老金人员 |
| | | * @param list 养老金人员数据 |
| | | * @param communityId 社区id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/01 15:03 |
| | | */ |
| | | R listSavePensionPopulation(List<ComMngPopulationPensionExcelVO> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | | * |
| | | * @param list |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | |
| | | /** |
| | | * @author lyq |
| | | * @date 2021-09-18 15:07:12 |
| | | * @deprecated 养老认证历史记录表服务类 |
| | | */ |
| | | public interface ComPensionAuthHistoryRecordService extends IService<ComPensionAuthHistoryRecordDO> { |
| | | |
| | | /** |
| | | * 养老认证统计-分页查询 |
| | | * @param pensionAuthStatisticDTO 请求参数 |
| | | * @return 养老认证统列表 |
| | | */ |
| | | R pagePensionAuthStatisticAdmin(PagePensionAuthStatisticDTO pensionAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证记标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | R signPensionAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 养老认证表头统计 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计结果 |
| | | */ |
| | | R getPensionAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthPensionerService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老金人员服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:16 |
| | | */ |
| | | public interface ComPensionAuthPensionerService extends IService<ComPensionAuthPensionerDO> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录服务类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:33 |
| | | */ |
| | | public interface ComPensionAuthRecordService extends IService<ComPensionAuthRecordDO> { |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 14:03 |
| | | */ |
| | | R pagePensionAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 根据养老认证记录id查询详情 detailPensionAuthRecords 根据养老认证记录id查询详情 |
| | | * @param authRecordId 养老认证记录id |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | R detailPensionAuthRecords(Long authRecordId); |
| | | |
| | | /** |
| | | * 养老认证审核 examinePensionAuthRecords 养老认证审核 |
| | | * @param comPensionAuthRecordVO 养老认证审核参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/07 11:03 |
| | | */ |
| | | R examinePensionAuthRecords(ComPensionAuthRecordVO comPensionAuthRecordVO); |
| | | |
| | | /** |
| | | * 养老认证标记 signPensionAuthRecords 养老认证标记 |
| | | * @param comPensionAuthRecordVO 养老认证标记参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R signPensionAuthRecords(ComPensionAuthRecordVO comPensionAuthRecordVO); |
| | | |
| | | /** |
| | | * 根据养老认证记录id批量查询 getPensionAuthRecordsByIds 根据养老认证记录id批量查询 |
| | | * @param ids 养老认证记录id集合 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R getPensionAuthRecordsByIds(List<Long> ids); |
| | | |
| | | /** |
| | | * 批量导入养老线下认证记录 listSavePensionAuthRecordExcelVO 批量导入养老线下认证记录 |
| | | * @param list 养老线下认证记录数据 |
| | | * @param communityId 社区id |
| | | * @param userId 登录人id |
| | | * @return R 导入结果 |
| | | * @author txb |
| | | * @date 2021/9/08 10:03 |
| | | */ |
| | | R listSavePensionAuthRecordExcelVO(List<ComPensionAuthRecordImportExcelVO> list, Long communityId, Long userId); |
| | | |
| | | /** |
| | | * 导出养老认证记录 exportPensionAuthRecordsStatistic 导出养老认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R exportPensionAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | R setPensionAuthType(Long communityId, Integer type); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/10 16:03 |
| | | */ |
| | | R communityPensionAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 定时任务每年3月1号0点统计养老认证本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskPensionAuthStatisticsJobHandler(); |
| | | /** |
| | | * 新增养老认证 |
| | | * @param addIdentityAuthDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addPensionAuth(AddIdentityAuthDTO addIdentityAuthDTO); |
| | | |
| | | /** |
| | | * 分页查询养老认证记录 |
| | | * @param pageIdentityAuthRecordDTO 查询参数 |
| | | * @return 养老认证记录列表 |
| | | */ |
| | | R queryRecordWithPage(PageIdentityAuthRecordDTO pageIdentityAuthRecordDTO); |
| | | |
| | | /** |
| | | * 获取养老认证详情 |
| | | * @param identityAuthId 认证id |
| | | * @return 认证记录详情 |
| | | */ |
| | | R retrievePensionAuthDetail(Long identityAuthId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthStatisticsService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证统计服务类 |
| | | * @author: txb |
| | | * @date: 2021/09/07 17:33 |
| | | */ |
| | | public interface ComPensionAuthStatisticsService extends IService<ComPensionAuthStatisticsDO> { |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportHandleDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComSwDangerReportDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * @auther txb |
| | |
| | | R pageDangerReport(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO); |
| | | |
| | | /** |
| | | * 编辑隐患报告 editDangerReport 编辑隐患报告 |
| | | * @param comSwDangerReportEditDTO 编辑隐患报告参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | R editDangerReport(ComSwDangerReportEditDTO comSwDangerReportEditDTO); |
| | | |
| | | /** |
| | | * 根据隐患报告id查询详情 |
| | | * |
| | | * @param dangerReportId |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordAddDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComSwPatrolRecordDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * @auther txb |
| | |
| | | R addPatrolRecord(ComSwPatrolRecordAddDTO comSwPatrolRecordAddDTO); |
| | | |
| | | /** |
| | | * 编辑巡查记录 editPatrolRecord 编辑巡查记录 |
| | | * @param comSwPatrolRecordEditDTO 编辑巡查记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | R editPatrolRecord(ComSwPatrolRecordEditDTO comSwPatrolRecordEditDTO); |
| | | |
| | | /** |
| | | * 根据巡查记录id查询详情 |
| | | * |
| | | * @param patrolRecordId |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordPageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwSafetyWorkEditDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComSwSafetyWorkRecordDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * @auther txb |
| | |
| | | R pageSafetyWorkRecord(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO); |
| | | |
| | | /** |
| | | * 编辑安全工作记录 editSafetyWork 编辑安全工作记录 |
| | | * @param comSwSafetyWorkEditDTO 编辑安全工作记录参数 |
| | | * @return R 编辑结果 |
| | | * @author txb |
| | | * @date 2021/9/08 17:03 |
| | | */ |
| | | R editSafetyWork(ComSwSafetyWorkEditDTO comSwSafetyWorkEditDTO); |
| | | |
| | | /** |
| | | * 根据安全工作记录id查询详情 |
| | | * |
| | | * @param safetyWorkRecordId |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; |
| | | import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; |
| | |
| | | |
| | | R getAuthHistoryExport(PageEldersAuthHistoryDTO pageEldersAuthElderlyDTO); |
| | | |
| | | R timedTaskEldersAuthJobHandler(); |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskEldersRecordAuthJobHandler(); |
| | | |
| | | /** |
| | | * 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) setPensionAuthType 设置当前社区养老认证方式:核验类型(1.视频认证 2.人脸核验) |
| | | * @param communityId 社区id |
| | | * @param type 检验类型 |
| | | * @return R 设置结果 |
| | | */ |
| | | R setAuthType(Long communityId, Integer type); |
| | | |
| | | /** |
| | | * 查询养老认证社区认证方式 setPensionAuthType 查询养老认证社区认证方式 |
| | | * @param eldersAuthTypeQueryDTO 查询参数 |
| | | * @return R 查询结果 |
| | | */ |
| | | R getAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | R pageAuthStatisticAdmin(PageElderAuthStatisticDTO pageElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | R signAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO); |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | R getAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface SysConfService extends IService<SysConfDO> { |
| | | |
| | | /** |
| | | * 根据系统code以及社区id查询配置表value值 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value值 |
| | | */ |
| | | R getSysConfValue(String key, Long communityId); |
| | | |
| | | /** |
| | | * 新增系统code配置数据 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 新增结果 |
| | | */ |
| | | R addSysConfValue(String key, Long communityId, String name, String value); |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | R editSysConfValue(Long communityId, Integer status); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActSignDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | import com.panzhihua.service_community.service.ComActActEvaluateService; |
| | |
| | | private ComActActivityDAO comActActivityDAO; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Resource |
| | | private ComActActRegistDAO comActActRegistDAO; |
| | | /** |
| | | * 社区活动评价 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public R activityEvaluate(ComActActEvaluateVO comActActEvaluateVO) { |
| | | Long activityId = comActActEvaluateVO.getActivityId(); |
| | | Long userId = comActActEvaluateVO.getUserId(); |
| | | if (isNull(activityId)) { |
| | | return R.fail("参数有误"); |
| | | } |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(activityId); |
| | | if (isNull(comActActivityDO)) { |
| | | return R.fail("活动不存在"); |
| | | } |
| | | Date beginAt = comActActivityDO.getBeginAt(); |
| | | Date nowDate = new Date(); |
| | | Integer isQrCode = comActActivityDO.getIsQrCode(); |
| | | if (nonNull(isQrCode) && isQrCode.equals(1)) { |
| | | //需要签到类型 |
| | | int registCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, activityId)); |
| | | if (registCount <= 0) { |
| | | //未签到,不能评价 |
| | | return R.fail("未签到,不能评价"); |
| | | } |
| | | } else { |
| | | if (nowDate.before(beginAt)) { |
| | | return R.fail("活动还未开始,暂不支持评价"); |
| | | } |
| | | } |
| | | ComActActEvaluateDO currentUserEvaluateForThisActivity = this.baseMapper.selectOne(new QueryWrapper<ComActActEvaluateDO>() |
| | | .lambda().eq(ComActActEvaluateDO::getActivityId, activityId).eq(ComActActEvaluateDO::getUserId, userId)); |
| | | if (Objects.nonNull(currentUserEvaluateForThisActivity)) { |
| | | return R.fail("该用户已评论过了,请勿重复评论"); |
| | | } |
| | | ComActActEvaluateDO comActActEvaluateDO = new ComActActEvaluateDO(); |
| | | BeanUtils.copyProperties(comActActEvaluateVO, comActActEvaluateDO); |
| | | int result = this.baseMapper.insert(comActActEvaluateDO); |
| | | if (result < 0) { |
| | | return R.fail(); |
| | | return R.fail("评论失败,请重试"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | List<ComActActivityDO> comActActivityDOS = comActActivityDAO.selectList(new QueryWrapper<ComActActivityDO>().lambda() |
| | | .eq(ComActActivityDO::getStatus, 5) |
| | | .eq(ComActActivityDO::getIsDefaultPraise, 0) |
| | | .le(ComActActivityDO::getEndAt, DateUtils.addDays(new Date(), 7))); |
| | | .le(ComActActivityDO::getEndAt, DateUtils.addDays(new Date(), -7))); |
| | | //获取报名记录 |
| | | if (!ObjectUtils.isEmpty(comActActivityDOS)) { |
| | | List<Long> activityIds = comActActivityDOS.stream().map(ComActActivityDO::getId).collect(Collectors.toList()); |
| | |
| | | comActActEvaluateDO.setUserId(comActActSignDO.getUserId()); |
| | | comActActEvaluateDO.setCreateAt(new Date()); |
| | | comActActEvaluateDO.setStarLevel(5); |
| | | comActActEvaluateDO.setEvaluateContent("系统默认好评!"); |
| | | return comActActEvaluateDO; |
| | | }).collect(Collectors.toList()); |
| | | boolean result = this.saveBatch(comActActEvaluateDOList); |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.screen.ComActPopulationCultureVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActPictureDO; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.IndexDataVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ActivitySignVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActPictureVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityActivitiesVO; |
| | | import com.panzhihua.common.model.vos.community.CommunityGovernanceTrendsVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.ActActivityListVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComActActPictureDAO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActActivityDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActActEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActPictureDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActSignDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | |
| | | if (status.intValue() == 2) {// 点击‘保存并发布’ 按钮 |
| | | // 报名结束时间大于当前时间则设置为“进行中” |
| | | if (comActActivityVO.getSignUpEnd() != null && now.getTime() < comActActivityVO.getSignUpEnd().getTime()) { |
| | | comActActivityDO.setStatus(4); |
| | | comActActivityDO.setStatus(3); |
| | | } |
| | | } |
| | | |
| | |
| | | comActActPictureDO.setActivityId(activityId); |
| | | comActActPictureDO.setUserId(comActActivityVO.getUserId()); |
| | | comActActPictureDO.setUploadPicture(comActActivityVO.getCover()); |
| | | comActActPictureDO.setSysFlag(0); |
| | | comActActPictureDAO.insert(comActActPictureDO); |
| | | return R.ok(activityId); |
| | | } |
| | |
| | | // 结束时间大于当前时间则设置为“进行中” |
| | | Date now = new Date(); |
| | | if (comActActivityVO.getSignUpEnd() != null && now.getTime() < comActActivityVO.getSignUpEnd().getTime()) { |
| | | comActActivityDO.setStatus(4); |
| | | comActActivityDO.setStatus(3); |
| | | } |
| | | boolean b = this.updateById(comActActivityDO); |
| | | if (b) { |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActActivityVO> iPage = comActActivityDAO.pageActivity(page, comActActivityVO); |
| | | List<ComActActivityVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActActivityVO1 -> { |
| | | Integer status = comActActivityVO1.getStatus(); |
| | | if (status.intValue() == 3) { |
| | | comActActivityVO1.setStatus(4); |
| | | } |
| | | }); |
| | | } |
| | | // List<ComActActivityVO> records = iPage.getRecords(); |
| | | // if (!ObjectUtils.isEmpty(records)) { |
| | | // records.forEach(comActActivityVO1 -> { |
| | | // Integer status = comActActivityVO1.getStatus(); |
| | | // if (status.intValue() == 3) { |
| | | // comActActivityVO1.setStatus(4); |
| | | // } |
| | | // }); |
| | | // } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R releaseActivity(ComActActivityVO comActActivityVO) { |
| | | ComActActivityDO comActActivityDO = new ComActActivityDO(); |
| | | comActActivityDO.setId(comActActivityVO.getId()); |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(comActActivityVO.getId()); |
| | | comActActivityDO.setPublishAt(comActActivityVO.getPublishAt()); |
| | | comActActivityDO.setStatus(comActActivityVO.getStatus()); |
| | | comActActivityDO.setStatus(3); |
| | | if (comActActivityVO.getPublishAt().after(comActActivityDO.getSignUpEnd())) { |
| | | comActActivityVO.setStatus(4); |
| | | } |
| | | int update = comActActivityDAO.updateById(comActActivityDO); |
| | | if (update > 0) { |
| | | return R.ok(); |
| | |
| | | return R.ok(comActActPictureVOS); |
| | | } |
| | | |
| | | @Override |
| | | public R getSysPictureList(Integer type) { |
| | | List<ComActActPictureVO> comActActPictureVOS = new ArrayList<>(); |
| | | List<ComActActPictureDO> comActActPictureDOS = comActActPictureDAO.selectList(new QueryWrapper<ComActActPictureDO>().lambda(). |
| | | eq(ComActActPictureDO::getSysFlag, 1).eq(ComActActPictureDO :: getType, type)); |
| | | if (comActActPictureDOS != null && comActActPictureDOS.size() != 0) { |
| | | comActActPictureDOS.forEach(comActActPictureDO -> { |
| | | ComActActPictureVO comActActPictureVO = new ComActActPictureVO(); |
| | | BeanUtils.copyProperties(comActActPictureDO, comActActPictureVO); |
| | | comActActPictureVOS.add(comActActPictureVO); |
| | | }); |
| | | } |
| | | return R.ok(comActActPictureVOS); |
| | | } |
| | | |
| | | /** |
| | | * 分页展示我的所有活动 时间倒序排列 |
| | | * |
| | |
| | | Integer type = signactivityVO.getType(); |
| | | Long userId = signactivityVO.getUserId(); |
| | | Integer isVolunteer = signactivityVO.getIsVolunteer(); |
| | | |
| | | // 查询社区活动 |
| | | ComActActivityDO actActivityDO = this.baseMapper.selectById(activityId); |
| | | if (isNull(actActivityDO)) { |
| | | return R.fail("活动不存在"); |
| | | } |
| | | int num = 0; |
| | | if (1 == type) { |
| | | R<LoginUserInfoVO> userInfoR = userService.getUserInfoByUserId(String.valueOf(userId)); |
| | |
| | | return R.fail("只有志愿者才能报名"); |
| | | } |
| | | |
| | | // 查询社区活动 |
| | | ComActActivityDO actActivityDO = this.baseMapper.selectById(activityId); |
| | | if (actActivityDO != null) { |
| | | // 查询当前活动下参与志愿者/居民数量 |
| | | Integer count = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, isVolunteer)); |
| | | if (isVolunteer.equals(1) && actActivityDO.getVolunteerMax() <= count |
| | | && !actActivityDO.getVolunteerMax().equals(-1)) { |
| | | return R.fail("志愿者报名人数已满"); |
| | | } |
| | | // 查询当前活动下参与志愿者/居民数量 |
| | | Integer count = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>().lambda() |
| | | .eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getIsVolunteer, isVolunteer)); |
| | | if (isVolunteer.equals(1) && actActivityDO.getVolunteerMax() <= count |
| | | && !actActivityDO.getVolunteerMax().equals(-1)) { |
| | | return R.fail("志愿者报名人数已满"); |
| | | } |
| | | |
| | | if (isVolunteer.equals(0) && actActivityDO.getParticipantMax() <= count |
| | | && !actActivityDO.getParticipantMax().equals(-1)) { |
| | | return R.fail("居民报名人数已满"); |
| | | //审查用户是否有该活动报名权限(是否活动指定参与人群) |
| | | String currentUserTags = loginUserInfoVO.getTags(); |
| | | String attendPeople = actActivityDO.getAattendPeople(); |
| | | if (isVolunteer.intValue() == 0 && isNotBlank(attendPeople)) { |
| | | if (isBlank(currentUserTags)) { |
| | | return R.fail("您不是指定参与人群!"); |
| | | } |
| | | List<String> currentUserTagList = Arrays.asList(currentUserTags.split(",")); |
| | | boolean checkResult = currentUserTagList.stream().anyMatch(currentUserTag -> attendPeople.contains(currentUserTag)); |
| | | if (!checkResult) { |
| | | return R.fail("您不是指定参与人群!"); |
| | | } |
| | | } |
| | | |
| | | if (isVolunteer.equals(0) && actActivityDO.getParticipantMax() <= count |
| | | && !actActivityDO.getParticipantMax().equals(-1)) { |
| | | return R.fail("居民报名人数已满"); |
| | | } |
| | | |
| | | ComActActSignDO comActActSignDO = new ComActActSignDO(); |
| | |
| | | */ |
| | | @Override |
| | | public R timedTaskActActivity() { |
| | | List<Long> longs = comActActivityDAO.selectTimedTaskActActivity(); |
| | | if (ObjectUtils.isEmpty(longs)) { |
| | | return R.fail("没有需要取消的社区活动"); |
| | | } |
| | | List<ComActActivityDO> comActActivityDOS = comActActivityDAO.selectBatchIds(longs); |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comActActivityDOS)) { |
| | | comActActivityDOS.forEach(comActActivityDO -> { |
| | | ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | BeanUtils.copyProperties(comActActivityDO, comActActivityVO); |
| | | List<ComActActSignDO> comActActSignDOS = comActActSignDAO.selectList(new QueryWrapper<ComActActSignDO>() |
| | | .lambda().eq(ComActActSignDO::getActivityId, comActActivityDO.getId())); |
| | | if (!ObjectUtils.isEmpty(comActActSignDOS)) { |
| | | List<ActivitySignVO> activitySignVOList = new ArrayList<>(); |
| | | comActActSignDOS.forEach(comActActSignDO -> { |
| | | ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | BeanUtils.copyProperties(comActActSignDO, activitySignVO); |
| | | activitySignVOList.add(activitySignVO); |
| | | comActActivityVO.setActivitySignVOList(activitySignVOList); |
| | | }); |
| | | } |
| | | comActActivityVOS.add(comActActivityVO); |
| | | }); |
| | | int num = comActActivityDAO.updateIdBatch(longs); |
| | | log.info("定时任务--一共取消社区活动数量【{}】", num); |
| | | } |
| | | return R.ok(comActActivityVOS); |
| | | // List<Long> longs = comActActivityDAO.selectTimedTaskActActivity(); |
| | | // if (ObjectUtils.isEmpty(longs)) { |
| | | // return R.fail("没有需要取消的社区活动"); |
| | | // } |
| | | // List<ComActActivityDO> comActActivityDOS = comActActivityDAO.selectBatchIds(longs); |
| | | // List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | // if (!ObjectUtils.isEmpty(comActActivityDOS)) { |
| | | // comActActivityDOS.forEach(comActActivityDO -> { |
| | | // ComActActivityVO comActActivityVO = new ComActActivityVO(); |
| | | // BeanUtils.copyProperties(comActActivityDO, comActActivityVO); |
| | | // List<ComActActSignDO> comActActSignDOS = comActActSignDAO.selectList(new QueryWrapper<ComActActSignDO>() |
| | | // .lambda().eq(ComActActSignDO::getActivityId, comActActivityDO.getId())); |
| | | // if (!ObjectUtils.isEmpty(comActActSignDOS)) { |
| | | // List<ActivitySignVO> activitySignVOList = new ArrayList<>(); |
| | | // comActActSignDOS.forEach(comActActSignDO -> { |
| | | // ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | // BeanUtils.copyProperties(comActActSignDO, activitySignVO); |
| | | // activitySignVOList.add(activitySignVO); |
| | | // comActActivityVO.setActivitySignVOList(activitySignVOList); |
| | | // }); |
| | | // } |
| | | // comActActivityVOS.add(comActActivityVO); |
| | | // }); |
| | | // int num = comActActivityDAO.updateIdBatch(longs); |
| | | // log.info("定时任务--一共取消社区活动数量【{}】", num); |
| | | // } |
| | | // return R.ok(comActActivityVOS); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | int num = comActActivityDAO.updateStatusToNotBegin(); |
| | | log.info("定时任务--修改社区活动发布状态活动数量【{}】", num); |
| | | // 修改报名状态 变为报名中 |
| | | int num1 = comActActivityDAO.updateStatusToBeginSign(); |
| | | log.info("定时任务--修改社区活动报名状态活动数量【{}】", num1); |
| | | // int num1 = comActActivityDAO.updateStatusToBeginSign(); |
| | | // log.info("定时任务--修改社区活动报名状态活动数量【{}】", num1); |
| | | int num3 = comActActivityDAO.updateStatusToBeginAfterSingEnd(); |
| | | log.info("定时任务--报名结束修改社区活动进行状态活动数量【{}】", num3); |
| | | // 查询已经结束的活动,需要计算积分 |
| | | List<Long> activityEndIds = comActActivityDAO.getActivityEndIds(); |
| | | // 修改进行状态 变为进行中或者已结束 |
| | | int num2 = comActActivityDAO.updateStatusToBeginActiveOrEnd(); |
| | | log.info("定时任务--修改社区活动进行状态活动数量【{}】", num2); |
| | | int num3 = comActActivityDAO.updateStatusToBeginAfterSingEnd(); |
| | | log.info("定时任务--报名结束修改社区活动进行状态活动数量【{}】", num3); |
| | | return R.ok(activityEndIds); |
| | | } |
| | | |
| | |
| | | iPage.getRecords().forEach(vo ->{ |
| | | List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateDAO |
| | | .selectList(new QueryWrapper<ComActActEvaluateDO>().lambda().eq(ComActActEvaluateDO::getActivityId, vo.getId())); |
| | | if (comActActEvaluateDOList != null && comActActEvaluateDOList.size() != 0) { |
| | | if (comActActEvaluateDOList != null && comActActEvaluateDOList.size() > 0) { |
| | | BigDecimal starNum = BigDecimal.ZERO; |
| | | //总星级 |
| | | int starNum = comActActEvaluateDOList.stream().mapToInt(ComActActEvaluateDO::getStarLevel).sum(); |
| | | //评分星级=总星级/总评价人数 |
| | | vo.setEvaluateLevel(Double.valueOf(starNum/comActActEvaluateDOList.size())); |
| | | for (ComActActEvaluateDO evaluateDO:comActActEvaluateDOList) { |
| | | starNum = starNum.add(BigDecimal.valueOf(evaluateDO.getStarLevel()==null?0:evaluateDO.getStarLevel())); |
| | | } |
| | | //评分星级(如果无评分默认5分)=总星级/总评价人数 |
| | | if(starNum.compareTo(BigDecimal.ZERO) == 0){ |
| | | vo.setEvaluateLevel(BigDecimal.valueOf(5)); |
| | | }else{ |
| | | vo.setEvaluateLevel(starNum.divide(BigDecimal.valueOf(comActActEvaluateDOList.size()),2, RoundingMode.HALF_UP)); |
| | | } |
| | | }else{ |
| | | vo.setEvaluateLevel(BigDecimal.valueOf(5)); |
| | | } |
| | | }); |
| | | return R.ok(iPage); |
| | |
| | | public R activitySignIn(ComActActRegistVO comActActRegistVO) { |
| | | Long activityId = comActActRegistVO.getActivityId(); |
| | | Long userId = comActActRegistVO.getUserId(); |
| | | String activitySignInKey = String.join(DELIMITER, ACTIVITY_SIGN_IN, userId.toString(), activityId.toString()); |
| | | if (stringRedisTemplate.hasKey(activitySignInKey)) { |
| | | return R.fail("你已签到,如要再次签到请三十分钟后尝试!"); |
| | | if (isNull(activityId)) { |
| | | return R.fail("签到所属活动id不能为空!"); |
| | | } |
| | | ComActActivityDO comActActivityDO = comActActivityDAO.selectById(activityId); |
| | | if (isNull(comActActivityDO)) { |
| | | return R.fail("活动不存在!"); |
| | | } |
| | | |
| | | Date beginAt = comActActivityDO.getBeginAt(); |
| | | Date endAt = comActActivityDO.getEndAt(); |
| | | Date nowDate = new Date(); |
| | | if (nowDate.before(beginAt) || nowDate.after(endAt)) { |
| | | return R.fail("不在活动时间范围内"); |
| | | } |
| | | |
| | | int signCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>() |
| | | .lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId)); |
| | | |
| | | if (signCount > 0) { |
| | | return R.fail("请勿重复签到"); |
| | | } |
| | | |
| | | // String activitySignInKey = String.join(DELIMITER, ACTIVITY_SIGN_IN, userId.toString(), activityId.toString()); |
| | | // if (stringRedisTemplate.hasKey(activitySignInKey)) { |
| | | // return R.fail("你已签到,如要再次签到请三十分钟后尝试!"); |
| | | // } |
| | | ComActActRegistDO comActActRegistDO = new ComActActRegistDO(); |
| | | comActActRegistDO.setActivityId(activityId); |
| | | comActActRegistDO.setUserId(userId); |
| | | comActActRegistDO.setIsVolunteer(comActActRegistVO.getIsVolunteer()); |
| | | comActActRegistDO.setCreateAt(new Date()); |
| | | comActActRegistDO.setCreateAt(nowDate); |
| | | int result = comActActRegistDAO.insert(comActActRegistDO); |
| | | if (result > 0) { |
| | | ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | opsForValue.set(activitySignInKey, "", 1800L, TimeUnit.SECONDS); |
| | | // ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | // opsForValue.set(activitySignInKey, "", 1800L, TimeUnit.SECONDS); |
| | | return R.ok(); |
| | | } |
| | | return R.ok(); |
| | | return R.fail("网络错误,请重试"); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isBlank; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.connection.StringRedisConnection; |
| | | import org.springframework.data.redis.core.RedisCallback; |
| | | import org.springframework.data.redis.core.SetOperations; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussOptionUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActDiscussUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.DiscussListVO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.service_community.dao.ComActDiscussCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussOptionDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussOptionUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActDiscussUserDAO; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussCommentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussCommentUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussUserDO; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.ComActDiscussOptionService; |
| | | import com.panzhihua.service_community.service.ComActDiscussService; |
| | | import com.panzhihua.service_community.service.SysConfService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 一起议 |
| | | * @description: 议事投票 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2021-01-22 14:51 |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | public class ComActDiscussServiceImpl implements ComActDiscussService { |
| | | |
| | | private static final String DISCUSS_VIEW_NUM_PREFIX = "DISCUSS_VIEW_NUM"; |
| | | private static final String INCR_VIEW_DISCUSS_IDS_KEY = "INCR_VIEW_DISCUSS_IDS"; |
| | | private static final long DISCUSS_EXPIRE_TIME = 2678400L; |
| | | |
| | | @Resource |
| | | private ComActDiscussCommentDAO comActDiscussCommentDAO; |
| | | @Resource |
| | |
| | | private ComActDiscussCommentUserDAO comActDiscussCommentUserDAO; |
| | | @Resource |
| | | private ComActDiscussOptionService comActDiscussOptionService; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private SysConfService sysConfService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | /** |
| | | * 一起议-新增 |
| | | * 议事投票-新增 |
| | | * |
| | | * @param comActDiscussDTO |
| | | * 新增参数 |
| | | * @param comActDiscussDTO 新增参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addDiscuss(ComActDiscussDTO comActDiscussDTO) { |
| | | if (!checkCurrentUserDiscussIdentity(comActDiscussDTO)) { |
| | | return R.fail("权限验证失败,请确认是否有发布权限"); |
| | | } |
| | | ComActDiscussDO comActDiscussDO = new ComActDiscussDO(); |
| | | BeanUtils.copyProperties(comActDiscussDTO, comActDiscussDO); |
| | | ComActVO comActVO = comActDiscussDAO.selectCommunity(comActDiscussDTO.getCommunityId()); |
| | | Integer type = comActDiscussDTO.getType(); |
| | | Date nowDate = new Date(); |
| | | if (type.equals(ComActDiscussDO.type.tp)) {//判断是投票,需要转义时间 |
| | | Date startTime = DateUtils.stringToDate(comActDiscussDTO.getStartTime(), DateUtils.ymdhms_format); |
| | | Date endTime = DateUtils.stringToDate(comActDiscussDTO.getEndTime(), DateUtils.ymdhms_format); |
| | | comActDiscussDO.setStartTime(startTime); |
| | | comActDiscussDO.setEndTime(endTime); |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.wks); |
| | | //根据时间判断状态是否开始 |
| | | if (startTime != null && startTime.getTime() <= nowDate.getTime()) { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.jxz); |
| | | comActDiscussDO.setReleaseAt(nowDate); |
| | | } |
| | | } else { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.yfb); |
| | | } |
| | | String address = comActDiscussDO.getAddress(); |
| | | if (ObjectUtils.isEmpty(address)) { |
| | | //查询社区地址 |
| | | ComActVO comActVO = comActDiscussDAO.selectCommunity(comActDiscussDTO.getCommunityId()); |
| | | comActDiscussDO.setAddress(comActVO.getAddress()); |
| | | } |
| | | int insert = comActDiscussDAO.insert(comActDiscussDO); |
| | | if (insert > 0) { |
| | | ComActDiscussDO comActDiscussDO1 = comActDiscussDAO.selectOne(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getDiscussSubject, comActDiscussDTO.getDiscussSubject()) |
| | | .eq(ComActDiscussDO::getUserId, comActDiscussDTO.getUserId()) |
| | | .last(" order by create_at desc limit 1 ")); |
| | | Long comActDiscussDO1Id = comActDiscussDO1.getId(); |
| | | Integer type = comActDiscussDTO.getType(); |
| | | //如果是投票,需要把投票的选项存储 |
| | | if (type.equals(2)) { |
| | | Long comActDiscussDO1Id = comActDiscussDO.getId(); |
| | | List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions(); |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = new ArrayList<>(); |
| | | discussOptions.forEach(s -> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return ComActDiscussVO |
| | | * 小程序用户验证是否拥有发布权限 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R detailDiscuss(Long id) { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | private boolean checkCurrentUserDiscussIdentity(ComActDiscussDTO comActDiscussDTO) { |
| | | //小程序用户验证是否拥有发布权限 |
| | | boolean checkResult = true; |
| | | Boolean isApplets = comActDiscussDTO.getIsApplets(); |
| | | if (nonNull(isApplets) && isApplets) { |
| | | String discussIdentityPrefix = "DISCUSS_IDENTITY_"; |
| | | Long communityId = comActDiscussDTO.getCommunityId(); |
| | | R sysConfValue = sysConfService.getSysConfValue(discussIdentityPrefix + communityId, communityId); |
| | | String discussIdentityConfig = (String) sysConfValue.getData(); |
| | | if (isBlank(discussIdentityConfig)) { |
| | | checkResult = false; |
| | | } else { |
| | | List<String> currentUserRoles = new ArrayList<>(); |
| | | List<String> sysAllowedRoles = Arrays.asList(discussIdentityConfig.split(",")); |
| | | LoginUserInfoVO loginUserInfo = comActDiscussDTO.getLoginUserInfo(); |
| | | if (loginUserInfo.getIsPartymember() == 1) { |
| | | currentUserRoles.add("2"); |
| | | } |
| | | if (loginUserInfo.getIsVolunteer().intValue() == 1) { |
| | | currentUserRoles.add("3"); |
| | | } |
| | | R isTeamResult = userService.checkCurrentUserIsTeam(loginUserInfo.getPhone(), loginUserInfo.getCommunityId()); |
| | | if (R.isOk(isTeamResult) && (Boolean) isTeamResult.getData()) { |
| | | currentUserRoles.add("4"); |
| | | } |
| | | if (currentUserRoles.isEmpty()) { |
| | | checkResult = false; |
| | | } |
| | | boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); |
| | | if (!result) { |
| | | checkResult = false; |
| | | } |
| | | } |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | Integer integer = comActDiscussCommentDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, id)); |
| | | comActDiscussVO.setCommentNum(integer); |
| | | Integer integer1 = comActDiscussUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id)); |
| | | comActDiscussVO.setSignNum(integer1); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | |
| | | return R.ok(comActDiscussVO); |
| | | return checkResult; |
| | | } |
| | | |
| | | /** |
| | | * 一起议-删除 |
| | | * 议事投票-编辑 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @return 删除结果 |
| | | * @param comActDiscussDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscuss(Long id) { |
| | | int delete = comActDiscussDAO.deleteById(id); |
| | | if (delete > 0) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editDiscuss(ComActDiscussDTO comActDiscussDTO) { |
| | | Long comActDiscussDO1Id = comActDiscussDTO.getId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussDO1Id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | if (!comActDiscussDO.getStatus().equals(ComActDiscussDO.status.wks) && !comActDiscussDO.getStatus().equals(ComActDiscussDO.status.yfb)) { |
| | | return R.fail("该状态不可修改"); |
| | | } |
| | | Integer type = comActDiscussDO.getType(); |
| | | Integer isRepeat = comActDiscussDO.getIsRepeat(); |
| | | BeanUtils.copyProperties(comActDiscussDTO, comActDiscussDO); |
| | | comActDiscussDO.setType(type); |
| | | comActDiscussDO.setIsRepeat(isRepeat); |
| | | Date nowDate = new Date(); |
| | | if (type.equals(ComActDiscussDO.type.tp)) {//判断是投票,需要转义时间 |
| | | Date startTime = DateUtils.stringToDate(comActDiscussDTO.getStartTime(), DateUtils.ymdhms_format); |
| | | Date endTime = DateUtils.stringToDate(comActDiscussDTO.getEndTime(), DateUtils.ymdhms_format); |
| | | comActDiscussDO.setStartTime(startTime); |
| | | comActDiscussDO.setEndTime(endTime); |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.wks); |
| | | //根据时间判断状态是否开始 |
| | | if (startTime != null && startTime.getTime() <= nowDate.getTime()) { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.jxz); |
| | | comActDiscussDO.setReleaseAt(nowDate); |
| | | } |
| | | } else { |
| | | comActDiscussDO.setStatus(ComActDiscussDO.status.yfb); |
| | | } |
| | | comActDiscussDO.setUpdateAt(new Date()); |
| | | int insert = comActDiscussDAO.updateById(comActDiscussDO); |
| | | if (insert > 0) { |
| | | //如果是投票,需要把投票的选项存储 |
| | | if (type.equals(2)) { |
| | | comActDiscussOptionService.remove(new QueryWrapper<ComActDiscussOptionDO>().lambda() |
| | | .eq(ComActDiscussOptionDO::getDiscussId, comActDiscussDO1Id)); |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = new ArrayList<>(); |
| | | comActDiscussDTO.getDiscussOptions().forEach(s -> { |
| | | ComActDiscussOptionDO comActDiscussOptionDO = new ComActDiscussOptionDO(); |
| | | comActDiscussOptionDO.setDiscussId(comActDiscussDO1Id); |
| | | comActDiscussOptionDO.setOptionContent(s.getOptionContent()); |
| | | comActDiscussOptionDO.setOptionUrl(s.getOptionUrl()); |
| | | comActDiscussOptionDOS.add(comActDiscussOptionDO); |
| | | }); |
| | | comActDiscussOptionService.saveBatch(comActDiscussOptionDOS); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-回复 |
| | | * 议事投票-详情 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 评论内容 |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R detailDiscuss(ComActDiscussDetailDTO discussDetailDTO) { |
| | | Long id = discussDetailDTO.getId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum()); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(ComActDiscussVO.type.tp)) { |
| | | //查询选项列表 |
| | | List<ComActDiscussOptionVO> comActDiscussOptionList = comActDiscussOptionDAO.getDiscussOptionList(id); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionList); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | | comActDiscussVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussVO.setUserNickName(loginUserInfoVO.getNickName()); |
| | | |
| | | //分页查询评论列表 |
| | | PageComActDiscussCommentDTO pageComActDiscussCommentDTO = new PageComActDiscussCommentDTO(); |
| | | BeanUtils.copyProperties(discussDetailDTO, pageComActDiscussCommentDTO); |
| | | IPage<ComActDiscussCommentVO> discussComments = comActDiscussDAO.pageDiscussCommentAdmin(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | discussComments.getRecords().forEach(comment -> { |
| | | if (comment.getReplyNum() > 0) { |
| | | List<ComActDiscussCommentVO> childList = comActDiscussDAO.getDiscussCommentReplyList(comment.getId()); |
| | | if (!childList.isEmpty()) { |
| | | comment.setComActDiscussCommentVOList(childList); |
| | | } |
| | | } |
| | | }); |
| | | comActDiscussVO.setDiscussCommentList(discussComments.getRecords()); |
| | | return R.ok(comActDiscussVO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-删除 |
| | | * |
| | | * @param id 主键 |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscuss(Long id) { |
| | | ComActDiscussDO comActDiscussDO = new ComActDiscussDO(); |
| | | comActDiscussDO.setId(id); |
| | | comActDiscussDO.setIsDel(ComActDiscussDO.isOk.yes); |
| | | if (comActDiscussDAO.updateById(comActDiscussDO) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO 评论内容 |
| | | * @return 回复结果 |
| | | */ |
| | | @Override |
| | |
| | | Long discussId = comActDiscussCommentDTO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | Long currentUser = comActDiscussCommentDTO.getUserId(); |
| | | //判断当前用户是否参与过评论 |
| | | int currentUserCommentCount = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId).eq(ComActDiscussCommentDO::getUserId, currentUser)); |
| | | |
| | | ComActDiscussCommentDO comActDiscussCommentDO = new ComActDiscussCommentDO(); |
| | | BeanUtils.copyProperties(comActDiscussCommentDTO, comActDiscussCommentDO); |
| | | Long userId = comActDiscussCommentDTO.getUserId(); |
| | | Long userId1 = comActDiscussDO.getUserId(); |
| | | if (userId.equals(userId1)) { |
| | | Long discussUser = comActDiscussDO.getUserId(); |
| | | if (currentUser.equals(discussUser)) { |
| | | comActDiscussCommentDO.setIsAuthor(1); |
| | | } |
| | | int insert = comActDiscussCommentDAO.insert(comActDiscussCommentDO); |
| | | if (insert > 0) { |
| | | // comActDiscussDAO.addCommentCount(discussId, 1); |
| | | //评论成功,评论总数+1 |
| | | //若首次参与评论,参与讨论人数+1 |
| | | if (currentUserCommentCount > 0) { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, false); |
| | | } else { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, true); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 |
| | | * 议事投票-分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @param pageComActDiscussDTO 查询参数 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R pageDiscuss(PageComActDiscussDTO pageComActDiscussDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComActDiscussDTO.getPageNum(); |
| | | Long pageSize = pageComActDiscussDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussVO> iPage = comActDiscussDAO.pageDiscuss(page, pageComActDiscussDTO); |
| | | IPage<ComActDiscussVO> iPage = comActDiscussDAO.pageDiscuss(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO); |
| | | return R.ok(iPage); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-查看 |
| | | * 议事投票-后台分页查询 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param pageComActDiscussDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | @Override |
| | | public R pageDiscussAdmin(PageComActDiscussDTO pageComActDiscussDTO) { |
| | | return R.ok(comActDiscussDAO.pageDiscussAdmin(new Page<>(pageComActDiscussDTO.getPageNum(), pageComActDiscussDTO.getPageSize()), pageComActDiscussDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-查看 |
| | | * |
| | | * @param id 主键 |
| | | * @return 详情 ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | |
| | | comActDiscussCommentVO.setParentId(parentId); |
| | | } |
| | | Integer count = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | comActDiscussCommentVO.setNum(count); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(comActDiscussCommentDO.getUserId()); |
| | | comActDiscussCommentVO.setUserName(loginUserInfoVO.getName()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-置顶 |
| | | * 议事投票评论详情 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param pageComActDiscussCommentDTO 请求参数 |
| | | * @return 议事投票详情 |
| | | */ |
| | | @Override |
| | | public R detailDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | ComActDiscussCommentDO comActDiscussCommentDO = comActDiscussCommentDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussCommentDO)) { |
| | | return R.fail("评论不存在"); |
| | | } |
| | | ComActDiscussCommentVO comActDiscussCommentVO = new ComActDiscussCommentVO(); |
| | | Long parentId = comActDiscussCommentDO.getParentId(); |
| | | if (parentId.intValue() == 0) { |
| | | // 一级评论 |
| | | BeanUtils.copyProperties(comActDiscussCommentDO, comActDiscussCommentVO); |
| | | } else { |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = comActDiscussCommentDAO.selectById(parentId); |
| | | BeanUtils.copyProperties(comActDiscussCommentDO1, comActDiscussCommentVO); |
| | | comActDiscussCommentVO.setCommentBack(comActDiscussCommentDO.getComment()); |
| | | comActDiscussCommentVO.setTimeBack(comActDiscussCommentDO.getCreateAt()); |
| | | comActDiscussCommentVO.setParentId(parentId); |
| | | } |
| | | Integer count = comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, id)); |
| | | comActDiscussCommentVO.setNum(count); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(comActDiscussCommentDO.getUserId()); |
| | | comActDiscussCommentVO.setUserName(loginUserInfoVO.getName()); |
| | | comActDiscussCommentVO.setPhone(loginUserInfoVO.getPhone()); |
| | | comActDiscussCommentVO.setImageUrl(loginUserInfoVO.getImageUrl()); |
| | | |
| | | //查询该评论下所有回复内容 |
| | | IPage<ComActDiscussCommentVO> discussCommentList = comActDiscussCommentDAO.getDiscussCommentList(new Page(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO.getId()); |
| | | if (!discussCommentList.getRecords().isEmpty()) { |
| | | comActDiscussCommentVO.setComActDiscussCommentVOList(discussCommentList.getRecords()); |
| | | } |
| | | return R.ok(comActDiscussCommentVO); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论-置顶 |
| | | * |
| | | * @param id 主键 |
| | | * @return 置顶结果 |
| | | */ |
| | | @Override |
| | |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = new ComActDiscussCommentDO(); |
| | | comActDiscussCommentDO1.setIsTopping(0); |
| | | comActDiscussCommentDAO.update(comActDiscussCommentDO1, |
| | | new UpdateWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId)); |
| | | new UpdateWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId)); |
| | | comActDiscussCommentDO1.setIsTopping(1); |
| | | comActDiscussCommentDO1.setId(id); |
| | | int update = comActDiscussCommentDAO.updateById(comActDiscussCommentDO1); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-回复 |
| | | * 议事投票-评论-回复 |
| | | * |
| | | * @param comActDiscussCommentDTO |
| | | * 回复内容 |
| | | * @param comActDiscussCommentDTO 回复内容 |
| | | * @return 回复结果 |
| | | */ |
| | | @Override |
| | |
| | | Long discussId = comActDiscussCommentDO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | Long userId1 = comActDiscussCommentDTO.getUserId(); |
| | | Long parentId = comActDiscussCommentDO.getParentId(); |
| | | if (parentId.intValue() != 0) { |
| | | return R.fail("二级评论不能回复"); |
| | | } |
| | | Long currentUser = comActDiscussCommentDTO.getUserId(); |
| | | //判断当前用户是否参与过评论/回复 |
| | | int currentUserCommentCount = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussId).eq(ComActDiscussCommentDO::getUserId, currentUser)); |
| | | Long discussUser = comActDiscussDO.getUserId(); |
| | | ComActDiscussCommentDO comActDiscussCommentDO1 = new ComActDiscussCommentDO(); |
| | | comActDiscussCommentDO1.setDiscussId(discussId); |
| | | comActDiscussCommentDO1.setComment(comActDiscussCommentDTO.getComment()); |
| | | comActDiscussCommentDO1.setUserId(comActDiscussCommentDTO.getUserId()); |
| | | comActDiscussCommentDO1.setParentId(id); |
| | | if (userId.equals(userId1)) { |
| | | if (discussUser.equals(currentUser)) { |
| | | comActDiscussCommentDO1.setIsAuthor(1); |
| | | } |
| | | int insert = comActDiscussCommentDAO.insert(comActDiscussCommentDO1); |
| | | if (insert > 0) { |
| | | // comActDiscussDAO.addCommentCount(discussId, 1); |
| | | //回复成功,评论总数+1 |
| | | //若首次参与评论,参与讨论人数+1 |
| | | if (currentUserCommentCount > 0) { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, false); |
| | | } else { |
| | | comActDiscussDAO.incrCommentAndJoinNumById(discussId, true); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 |
| | | * 议事投票-评论-分页查询 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页查询参数 |
| | | * @param pageComActDiscussCommentDTO 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | | public R pageDiscussComment(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageComActDiscussCommentDTO.getPageNum(); |
| | | Long pageSize = pageComActDiscussCommentDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussComment(page, pageComActDiscussCommentDTO); |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussComment(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-分页查询 小程序 |
| | | * 议事投票-评论-后台分页查询 |
| | | * |
| | | * @param pageComActDiscussDTO |
| | | * 查询参数 |
| | | * @param pageComActDiscussCommentDTO 分页查询参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | | public R pageDiscussCommentAdmin(PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | IPage<ComActDiscussCommentVO> iPage = comActDiscussDAO.pageDiscussCommentAdmin(new Page<>(pageComActDiscussCommentDTO.getPageNum(), pageComActDiscussCommentDTO.getPageSize()), pageComActDiscussCommentDTO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussDTO 查询参数 |
| | | * @return ComActDiscussVO 分页 |
| | | */ |
| | | @Override |
| | |
| | | records.forEach(comActDiscussVO -> { |
| | | Integer type = comActDiscussVO.getType(); |
| | | Long id = comActDiscussVO.getId(); |
| | | String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString()); |
| | | if (stringRedisTemplate.hasKey(viewNumKey)) { |
| | | ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); |
| | | comActDiscussVO.setViewsNum(Integer.parseInt(opsForValue.get(viewNumKey))); |
| | | } |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | List<Integer> votes = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>() |
| | | .lambda().eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>() |
| | | .lambda().eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | |
| | | if (loginUserId != null) { |
| | | // 判断选项是否已投票 |
| | | int haveVote = |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | votes.add(haveVote); |
| | | comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | fillThePercentAndSort(comActDiscussOptionVOS); |
| | | checkDiscussStatusIsCorrect(comActDiscussVO); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | //填充剩余可投票数 |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | if (comActDiscussVO.getIsRepeat().intValue() == 1) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum(); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } |
| | | } |
| | | //填充投票记录列表 |
| | | List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO |
| | | .selectVotedRecords(comActDiscussVO.getId()); |
| | | comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList); |
| | | //填充已参与投票人数 |
| | | int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId()); |
| | | comActDiscussVO.setVotedPersonNum(votedPersonNum); |
| | | } |
| | | |
| | | if (loginUserId != null) { |
| | | Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()) |
| | | .eq(ComActDiscussUserDO::getUserId, loginUserId)); |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()) |
| | | .eq(ComActDiscussUserDO::getUserId, loginUserId)); |
| | | if (integer > 0) { |
| | | comActDiscussVO.setHaveSign(1); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-点赞、取消点赞 |
| | | * 判断discuss状态是否正确 |
| | | * @param comActDiscussVO |
| | | */ |
| | | private void checkDiscussStatusIsCorrect(ComActDiscussVO comActDiscussVO) { |
| | | //判断discuss状态是否正确 |
| | | boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) && |
| | | (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2); |
| | | if (isIncorrectStatus) { |
| | | comActDiscussVO.setStatus(3); |
| | | comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussUserDTO |
| | | * 操作类型 |
| | | * @param comActDiscussUserDTO 操作类型 |
| | | * @return 操作结果 |
| | | */ |
| | | @Override |
| | |
| | | int num = 0; |
| | | ComActDiscussUserDO comActDiscussUserDO = new ComActDiscussUserDO(); |
| | | BeanUtils.copyProperties(comActDiscussUserDTO, comActDiscussUserDO); |
| | | if (type.intValue() == 1) { |
| | | boolean isIncr = type.intValue() == 1; |
| | | if (isIncr) { |
| | | num = comActDiscussUserDAO.insert(comActDiscussUserDO); |
| | | } else { |
| | | num = comActDiscussUserDAO.delete(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getUserId, comActDiscussUserDTO.getUserId()) |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussUserDTO.getDiscussId())); |
| | | .eq(ComActDiscussUserDO::getUserId, comActDiscussUserDTO.getUserId()) |
| | | .eq(ComActDiscussUserDO::getDiscussId, comActDiscussUserDTO.getDiscussId())); |
| | | } |
| | | if (num > 0) { |
| | | //点赞成功 总数+1 || 取消点赞成功 总数-1 |
| | | comActDiscussDAO.incrOrDecrFabulousNumByType(comActDiscussUserDTO.getDiscussId(), isIncr); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-分页查询 小程序 |
| | | * 议事投票-评论-分页查询 小程序 |
| | | * |
| | | * @param pageComActDiscussCommentDTO |
| | | * 分页参数 |
| | | * @param pageComActDiscussCommentDTO 分页参数 |
| | | * @return ComActDiscussCommentVO |
| | | */ |
| | | @Override |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDiscussCommentVO> iPage = |
| | | comActDiscussDAO.pageDiscussCommentApplets(page, pageComActDiscussCommentDTO); |
| | | comActDiscussDAO.pageDiscussCommentApplets(page, pageComActDiscussCommentDTO); |
| | | List<ComActDiscussCommentVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActDiscussCommentVO -> { |
| | |
| | | comActDiscussCommentVOList.forEach(comActDiscussCommentVO1 -> { |
| | | Long parentId = comActDiscussCommentVO1.getParentId(); |
| | | List<ComActDiscussCommentVO> collect = comActDiscussCommentVOS.stream() |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect)) { |
| | | String userName = collect.get(0).getUserName(); |
| | | String userNickName = collect.get(0).getUserNickName(); |
| | |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | List<ComActDiscussCommentVO> collect1 = records.stream() |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | .filter(comActDiscussCommentVO2 -> comActDiscussCommentVO2.getId().equals(parentId)) |
| | | .collect(Collectors.toList()); |
| | | if (!ObjectUtils.isEmpty(collect1)) { |
| | | ComActDiscussCommentVO comActDiscussCommentVOFirst = collect1.get(0); |
| | | String userName = comActDiscussCommentVOFirst.getUserName(); |
| | |
| | | comActDiscussCommentVO1.setUserNickNameBack(userNickName); |
| | | } |
| | | if (pageComActDiscussCommentDTO.getLoginUserId() != null |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | Integer integer = comActDiscussCommentUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, |
| | | comActDiscussCommentVO1.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, |
| | | pageComActDiscussCommentDTO.getLoginUserId())); |
| | | .selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, |
| | | comActDiscussCommentVO1.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, |
| | | pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer > 0) { |
| | | comActDiscussCommentVO1.setHaveSign(1); |
| | | } else { |
| | |
| | | comActDiscussCommentVO.setComActDiscussCommentVOList(comActDiscussCommentVOList); |
| | | } |
| | | if (pageComActDiscussCommentDTO.getLoginUserId() != null |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | && !pageComActDiscussCommentDTO.getLoginUserId().equals(0L)) { |
| | | Integer integer = |
| | | comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | comActDiscussCommentUserDAO.selectCount(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentVO.getId()) |
| | | .eq(ComActDiscussCommentUserDO::getUserId, pageComActDiscussCommentDTO.getLoginUserId())); |
| | | if (integer > 0) { |
| | | comActDiscussCommentVO.setHaveSign(1); |
| | | } else { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 一起议-详情 小程序 |
| | | * 议事投票-详情 小程序 |
| | | * |
| | | * @param id |
| | | * 主键 |
| | | * @param loginUserId |
| | | * 登录用户主键 |
| | | * @param id 主键 |
| | | * @param loginUserId 登录用户主键 |
| | | * @return ComActDiscussVO |
| | | */ |
| | | @Override |
| | | public R detailDiscussApplets(Long id, Long loginUserId) { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(id); |
| | | if (ObjectUtils.isEmpty(comActDiscussDO)) { |
| | | return R.fail("一起议不存在"); |
| | | return R.fail("议事投票不存在"); |
| | | } |
| | | ComActDiscussVO comActDiscussVO = new ComActDiscussVO(); |
| | | BeanUtils.copyProperties(comActDiscussDO, comActDiscussVO); |
| | | Integer integer = comActDiscussCommentDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussCommentDO>().lambda().eq(ComActDiscussCommentDO::getDiscussId, id)); |
| | | comActDiscussVO.setCommentNum(integer); |
| | | Integer integer1 = comActDiscussUserDAO |
| | | .selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id)); |
| | | comActDiscussVO.setSignNum(integer1); |
| | | comActDiscussVO.setSignNum(comActDiscussDO.getFabulousNum()); |
| | | Integer type = comActDiscussVO.getType(); |
| | | if (type.equals(2)) { |
| | | List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList( |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id)); |
| | | List<ComActDiscussOptionVO> comActDiscussOptionVOS = new ArrayList<>(); |
| | | ArrayList<Integer> votes = new ArrayList<>(); |
| | | comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> { |
| | | Long discussOptionDOId = comActDiscussOptionDO.getId(); |
| | | Integer selectCount = |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | comActDiscussOptionUserDAO.selectCount(new QueryWrapper<ComActDiscussOptionUserDO>().lambda() |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionDOId)); |
| | | ComActDiscussOptionVO comActDiscussOptionVO = new ComActDiscussOptionVO(); |
| | | BeanUtils.copyProperties(comActDiscussOptionDO, comActDiscussOptionVO); |
| | | comActDiscussOptionVO.setNum(selectCount); |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | // 判断选项是否已投票 |
| | | int haveVote = |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | comActDiscussOptionUserDAO.selectHaveVotes(comActDiscussOptionDO.getId(), loginUserId); |
| | | votes.add(haveVote); |
| | | comActDiscussOptionVO.setHaveVote(haveVote > 0 ? 1 : 0); |
| | | } |
| | | comActDiscussOptionVOS.add(comActDiscussOptionVO); |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | fillThePercentAndSort(comActDiscussOptionVOS); |
| | | comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS); |
| | | //填充剩余可投票数 |
| | | if (loginUserId != null && !loginUserId.equals(0L)) { |
| | | if (comActDiscussVO.getIsRepeat().intValue() == 1) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(id, loginUserId); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - votedVotesInToday; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = votes.stream().mapToInt(Integer::intValue).sum(); |
| | | int remainingVotes = comActDiscussVO.getCount().intValue() - alreadyVotedVotes; |
| | | comActDiscussVO.setRemainingVotes(remainingVotes >= 0 ? remainingVotes : 0); |
| | | } |
| | | } |
| | | checkDiscussStatusIsCorrect(comActDiscussVO); |
| | | //填充投票记录列表 |
| | | List<ComActDiscussOptionUserVO> comActDiscussOptionUserVOList = comActDiscussOptionUserDAO |
| | | .selectVotedRecords(comActDiscussVO.getId()); |
| | | comActDiscussVO.setComActDiscussOptionUserVOList(comActDiscussOptionUserVOList); |
| | | //填充已参与投票人数 |
| | | int votedPersonNum = comActDiscussOptionUserDAO.selectVotedPersonNum(comActDiscussVO.getId()); |
| | | comActDiscussVO.setVotedPersonNum(votedPersonNum); |
| | | } |
| | | Long userId = comActDiscussDO.getUserId(); |
| | | LoginUserInfoVO loginUserInfoVO = comActDiscussDAO.selectUserByUserId(userId); |
| | |
| | | comActDiscussVO.setHaveSign(comActDiscussVO1.getHaveSign()); |
| | | comActDiscussVO.setHaveVote(comActDiscussVO1.getHaveVote()); |
| | | } |
| | | |
| | | String viewNumKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, id.toString()); |
| | | if (stringRedisTemplate.hasKey(viewNumKey)) { |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | int viewNum = Integer.parseInt((String) opsForValue.get(viewNumKey)); |
| | | comActDiscussVO.setViewsNum(viewNum); |
| | | } |
| | | return R.ok(comActDiscussVO); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-投票 |
| | | * 计算投票占比以及排序 |
| | | * @param comActDiscussOptionVOS |
| | | */ |
| | | private void fillThePercentAndSort(List<ComActDiscussOptionVO> comActDiscussOptionVOS) { |
| | | //填充总票数 |
| | | int allSum = comActDiscussOptionVOS.stream().mapToInt(ComActDiscussOptionVO::getNum).sum(); |
| | | comActDiscussOptionVOS.forEach(option -> { |
| | | if (allSum == 0) { |
| | | option.setPercent(new BigDecimal(0)); |
| | | } else { |
| | | //占比 |
| | | BigDecimal percent = BigDecimal.valueOf(option.getNum()).divide(BigDecimal.valueOf(allSum), 2, RoundingMode.HALF_UP) |
| | | .multiply(BigDecimal.valueOf(100)).setScale(0); |
| | | option.setPercent(percent); |
| | | } |
| | | }); |
| | | comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed()); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-投票 |
| | | * |
| | | * @param comActDiscussOptionUserDTO |
| | | * 投票信息 |
| | | * @param comActDiscussOptionUserDTO 投票信息 |
| | | * @return 投票结果 |
| | | */ |
| | | @Override |
| | | public R addDiscussOptionUser(ComActDiscussOptionUserDTO comActDiscussOptionUserDTO) { |
| | | Long discussOptionId = comActDiscussOptionUserDTO.getDiscussOptionId(); |
| | | List<Long> discussOptionIds = comActDiscussOptionUserDTO.getDiscussOptionIds(); |
| | | Long discussOptionId = discussOptionIds.get(0); |
| | | Long userId = comActDiscussOptionUserDTO.getUserId(); |
| | | ComActDiscussOptionDO comActDiscussOptionDO = comActDiscussOptionDAO.selectById(discussOptionId); |
| | | if (ObjectUtils.isEmpty(comActDiscussOptionDO)) { |
| | |
| | | // QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, discussId)); |
| | | // List<Long> longList=comActDiscussOptionDOS.stream().map(comActDiscussOptionDO1 -> |
| | | // comActDiscussOptionDO1.getId()).collect(Collectors.toList()); |
| | | Integer integer = comActDiscussOptionUserDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussOptionUserDO>().lambda().eq(ComActDiscussOptionUserDO::getUserId, userId) |
| | | .eq(ComActDiscussOptionUserDO::getDiscussOptionId, discussOptionId)); |
| | | if (integer > 0) { |
| | | return R.fail("不要重复投票"); |
| | | Long discussId = comActDiscussOptionDO.getDiscussId(); |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussOptionDO.getDiscussId()); |
| | | if (isNull(comActDiscussOptionDO)) { |
| | | return R.fail("投票主题不存在"); |
| | | } |
| | | ComActDiscussOptionUserDO comActDiscussOptionUserDO = new ComActDiscussOptionUserDO(); |
| | | comActDiscussOptionUserDO.setUserId(userId); |
| | | comActDiscussOptionUserDO.setDiscussOptionId(discussOptionId); |
| | | int insert = comActDiscussOptionUserDAO.insert(comActDiscussOptionUserDO); |
| | | if (insert > 0) { |
| | | boolean isRepeat = comActDiscussDO.getIsRepeat().intValue() == 1; |
| | | int usableVoteVotes = comActDiscussDO.getCount().intValue(); |
| | | int currentVoteNum = discussOptionIds.size(); |
| | | if (isRepeat) { |
| | | //可重复投票 |
| | | int votedVotesInToday = comActDiscussOptionUserDAO.selectVotedVotesInToday(discussId, userId); |
| | | if (usableVoteVotes <= votedVotesInToday || currentVoteNum > usableVoteVotes - votedVotesInToday) { |
| | | return R.fail("票数不足"); |
| | | } |
| | | } else { |
| | | //不可重复投票 |
| | | int alreadyVotedVotes = comActDiscussOptionUserDAO.selectCount( |
| | | new QueryWrapper<ComActDiscussOptionUserDO>().lambda().eq(ComActDiscussOptionUserDO::getUserId, userId) |
| | | .eq(ComActDiscussOptionUserDO::getDiscussId, discussId)); |
| | | if (usableVoteVotes <= alreadyVotedVotes || currentVoteNum > usableVoteVotes - alreadyVotedVotes) { |
| | | return R.fail("票数不足"); |
| | | } |
| | | } |
| | | List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList = new ArrayList<>(); |
| | | discussOptionIds.forEach(optionId -> { |
| | | ComActDiscussOptionUserDO comActDiscussOptionUserDO = new ComActDiscussOptionUserDO(); |
| | | comActDiscussOptionUserDO.setUserId(userId); |
| | | comActDiscussOptionUserDO.setDiscussOptionId(optionId); |
| | | comActDiscussOptionUserDO.setDiscussId(discussId); |
| | | comActDiscussOptionUserDOList.add(comActDiscussOptionUserDO); |
| | | }); |
| | | int result = comActDiscussOptionUserDAO.batchInsert(comActDiscussOptionUserDOList); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议-评论-点赞、取消点赞 |
| | | * 议事投票-评论-点赞、取消点赞 |
| | | * |
| | | * @param comActDiscussCommentUserDTO |
| | | * 评论点赞 |
| | | * @param comActDiscussCommentUserDTO 评论点赞 |
| | | * @return 点赞结果 |
| | | */ |
| | | @Override |
| | | public R putDiscussCommentUser(ComActDiscussCommentUserDTO comActDiscussCommentUserDTO) { |
| | | ComActDiscussCommentDO comActDiscussCommentDO = |
| | | comActDiscussCommentDAO.selectById(comActDiscussCommentUserDTO.getId()); |
| | | comActDiscussCommentDAO.selectById(comActDiscussCommentUserDTO.getId()); |
| | | if (ObjectUtils.isEmpty(comActDiscussCommentDO)) { |
| | | return R.fail("评论不存在"); |
| | | } |
| | |
| | | num = comActDiscussCommentUserDAO.insert(comActDiscussCommentUserDO); |
| | | } else { |
| | | num = comActDiscussCommentUserDAO.delete(new QueryWrapper<ComActDiscussCommentUserDO>().lambda() |
| | | .eq(ComActDiscussCommentUserDO::getUserId, comActDiscussCommentUserDTO.getUserId()) |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentUserDTO.getId())); |
| | | .eq(ComActDiscussCommentUserDO::getUserId, comActDiscussCommentUserDTO.getUserId()) |
| | | .eq(ComActDiscussCommentUserDO::getDisscussCommentId, comActDiscussCommentUserDTO.getId())); |
| | | } |
| | | if (num > 0) { |
| | | return R.ok(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 工作大屏-一起议列表 |
| | | * 工作大屏-议事投票列表 |
| | | * |
| | | * @param discussListDTO |
| | | * 请求参数 |
| | | * @return 一起议列表 |
| | | * @param discussListDTO 请求参数 |
| | | * @return 议事投票列表 |
| | | */ |
| | | @Override |
| | | public R getScreenDiscussList(ScreenDiscussListDTO discussListDTO) { |
| | | IPage<DiscussListVO> discussListVOIPage = comActDiscussDAO |
| | | .getScreenDiscussList(new Page(discussListDTO.getPageNum(), discussListDTO.getPageSize()), discussListDTO); |
| | | .getScreenDiscussList(new Page(discussListDTO.getPageNum(), discussListDTO.getPageSize()), discussListDTO); |
| | | if (!discussListVOIPage.getRecords().isEmpty()) { |
| | | discussListVOIPage.getRecords().forEach(discussListVO -> { |
| | | // 查询评论数量和点赞数量 |
| | | Integer integer = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>() |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussListVO.getId())); |
| | | .lambda().eq(ComActDiscussCommentDO::getDiscussId, discussListVO.getId())); |
| | | discussListVO.setCommentCount(integer); |
| | | Integer integer1 = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda() |
| | | .eq(ComActDiscussUserDO::getDiscussId, discussListVO.getId())); |
| | | .eq(ComActDiscussUserDO::getDiscussId, discussListVO.getId())); |
| | | discussListVO.setFabulousCount(integer1); |
| | | |
| | | if (discussListVO.getType().equals(ScreenDiscussListDTO.type.tp)) {// 投票 |
| | | List<ComActDiscussOptionVO> discussOptionList = |
| | | comActDiscussDAO.getScreenDiscussOptionList(discussListVO.getId()); |
| | | comActDiscussDAO.getScreenDiscussOptionList(discussListVO.getId()); |
| | | if (!discussOptionList.isEmpty()) { |
| | | discussListVO.setDiscussOptionList(discussOptionList); |
| | | } |
| | |
| | | } |
| | | return R.ok(discussListVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票后台公布结果 |
| | | * |
| | | * @param publishResultDTO 请求参数 |
| | | * @return 公布结果 |
| | | */ |
| | | @Override |
| | | public R publishResultAdmin(ComActDiscussPublishResultDTO publishResultDTO) { |
| | | ComActDiscussDO discussDO = comActDiscussDAO.selectById(publishResultDTO.getId()); |
| | | if (discussDO == null) { |
| | | return R.fail("议事投票记录不存在"); |
| | | } |
| | | Date nowDate = new Date(); |
| | | if (publishResultDTO.getType().equals(ComActDiscussPublishResultDTO.type.add)) { |
| | | if (!discussDO.getStatus().equals(ComActDiscussDO.status.dgb)) { |
| | | return R.fail("该议事投票不是待公布状态,不可公布结果操作"); |
| | | } |
| | | discussDO.setStatus(ComActDiscussDO.status.ygb); |
| | | } |
| | | discussDO.setPublishAt(nowDate); |
| | | discussDO.setPublishResult(publishResultDTO.getResult()); |
| | | discussDO.setUpdateAt(nowDate); |
| | | discussDO.setPublishBy(publishResultDTO.getUserId()); |
| | | if (comActDiscussDAO.updateById(discussDO) > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票-评论/回复删除 |
| | | * |
| | | * @param id 评论/回复id |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteDiscussCommentAdmin(Long id) { |
| | | ComActDiscussCommentDO discussCommentDO = comActDiscussCommentDAO.selectById(id); |
| | | if (discussCommentDO == null) { |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | if (discussCommentDO.getIsDel().equals(ComActDiscussCommentDO.isDelete.yes)) { |
| | | return R.fail("该记录已被删除"); |
| | | } |
| | | discussCommentDO.setIsDel(ComActDiscussCommentDO.isDelete.yes); |
| | | if (comActDiscussCommentDAO.updateById(discussCommentDO) > 0) { |
| | | ComActDiscussDO discussDO = comActDiscussDAO.selectById(discussCommentDO.getDiscussId()); |
| | | if (discussDO != null) { |
| | | if (discussDO.getCommentNum() > 0) { |
| | | if (discussCommentDO.getParentId().equals(0L)) { |
| | | Integer count = comActDiscussCommentDAO.selectCount(new QueryWrapper<ComActDiscussCommentDO>().lambda() |
| | | .eq(ComActDiscussCommentDO::getParentId, id).eq(ComActDiscussCommentDO::getIsDel, ComActDiscussCommentDO.isDelete.no)); |
| | | if (count != null && count > 0 && discussDO.getCommentNum() > count) { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - count); |
| | | } else { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - 1); |
| | | } |
| | | comActDiscussDAO.updateById(discussDO); |
| | | } else { |
| | | discussDO.setCommentNum(discussDO.getCommentNum() - 1); |
| | | comActDiscussDAO.updateById(discussDO); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询评论下回复列表 |
| | | * |
| | | * @param discussDetailDTO 请求参数 |
| | | * @return 回复列表 |
| | | */ |
| | | @Override |
| | | public R discussCommentReplyAdmin(ComActDiscussDetailDTO discussDetailDTO) { |
| | | return R.ok(comActDiscussCommentDAO.getDiscussCommentList(new Page(discussDetailDTO.getPageNum(), discussDetailDTO.getPageSize()), discussDetailDTO.getId())); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区可发布议事投票权限配置 |
| | | * |
| | | * @param communityId 社区id |
| | | * @return 社区可发布议事投票权限配置 |
| | | */ |
| | | @Override |
| | | public R discussJurisdictionGet(Long communityId, Long userId) { |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode,Constants.DISCUSS_IDENTITY_KEY + communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode(Constants.DISCUSS_IDENTITY_KEY + communityId); |
| | | sysConfDO.setName("社区议事投票小程序身份验证参数"); |
| | | sysConfDO.setValue("");// 社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | sysConfDO.setDescription("社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员)"); |
| | | sysConfDO.setCommunityId(communityId); |
| | | sysConfDO.setCreateBy(userId); |
| | | int inserted = sysConfDao.insert(sysConfDO); |
| | | if (inserted != 1) { |
| | | throw new ServiceException("添加社区议事投票小程序身份验证参数失败"); |
| | | } |
| | | confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId) |
| | | .orderByDesc(SysConfDO::getCreateAt)); |
| | | } |
| | | if (confDOList != null && confDOList.size() > 0) { |
| | | SysConfDO latest = confDOList.get(0); |
| | | SysConfVO sysConfVO = new SysConfVO(); |
| | | BeanUtils.copyProperties(latest, sysConfVO); |
| | | return R.ok(sysConfVO.getValue()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 设置当前社区议事投票小程序身份验证参数(1.全部 2.党员 3.志愿者 4.社区工作人员) |
| | | * |
| | | * @param communityId 社区id |
| | | * @param value 需要设置的参数值 |
| | | * @return 设置结果 |
| | | */ |
| | | @Override |
| | | public R discussJurisdictionSet(Long communityId, String value) { |
| | | List<SysConfDO> authConf = |
| | | sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode, Constants.DISCUSS_IDENTITY_KEY + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (authConf != null && authConf.size() > 0) { |
| | | SysConfDO first = authConf.get(0); |
| | | first.setValue(value); |
| | | int updated = sysConfDao.updateById(first); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 议事投票检测状态定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public R timedTaskDiscussInspectStatus() { |
| | | Date nowDate = new Date(); |
| | | //查询已过开始时间未开始投票列表 |
| | | List<ComActDiscussDO> wksDiscussList = comActDiscussDAO.selectList(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getType, ComActDiscussDO.type.tp).eq(ComActDiscussDO::getIsDel, ComActDiscussDO.isOk.no) |
| | | .eq(ComActDiscussDO::getStatus,ComActDiscussDO.status.wks).le(ComActDiscussDO::getStartTime, nowDate)); |
| | | wksDiscussList.forEach(wksDiscuss -> { |
| | | wksDiscuss.setStatus(ComActDiscussDO.status.jxz); |
| | | wksDiscuss.setUpdateAt(nowDate); |
| | | wksDiscuss.setReleaseAt(nowDate); |
| | | comActDiscussDAO.updateById(wksDiscuss); |
| | | }); |
| | | |
| | | //查询已过结束时间未结束的投票列表 |
| | | List<ComActDiscussDO> jxzDiscussList = comActDiscussDAO.selectList(new QueryWrapper<ComActDiscussDO>().lambda() |
| | | .eq(ComActDiscussDO::getType, ComActDiscussDO.type.tp).eq(ComActDiscussDO::getIsDel, ComActDiscussDO.isOk.no) |
| | | .eq(ComActDiscussDO::getStatus,ComActDiscussDO.status.jxz).le(ComActDiscussDO::getEndTime, nowDate)); |
| | | jxzDiscussList.forEach(jxzDiscuss -> { |
| | | jxzDiscuss.setStatus(ComActDiscussDO.status.dgb); |
| | | jxzDiscuss.setUpdateAt(nowDate); |
| | | comActDiscussDAO.updateById(jxzDiscuss); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 一起议增加浏览量 |
| | | * @param discussId 一起议主键id |
| | | */ |
| | | @Override |
| | | public void increaseViewNum(Long discussId) { |
| | | String incrKey = String.join("_", DISCUSS_VIEW_NUM_PREFIX, discussId.toString()); |
| | | Boolean isExist = stringRedisTemplate.hasKey(incrKey); |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | if (isExist) { |
| | | opsForValue.increment(incrKey); |
| | | } else { |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(discussId); |
| | | if (nonNull(comActDiscussDO)) { |
| | | stringRedisTemplate.executePipelined((RedisCallback<Object>) redisConnection -> { |
| | | StringRedisConnection stringRedisConnection = (StringRedisConnection) redisConnection; |
| | | Integer nowViewNum = Math.addExact(comActDiscussDO.getViewsNum().intValue(), 1); |
| | | stringRedisConnection.set(incrKey, nowViewNum.toString()); |
| | | stringRedisConnection.expire(incrKey, DISCUSS_EXPIRE_TIME); |
| | | stringRedisConnection.sAdd(INCR_VIEW_DISCUSS_IDS_KEY, discussId.toString()); |
| | | stringRedisConnection.expire(INCR_VIEW_DISCUSS_IDS_KEY, DISCUSS_EXPIRE_TIME); |
| | | return null; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 公布/编辑一起议投票结果 |
| | | * @param comActDiscussDTO |
| | | * @return 请求结果 |
| | | */ |
| | | @Override |
| | | public R editDiscussResult(ComActDiscussDTO comActDiscussDTO) { |
| | | if (isNull(comActDiscussDTO.getId()) || isNull(comActDiscussDTO.getPublishResult())) { |
| | | return R.fail("缺少参数!"); |
| | | } |
| | | ComActDiscussDO comActDiscussDO = comActDiscussDAO.selectById(comActDiscussDTO.getId()); |
| | | if (isNull(comActDiscussDO)) { |
| | | return R.fail("当前一起议主题不存在!"); |
| | | } |
| | | if (!comActDiscussDTO.getUserId().equals(comActDiscussDO.getUserId())) { |
| | | return R.fail("只能公布或编辑自己发布的主题!"); |
| | | } |
| | | comActDiscussDO.setPublishResult(comActDiscussDTO.getPublishResult()); |
| | | comActDiscussDO.setStatus(4); |
| | | int result = comActDiscussDAO.updateById(comActDiscussDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("网络错误,请重试!"); |
| | | } |
| | | |
| | | /** |
| | | * 一起议获取是否有发布权 |
| | | * @param comActDiscussDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getDiscussPermissions(ComActDiscussDTO comActDiscussDTO) { |
| | | return R.ok(checkCurrentUserDiscussIdentity(comActDiscussDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 将redis中浏览量写入表中 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | public R writeDiscussViewNumToTable() { |
| | | try { |
| | | if (stringRedisTemplate.hasKey(INCR_VIEW_DISCUSS_IDS_KEY)) { |
| | | SetOperations opsForSet = stringRedisTemplate.opsForSet(); |
| | | Set<String> needWriteDiscussIdSet = opsForSet.members(INCR_VIEW_DISCUSS_IDS_KEY); |
| | | |
| | | //组装viewNum key |
| | | List<String> viewNumKeys = new ArrayList<>(); |
| | | Iterator<String> iterator = needWriteDiscussIdSet.iterator(); |
| | | while (iterator.hasNext()) { |
| | | viewNumKeys.add(String.join("_", DISCUSS_VIEW_NUM_PREFIX, iterator.next())); |
| | | } |
| | | |
| | | ValueOperations opsForValue = stringRedisTemplate.opsForValue(); |
| | | List<String> viewNumList = opsForValue.multiGet(viewNumKeys); |
| | | |
| | | //待处理集合,以key-value/discussId-viewNum 存放 |
| | | HashMap<Long, Integer> needDealMap = new HashMap<>(); |
| | | for (String discussId : needWriteDiscussIdSet) { |
| | | try { |
| | | needDealMap.put(Long.parseLong(discussId), Integer.parseInt(viewNumList.get(0))); |
| | | viewNumList.remove(0); |
| | | } catch (IndexOutOfBoundsException e) { |
| | | //数据存在异常了,跳过,继续执行正确的 |
| | | continue; |
| | | } |
| | | } |
| | | int result = comActDiscussDAO.batchUpdateViewNum(needDealMap); |
| | | if (result <= 0) { |
| | | return R.fail("处理失败"); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("写入浏览量失败【{}】", e.getMessage()); |
| | | return R.fail("处理失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.yes); |
| | | cmActEasyPhotoDO.setTransferReason(comActEasyPhotoVO.getTransferReason()); |
| | | cmActEasyPhotoDO.setTransferTime(nowDate); |
| | | |
| | | } else { |
| | | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取首页弹窗接口 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 首页弹窗接口 |
| | | */ |
| | | @Override |
| | | public R getUserRewards(Long userId, Long communityId) { |
| | | // 结果返回参数 |
| | | ComActEasyPhotoRewardVO easyPhotoRewardVO = new ComActEasyPhotoRewardVO(); |
| | | // 查询随手拍活动 |
| | | ComActEasyPhotoActivityVO photoActivityVO = new ComActEasyPhotoActivityVO(); |
| | | Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | List<ComActEasyPhotoActivityDO> photoActivityDOS = |
| | | comActEasyPhotoActivityMapper.selectList(new QueryWrapper<ComActEasyPhotoActivityDO>().lambda() |
| | | .eq(ComActEasyPhotoActivityDO::getCommunityId, communityId) |
| | | .eq(ComActEasyPhotoActivityDO::getStatus, ComActEasyPhotoActivityDO.status.jxz) |
| | | .le(ComActEasyPhotoActivityDO::getActivityStartAt, nowDate) |
| | | .ge(ComActEasyPhotoActivityDO::getActivityEndAt, nowDate)); |
| | | if (!photoActivityDOS.isEmpty()) { |
| | | ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | BeanUtils.copyProperties(photoActivityDO, photoActivityVO); |
| | | easyPhotoRewardVO.setEasyPhotoActivityVO(photoActivityVO); |
| | | } |
| | | if (userId != null && userId != 0L) { |
| | | // 查询用户未读奖励金额 |
| | | BigDecimal amount = comActEasyPhotoRewardMapper.getUserReward(userId, communityId); |
| | | if (amount != null) { |
| | | easyPhotoRewardVO.setAmount(amount); |
| | | } |
| | | } |
| | | // 查询当前社区正在进行中的弹窗调查问卷 |
| | | ComActQuestnaireDO popupQuestnaireDO = comActQuestnaireDAO.selectOne(new QueryWrapper<ComActQuestnaireDO>() |
| | | .lambda().le(ComActQuestnaireDO::getStartTime, nowDate).ge(ComActQuestnaireDO::getEndTime, nowDate) |
| | | .eq(ComActQuestnaireDO::getCommunityId, communityId).eq(ComActQuestnaireDO::getState, 2) |
| | | .eq(ComActQuestnaireDO::getAdverPositionPopup, ComActQuestnaireDO.isOk.yes)); |
| | | if (popupQuestnaireDO != null) { |
| | | ComActQuestnaireAppVO popupQuestnaireVO = new ComActQuestnaireAppVO(); |
| | | BeanUtils.copyProperties(popupQuestnaireDO, popupQuestnaireVO); |
| | | if (userId != null) { |
| | | if (popupQuestnaireDO.getIsForce().equals(ComActQuestnaireDO.isOk.no)) { |
| | | // 查询用户是否已点击不再提醒 |
| | | Integer count = comActQuestnaireDAO.getNoRemindCount(userId, popupQuestnaireVO.getId()); |
| | | if (count <= 0) { |
| | | popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | } |
| | | } else { |
| | | popupQuestnaireVO.setIsDisplay(ComActQuestnaireDO.isOk.yes); |
| | | } |
| | | } |
| | | easyPhotoRewardVO.setPopupQuestnaireVO(popupQuestnaireVO); |
| | | } |
| | | return R.ok(easyPhotoRewardVO); |
| | | } |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * @param userId |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishOperationRecordMapper; |
| | | import com.panzhihua.service_community.service.ComActMicroWishOperationRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-08-27 10:28:04 |
| | | * @describe 服务实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActMicroWishOperationRecordServiceImpl extends ServiceImpl<ComActMicroWishOperationRecordMapper, ComActMicroWishOperationRecordDO> implements ComActMicroWishOperationRecordService { |
| | | @Resource |
| | | private ComActMicroWishOperationRecordMapper comActMicroWishOperationRecordMapper; |
| | | @Override |
| | | public R getByWishId(Long id) { |
| | | return R.ok(comActMicroWishOperationRecordMapper.getByWishId(id)); |
| | | } |
| | | |
| | | /** |
| | | * 微心愿添加操作记录 |
| | | * @param content 操作内容 |
| | | * @param userId 操作用户id |
| | | * @param wishId 微心愿id |
| | | * @param type 操作类型 |
| | | * @param remark 操作备注 |
| | | * @param imgUrl 反馈图片 |
| | | */ |
| | | @Override |
| | | public void addOperationRecord(String content,Long userId,Long wishId,Integer type,String remark,String imgUrl){ |
| | | ComActMicroWishOperationRecordDO wishOperationRecordDO = new ComActMicroWishOperationRecordDO(); |
| | | wishOperationRecordDO.setWishId(wishId); |
| | | wishOperationRecordDO.setUserId(userId); |
| | | wishOperationRecordDO.setType(type); |
| | | wishOperationRecordDO.setRemark(remark); |
| | | wishOperationRecordDO.setContent(content); |
| | | wishOperationRecordDO.setCreateTime(new Date()); |
| | | if(StringUtils.isNotEmpty(imgUrl)){ |
| | | wishOperationRecordDO.setImgUrl(imgUrl); |
| | | } |
| | | this.baseMapper.insert(wishOperationRecordDO); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | 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.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishFeedbackVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishOperationRecordVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.work.MicroListVO; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishDAO; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishFeedbackMapper; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishOperationRecordMapper; |
| | | import com.panzhihua.service_community.dao.ComActMicroWishUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishFeedbackDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishOperationRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComActMicroWishUserDO; |
| | | import com.panzhihua.service_community.service.ComActMicroWishOperationRecordService; |
| | | import com.panzhihua.service_community.service.ComActMicroWishService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | @Service |
| | | @Slf4j |
| | | public class ComActMicroWishServiceImpl extends ServiceImpl<ComActMicroWishDAO, ComActMicroWishDO> |
| | | implements ComActMicroWishService { |
| | | public class ComActMicroWishServiceImpl extends ServiceImpl<ComActMicroWishDAO, ComActMicroWishDO> implements ComActMicroWishService { |
| | | @Resource |
| | | private ComActMicroWishDAO comActMicroWishDAO; |
| | | @Resource |
| | | private ComActMicroWishUserDAO comActMicroWishUserDAO; |
| | | |
| | | @Resource |
| | | private ComActMicroWishFeedbackMapper comActMicroWishFeedbackMapper; |
| | | @Resource |
| | | private ComActMicroWishOperationRecordMapper comActMicroWishOperationRecordMapper; |
| | | @Resource |
| | | private ComActMicroWishOperationRecordService wishOperationRecordService; |
| | | /** |
| | | * 分页查询微心愿 |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 查询参数 |
| | | * @param comActMicroWishVO 查询参数 |
| | | * @return 心愿列表 |
| | | */ |
| | | @Override |
| | |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActMicroWishVO.getPageNum(); |
| | | Long pageSize = comActMicroWishVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | if (null==pageNum || 0 == pageNum) { |
| | | pageNum = 1l; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | if (null==pageSize || 0 == pageSize) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setSize(pageSize); |
| | |
| | | List<ComActMicroWishVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMicroWishVO1 -> { |
| | | if (userId != null) { |
| | | if(userId != null){ |
| | | Long id = comActMicroWishVO1.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne( |
| | | new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | .eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(0); |
| | |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | comActMicroWishVO1 |
| | | .setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R pageMicroWishApplets(ComActMicroWishVO comActMicroWishVO) { |
| | | Long userId = comActMicroWishVO.getResponsibleId(); |
| | | IPage<ComActMicroWishVO> iPage = comActMicroWishDAO.pageMicroWishApplets(new Page(comActMicroWishVO.getPageNum() |
| | | ,comActMicroWishVO.getPageSize()), comActMicroWishVO); |
| | | List<ComActMicroWishVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMicroWishVO1 -> { |
| | | if(userId != null){ |
| | | Long id = comActMicroWishVO1.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | .eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | |
| | | /** |
| | | * 心愿详情 |
| | | * |
| | | * @param id |
| | | * 查询主键 |
| | | * @param userId |
| | | * 登录用户id |
| | | * @param id 查询主键 |
| | | * @param userId 登录用户id |
| | | * @return 心愿内容 |
| | | */ |
| | | @Override |
| | |
| | | return R.fail("微心愿不存在"); |
| | | } |
| | | Integer starNum = comActMicroWishVO.getStarNum(); |
| | | if (null == starNum) { |
| | | if (null==starNum) { |
| | | comActMicroWishVO.setStarNum(0); |
| | | } |
| | | if (ObjectUtils.isEmpty(comActMicroWishVO)) { |
| | | return R.fail("心愿不存在"); |
| | | } |
| | | if (userId != null) { |
| | | ComActMicroWishUserDO comActMicroWishUserDO = |
| | | comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda() |
| | | .eq(ComActMicroWishUserDO::getUserId, userId).eq(ComActMicroWishUserDO::getMicroWishId, id)); |
| | | if(userId != null){ |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getUserId, userId).eq(ComActMicroWishUserDO::getMicroWishId, id)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | }else { |
| | | comActMicroWishVO.setHaveGiveThumbsUp(1); |
| | | } |
| | | } |
| | | //查询反馈列表 |
| | | List<ComActMicroWishFeedbackVO> feedList=comActMicroWishFeedbackMapper.selectByWishId(id); |
| | | if(!feedList.isEmpty()){ |
| | | comActMicroWishVO.setFeedbackVOList(feedList); |
| | | } |
| | | //查询操作记录 |
| | | List<ComActMicroWishOperationRecordVO> operationList=comActMicroWishOperationRecordMapper.getByWishId(id); |
| | | if(!operationList.isEmpty()){ |
| | | comActMicroWishVO.setOperationRecordVOList(operationList); |
| | | } |
| | | comActMicroWishVO.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO.getSponsorPhone())); |
| | | //查询同类型id数组 |
| | | List<Long> idList=comActMicroWishOperationRecordMapper.selectId(comActMicroWishVO); |
| | | if(!idList.isEmpty()){ |
| | | comActMicroWishVO.setIdList(idList); |
| | | } |
| | | return R.ok(comActMicroWishVO); |
| | | } |
| | | |
| | | /** |
| | | * 审核、分配、反馈心愿 |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 具体操作 |
| | | * @param comActMicroWishVO 具体操作 |
| | | * @return 操作结果 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R putlMicroWish(ComActMicroWishVO comActMicroWishVO) { |
| | | Long id = comActMicroWishVO.getId(); |
| | | int type = comActMicroWishVO.getType().intValue(); |
| | |
| | | Long responsibleId = comActMicroWishVO.getResponsibleId(); |
| | | String feedback = comActMicroWishVO.getFeedback(); |
| | | String feedbackPhotoPathList = comActMicroWishVO.getFeedbackPhotoPathList(); |
| | | ComActMicroWishDO comActMicroWishDO = new ComActMicroWishDO(); |
| | | ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO(); |
| | | comActMicroWishDO.setId(id); |
| | | Boolean isUpdate = false; |
| | | Date date = new Date(); |
| | | // 1 审核通过 2驳回 3分配人员 4发起活动 5反馈 |
| | | switch (type) { |
| | | ComActMicroWishOperationRecordDO comActMicroWishOperationRecordDO=new ComActMicroWishOperationRecordDO(); |
| | | comActMicroWishOperationRecordDO.setCreateTime(date); |
| | | comActMicroWishOperationRecordDO.setUserId(comActMicroWishVO.getUserId()); |
| | | comActMicroWishOperationRecordDO.setWishId(comActMicroWishVO.getId()); |
| | | ComActMicroWishDO microWishDO = this.baseMapper.selectById(id); |
| | | if(microWishDO == null){ |
| | | return R.fail("未查询到该微心愿记录"); |
| | | } |
| | | // 1 审核通过 2驳回 3分配人员 4发起活动 5反馈 |
| | | switch (type){ |
| | | case 1: |
| | | isUpdate = true; |
| | | if(!microWishDO.getStatus().equals(ComActMicroWishDO.status.dsh)){ |
| | | return R.fail("该微心愿已审核,不可重复审核"); |
| | | } |
| | | comActMicroWishDO.setExamineAt(date); |
| | | comActMicroWishDO.setStatus(2);// 待分配 |
| | | comActMicroWishDO.setAimNum(comActMicroWishVO.getAimNum()); |
| | | comActMicroWishDO.setStatus(7);//集心中 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.sh); |
| | | comActMicroWishOperationRecordDO.setContent("审核通过"); |
| | | comActMicroWishOperationRecordDO.setRemark("微心愿审核通过"); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 2: |
| | | isUpdate = true; |
| | | if(!microWishDO.getStatus().equals(ComActMicroWishDO.status.dsh)){ |
| | | return R.fail("该微心愿已审核,不可重复审核"); |
| | | } |
| | | comActMicroWishDO.setExamineAt(date); |
| | | comActMicroWishDO.setRejectReason(rejectReason); |
| | | comActMicroWishDO.setStatus(4);// 驳回 |
| | | comActMicroWishDO.setStatus(4);//驳回 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.bh); |
| | | comActMicroWishOperationRecordDO.setContent(rejectReason); |
| | | comActMicroWishOperationRecordDO.setRemark("微心愿审核未通过"); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 3: |
| | | isUpdate = true; |
| | | comActMicroWishDO.setDistributionAt(date); |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);// 进行中 |
| | | comActMicroWishDO.setStatus(3);//进行中 |
| | | comActMicroWishDO.setForm(1); |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | | comActMicroWishOperationRecordDO.setRemark("分配心愿"); |
| | | comActMicroWishOperationRecordDO.setUserId(responsibleId); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 4: |
| | | isUpdate = true; |
| | | comActMicroWishDO.setDistributionAt(date); |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);// 待确认 |
| | | comActMicroWishDO.setStatus(3);//待确认 |
| | | comActMicroWishDO.setForm(2); |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fp); |
| | | comActMicroWishOperationRecordDO.setContent("分配心愿"); |
| | | comActMicroWishOperationRecordDO.setRemark("分配心愿"); |
| | | comActMicroWishOperationRecordDO.setUserId(responsibleId); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 5: |
| | | if (comActMicroWishVO.getFeedback().length() > 200) { |
| | | if(comActMicroWishVO.getFeedback().length() > 200){ |
| | | return R.fail("反馈字数不得超过200字"); |
| | | } |
| | | comActMicroWishDO.setFeedbackAt(date); |
| | | comActMicroWishDO.setStatus(5);// 待确认 |
| | | comActMicroWishDO.setFeedback(feedback); |
| | | comActMicroWishDO.setFinish(feedback); |
| | | comActMicroWishDO.setFinishPhotoPathList(feedbackPhotoPathList); |
| | | comActMicroWishDO.setFinishAt(date); |
| | | comActMicroWishDO.setFeedbackPhotoPathList(feedbackPhotoPathList); |
| | | break; |
| | | //新增反馈记录 |
| | | ComActMicroWishFeedbackDO comActMicroWishFeedbackDO=new ComActMicroWishFeedbackDO(); |
| | | comActMicroWishFeedbackDO.setCreateTime(date); |
| | | comActMicroWishFeedbackDO.setContent(feedback); |
| | | comActMicroWishFeedbackDO.setImgUrl(feedbackPhotoPathList); |
| | | comActMicroWishFeedbackDO.setMicroId(comActMicroWishVO.getId()); |
| | | comActMicroWishFeedbackDO.setUserId(comActMicroWishVO.getUserId()); |
| | | if(comActMicroWishVO.getStatus() != null && comActMicroWishVO.getStatus().equals(ComActMicroWishDO.status.dqr)){ |
| | | isUpdate = true; |
| | | comActMicroWishDO.setStatus(ComActMicroWishDO.status.dqr); |
| | | comActMicroWishDO.setFinishAt(date); |
| | | comActMicroWishDO.setFinish(feedback); |
| | | comActMicroWishDO.setFinishPhotoPathList(feedbackPhotoPathList); |
| | | |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fk); |
| | | comActMicroWishOperationRecordDO.setContent(feedback); |
| | | comActMicroWishOperationRecordDO.setRemark("心愿已完成"); |
| | | comActMicroWishOperationRecordDO.setImgUrl(feedbackPhotoPathList); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | }else{ |
| | | //添加操作记录 |
| | | comActMicroWishOperationRecordDO.setType(ComActMicroWishOperationRecordDO.type.fk); |
| | | comActMicroWishOperationRecordDO.setContent(feedback); |
| | | comActMicroWishOperationRecordDO.setRemark("社区反馈"); |
| | | comActMicroWishOperationRecordDO.setImgUrl(feedbackPhotoPathList); |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | } |
| | | // else { |
| | | // comActMicroWishDO.setStatus(3); |
| | | // } |
| | | comActMicroWishFeedbackMapper.insert(comActMicroWishFeedbackDO); |
| | | default: |
| | | break; |
| | | } |
| | | int update = comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | if (update > 0) { |
| | | if(isUpdate){ |
| | | int update = comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | | } |
| | | }else{ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | /** |
| | | * 点赞/取消点赞微心愿 |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 操作参数 |
| | | * @param comActMicroWishVO 操作参数 |
| | | * @return 操作结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R comActMicroWishVO(ComActMicroWishVO comActMicroWishVO) { |
| | | Integer haveGiveThumbsUp = comActMicroWishVO.getHaveGiveThumbsUp(); |
| | | Long userId = comActMicroWishVO.getSponsorId(); |
| | | Long microWishId = comActMicroWishVO.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = |
| | | comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda() |
| | | .eq(ComActMicroWishUserDO::getMicroWishId, microWishId).eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | boolean empty = ObjectUtils.isEmpty(comActMicroWishUserDO); |
| | | int num = 0; |
| | | if (haveGiveThumbsUp.intValue() == 1) { |
| | | if (empty) { |
| | | ComActMicroWishUserDO comActMicroWishUserDO1 = new ComActMicroWishUserDO(); |
| | | comActMicroWishUserDO1.setMicroWishId(microWishId); |
| | | comActMicroWishUserDO1.setUserId(userId); |
| | | num = comActMicroWishUserDAO.insert(comActMicroWishUserDO1); |
| | | } else { |
| | | return R.ok(); |
| | | } |
| | | } else { |
| | | if (empty) { |
| | | return R.ok(); |
| | | } else { |
| | | num = comActMicroWishUserDAO.deleteById(comActMicroWishUserDO.getId()); |
| | | //查询微心愿集心数并判断修改微心愿状态 |
| | | ComActMicroWishDO comActMicroWishDO=comActMicroWishDAO.selectById(microWishId); |
| | | Integer count=comActMicroWishUserDAO.selectCount(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, microWishId)); |
| | | if(comActMicroWishDO!=null&&comActMicroWishDO.getAimNum()!=null&&count<comActMicroWishDO.getAimNum()){ |
| | | if(comActMicroWishDO.getStatus()==ComActMicroWishDO.status.jx){ |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, microWishId).eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | boolean empty = ObjectUtils.isEmpty(comActMicroWishUserDO); |
| | | int num=0; |
| | | if (empty) { |
| | | ComActMicroWishUserDO comActMicroWishUserDO1=new ComActMicroWishUserDO(); |
| | | comActMicroWishUserDO1.setMicroWishId(microWishId); |
| | | comActMicroWishUserDO1.setUserId(userId); |
| | | num=comActMicroWishUserDAO.insert(comActMicroWishUserDO1); |
| | | }else{ |
| | | return R.fail("无法重新点心"); |
| | | } |
| | | if (num>0) { |
| | | if(count>=comActMicroWishDO.getAimNum()-1){ |
| | | comActMicroWishDO.setStatus(ComActMicroWishDO.status.dfp); |
| | | comActMicroWishDO.setFeedbackAt(DateUtil.date()); |
| | | comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | |
| | | //完成集心添加操作记录 |
| | | wishOperationRecordService.addOperationRecord("完成集心",comActMicroWishDO.getSponsorId() |
| | | ,comActMicroWishDO.getId(),ComActMicroWishOperationRecordDO.type.jx,"用户完成集心",null); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | | } |
| | | if (num > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | return R.fail("该微心愿不可点心"); |
| | | } |
| | | |
| | | /** |
| | | * 用户确认心愿 |
| | | * |
| | | * @param comActMicroWishVO |
| | | * 用户评价 |
| | | * @param comActMicroWishVO 用户评价 |
| | | * @return 确认结果 |
| | | */ |
| | | @Override |
| | |
| | | return R.fail("心愿不存在"); |
| | | } |
| | | Integer status = comActMicroWishDO1.getStatus(); |
| | | if (status.intValue() != 5) { |
| | | return R.fail("心愿状态不是待确认"); |
| | | if (!status.equals(ComActMicroWishDO.status.dqr)) { |
| | | return R.fail("心愿状态不是待确认状态"); |
| | | } |
| | | ComActMicroWishDO comActMicroWishDO = new ComActMicroWishDO(); |
| | | ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO(); |
| | | comActMicroWishDO.setId(comActMicroWishVO.getId()); |
| | | comActMicroWishDO.setEvaluateAt(comActMicroWishVO.getEvaluateAt()); |
| | | comActMicroWishDO.setStatus(comActMicroWishVO.getStatus()); |
| | | comActMicroWishDO.setScore(comActMicroWishVO.getScore()); |
| | | comActMicroWishDO.setEvaluate(comActMicroWishVO.getEvaluate()); |
| | | int update = comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | if (update > 0) { |
| | | if (update>0) { |
| | | //用户确认心愿添加操作记录 |
| | | wishOperationRecordService.addOperationRecord(comActMicroWishVO.getEvaluate(),comActMicroWishDO1.getSponsorId() |
| | | ,comActMicroWishDO1.getId(),ComActMicroWishOperationRecordDO.type.wc,"用户已确认",null); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | /** |
| | | * 社区首页代办事件集合 |
| | | * |
| | | * @param communityId |
| | | * 社区id |
| | | * @param userId |
| | | * 登录用户 |
| | | * @param communityId 社区id |
| | | * @param userId 登录用户 |
| | | * @return 代办事件集合 |
| | | */ |
| | | @Override |
| | | public List<TodoEventsVO> selectNeedToDo(Long communityId, Long userId) { |
| | | List<TodoEventsVO> todoEventsVOS = comActMicroWishDAO.selectNeedToDo(communityId, userId); |
| | | List<TodoEventsVO> todoEventsVOS=comActMicroWishDAO.selectNeedToDo(communityId,userId); |
| | | return todoEventsVOS; |
| | | } |
| | | |
| | | @Override |
| | | public R deleteMicroWish(Long id) { |
| | | ComActMicroWishDO comActMicroWishDO = comActMicroWishDAO.selectById(id); |
| | | if (comActMicroWishDO == null) { |
| | | if(comActMicroWishDO==null){ |
| | | return R.fail("id有误!"); |
| | | } |
| | | comActMicroWishDAO.deleteById(id); |
| | | comActMicroWishUserDAO |
| | | .delete(new LambdaQueryWrapper<ComActMicroWishUserDO>().eq(ComActMicroWishUserDO::getMicroWishId, id)); |
| | | comActMicroWishUserDAO.delete(new LambdaQueryWrapper<ComActMicroWishUserDO>().eq(ComActMicroWishUserDO::getMicroWishId,id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R timedTaskActMicroWishAll() { |
| | | int num = comActMicroWishDAO.updateStatusAutoConfirm(); |
| | | log.info("定时任务--修改待自动确认微心愿状态数量【{}】", num); |
| | | |
| | | //微心愿自动确认前需要添加操作记录 |
| | | List<Long> wishIds = comActMicroWishDAO.getWishAutoConfirmIds(); |
| | | wishIds.forEach(wishId -> { |
| | | //需要添加操作记录 |
| | | wishOperationRecordService.addOperationRecord("系统自动确认微心愿",null |
| | | ,wishId, ComActMicroWishOperationRecordDO.type.zd,"系统自动确认微心愿",null); |
| | | }); |
| | | int num=comActMicroWishDAO.updateStatusAutoConfirm(); |
| | | log.info("定时任务--修改待自动确认微心愿状态数量【{}】",num); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getScreenMicroList(ScreenMicroListDTO microListDTO) { |
| | | IPage<MicroListVO> microListVOIPage = comActMicroWishDAO |
| | | .getScreenMicroList(new Page(microListDTO.getPageNum(), microListDTO.getPageSize()), microListDTO); |
| | | if (!microListVOIPage.getRecords().isEmpty()) { |
| | | public R getScreenMicroList(ScreenMicroListDTO microListDTO){ |
| | | IPage<MicroListVO> microListVOIPage = comActMicroWishDAO.getScreenMicroList(new Page(microListDTO.getPageNum(),microListDTO.getPageSize()),microListDTO); |
| | | if(!microListVOIPage.getRecords().isEmpty()){ |
| | | microListVOIPage.getRecords().forEach(microListVO -> { |
| | | Integer count = comActMicroWishUserDAO.selectCount(new QueryWrapper<ComActMicroWishUserDO>().lambda() |
| | | .eq(ComActMicroWishUserDO::getMicroWishId, microListVO.getId())); |
| | | .eq(ComActMicroWishUserDO::getMicroWishId,microListVO.getId())); |
| | | microListVO.setStarNum(count); |
| | | }); |
| | | } |
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveSubServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideClassifyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthElderliesServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPensionAuthHistoryRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPensionAuthPensionerServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPensionAuthRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPensionAuthStatisticsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwDangerReportServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwPatrolRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwSafetyWorkRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActEvaluateMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussCommentDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussCommentUserDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussOptionDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussOptionUserDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussUserDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishFeedbackMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireAnswerContentDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveSubMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveSubSelectionMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWorkGuideClassifyMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWorkGuideDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthElderliesMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthRecordsMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthElderlyMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthHistoryRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthUserMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthHistoryRecordDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthPensionerMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthStatisticsMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwDangerReportMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/SysConfMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/test/java/com/panzhihua/service_community/ServiceCommunityApplicationTests.java
springcloud_k8s_panzhihuazhihuishequ/service_property/pom.xml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/netty/NettyServer.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/netty/NettyServerHandler.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/ComMngUserTagDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/RoleDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysOperLogDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserFeedbackDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserInputDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserNoticeDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/SysUserInputServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/ComMngFamilyInfoDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/ComMngStructHouseDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/ComMngUserTagDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/EventGridMemberBuildingRelationMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/LcCompareMemberCodeMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/RoleDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysMenuDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysOperLogDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysRoleMenuDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserAgreementDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserFeedbackDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserInputDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserNoticeDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/SysUserRoleDAO.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
springcloud_k8s_panzhihuazhihuishequ/service_user/src/test/java/com/panzhihua/service_user/dao/UserDaoTest.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/DiscussJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java |