Merge branch 'test' into 'zzj'
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java
# springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.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> |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("propertyRepair") |
| | | @Api(tags = "物业报修api") |
| | | public class ComPropertyRepairApi extends BaseController { |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation("小程序列表接口") |
| | | @PostMapping("/queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setUserId(this.getUserId()); |
| | | return this.propertyService.comPropertyRepairSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 小程序添加报修 |
| | | * @param comPropertyRepairVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("小程序添加报修") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | comPropertyRepairVO.setCreateTime(DateUtil.date()); |
| | | comPropertyRepairVO.setCreateBy(this.getUserId()); |
| | | comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dcl); |
| | | return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyRepairVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("小程序修改报修") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | if(comPropertyRepairVO!=null&& StringUtils.isNotEmpty(comPropertyRepairVO.getFeedbackContent())){ |
| | | comPropertyRepairVO.setFeedbackBy(this.getUserId()); |
| | | comPropertyRepairVO.setFeedbackTime(DateUtil.date()); |
| | | comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.dpj); |
| | | } |
| | | if(comPropertyRepairVO!=null&&StringUtils.isNotEmpty(comPropertyRepairVO.getReplyContent())){ |
| | | comPropertyRepairVO.setReplyTime(DateUtil.date()); |
| | | comPropertyRepairVO.setRepairStatus(ComPropertyRepairVO.status.yjs); |
| | | } |
| | | return this.propertyService.comPropertyRepairUpdate(comPropertyRepairVO); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @GetMapping("/{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.propertyService.comPropertyRepairSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除接口") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.propertyService.comPropertyRepairDelete(id); |
| | | } |
| | | |
| | | } |
| | |
| | | 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(); |
| | |
| | | } |
| | | 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() { |
| | |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | | } |
| | | }else{ |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","2"); |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1"); |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no); |
| | | } |
| | | }else{ |
| | | addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes); |
| | |
| | | |
| | | @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero) { |
| | | 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(); |
| | |
| | | if(isZero == null){ |
| | | isZero = 2; |
| | | } |
| | | return communityService.getNeighborTopicByApp(communityId,isZero); |
| | | return communityService.getNeighborTopicByApp(communityId,isZero,name); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户新增邻里圈话题") |
| | |
| | | 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: |
| | |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | /** |
| | | * 城管后台登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginCgBackage") |
| | | public R loginCgBackage(@RequestParam("account") String account, @RequestParam("password") String password) { |
| | | LoginReturnVO loginReturnVO = loginService.loginCgBackage(account, password); |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginGridBackstage(String account, String password); |
| | | |
| | | /** |
| | | * 城管后台登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginCgBackage(String account, String password); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | @Override |
| | | public LoginReturnVO loginCgBackage(String account, String password){ |
| | | Authentication authentication = null; |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_9", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | | } |
| | | |
| | | } |
| | |
| | | * 获取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 |
| | | */ |
| | |
| | | |
| | | /** 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"; |
| | | } |
| | |
| | | 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.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() { |
| | | 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_RECORD_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<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.isNotEmpty(oneData.get(5))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | setElderAuthMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | 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); |
| | | // 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 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.setIsAlive(map.get(5)); |
| | | } |
| | | } |
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; |
| | | |
| | | 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.isNotEmpty(oneData.get(5))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | setPensionAuthMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的健在(是/否)有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAlive(isOk); |
| | | } else { |
| | | vo.setIsAlive(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | 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)); |
| | | } |
| | | } |
| | |
| | | private String remark; |
| | | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | 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; |
| | | } |
| | | } |
| | |
| | | @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; |
| | | } |
| | |
| | | @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; |
| | | } |
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; |
| | | } |
| | |
| | | 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() { |
| | |
| | | @ApiModelProperty(value = "微信审核结果(1.通过 2.拒绝)",hidden = true) |
| | | private Integer wxExamineResult; |
| | | |
| | | @ApiModelProperty("用户新增邻里圈话题") |
| | | private String topicName; |
| | | |
| | | /** |
| | | * 是否需要审核(1.是 2.否) |
| | | */ |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.property; |
| | | |
| | | 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 CommonPage { |
| | | @ApiModelProperty("页数") |
| | | private Integer page; |
| | | @ApiModelProperty("条数") |
| | | private Integer size; |
| | | @ApiModelProperty("名称条件") |
| | | private String name; |
| | | @ApiModelProperty("状态") |
| | | private Integer status; |
| | | @ApiModelProperty("用户姓名") |
| | | private String username; |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | @ApiModelProperty("地址参数") |
| | | private String address; |
| | | @ApiModelProperty("创建开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginTime; |
| | | @ApiModelProperty("创建结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | @ApiModelProperty("系统用户姓名") |
| | | private Date systemName; |
| | | @ApiModelProperty("用户Id") |
| | | private Long userId; |
| | | @ApiModelProperty("参数id") |
| | | private Long paramId; |
| | | @ApiModelProperty("类型") |
| | | private Integer type; |
| | | @ApiModelProperty("状态开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date statusBeginTime; |
| | | @ApiModelProperty("状态结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date statusEndTime; |
| | | @ApiModelProperty("编号") |
| | | private String serialNo; |
| | | } |
| | |
| | | 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; |
| | |
| | | /** |
| | | * 操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 |
| | | */ |
| | | @ApiModelProperty("操作类型 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; |
| | | |
| | | } |
| | |
| | | private String photoPathList; |
| | | |
| | | @ApiModelProperty("当前页数") |
| | | private Long pageNum; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty("每页记录数") |
| | | private Long pageSize; |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | |
| | | 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 Integer isAlive; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | 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 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: 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 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 = "审核时间") |
| | | 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; |
| | | |
| | | @ApiModelProperty(value = "本期认证总人数") |
| | | private Integer authAmount; |
| | | |
| | | @ApiModelProperty(value = "本期认证成功人数") |
| | | private Integer authSucceedAmount; |
| | | |
| | | @ApiModelProperty(value = "本期未认证人数") |
| | | private Integer authNoAmount; |
| | | } |
| | |
| | | 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 Integer isAlive; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | 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 { |
| | |
| | | @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; |
| | | |
| | | } |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("详情") |
| | | public class ComPropertyAlarmDetailVO { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class ComPropertyAlarmSettingVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 触发间隔 |
| | | */ |
| | | @ApiModelProperty(value = "触发间隔") |
| | | private Integer triggerTime; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("") |
| | | public class ComPropertyAlarmVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备号 |
| | | */ |
| | | @ApiModelProperty(value = "设备号") |
| | | private String serialNo; |
| | | |
| | | /** |
| | | * 报警类型 1一键报警 2长时间无应答报警 |
| | | */ |
| | | @ApiModelProperty(value = "报警类型 1一键报警 2长时间无应答报警") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 位置信息 |
| | | */ |
| | | @ApiModelProperty(value = "位置信息") |
| | | private String position; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | /** |
| | | *居民姓名 |
| | | */ |
| | | @ApiModelProperty("居民姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 报警处理状态 0待处理 1已办结 |
| | | */ |
| | | @ApiModelProperty("处理状态") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 处理人 |
| | | */ |
| | | @ApiModelProperty("处理人") |
| | | private String solveName; |
| | | |
| | | /** |
| | | * 处理时间 |
| | | */ |
| | | @ApiModelProperty(value = "处理时间") |
| | | private Date solveTime; |
| | | |
| | | /** |
| | | * 处理内容 |
| | | */ |
| | | @ApiModelProperty(value = "处理内容") |
| | | private String solveContent; |
| | | |
| | | /** |
| | | * 处理人id |
| | | */ |
| | | @ApiModelProperty("处理人id") |
| | | private Long solveId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 处理图片 |
| | | */ |
| | | @ApiModelProperty("处理图片") |
| | | private String solveUrl; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("设备实体") |
| | | public class ComPropertyEquipmentVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | @ApiModelProperty(value = "设备编号") |
| | | private String serialNo; |
| | | |
| | | /** |
| | | * 报警位置 |
| | | */ |
| | | @ApiModelProperty(value = "报警位置") |
| | | private String position; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @ApiModelProperty(value = "经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @ApiModelProperty(value = "纬度") |
| | | private String latitude; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @ApiModelProperty(value = "设备名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 居民名称 |
| | | */ |
| | | @ApiModelProperty(value = "居民名称") |
| | | private String username; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | */ |
| | | @ApiModelProperty(value = "设备类型 1红外报警 2一键报警 ") |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.property; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class ComPropertyRepairVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 报修内容 |
| | | */ |
| | | @ApiModelProperty(value = "报修内容") |
| | | private String repairContent; |
| | | |
| | | /** |
| | | * 报修人 |
| | | */ |
| | | @ApiModelProperty(value = "报修人") |
| | | private String repairName; |
| | | |
| | | /** |
| | | * 报修手机 |
| | | */ |
| | | @ApiModelProperty(value = "报修手机") |
| | | private String repairPhone; |
| | | |
| | | /** |
| | | * 报修位置 |
| | | */ |
| | | @ApiModelProperty(value = "报修位置") |
| | | private String repairPosition; |
| | | |
| | | /** |
| | | * 状态 0 待处理 1待评价 2已结束 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0 待处理 1待评价 2已结束") |
| | | private Integer repairStatus; |
| | | |
| | | /** |
| | | * 报修时间 |
| | | */ |
| | | @ApiModelProperty(value = "报修时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 报修图片url |
| | | */ |
| | | @ApiModelProperty(value = "报修图片url") |
| | | private String repairUrl; |
| | | |
| | | /** |
| | | * 评价内容 |
| | | */ |
| | | @ApiModelProperty(value = "评价内容") |
| | | private String replyContent; |
| | | |
| | | /** |
| | | * 评价图片url |
| | | */ |
| | | @ApiModelProperty(value = "评价图片url") |
| | | private String replyUrl; |
| | | |
| | | /** |
| | | * 评价时间 |
| | | */ |
| | | @ApiModelProperty(value = "评价时间") |
| | | private Date replyTime; |
| | | |
| | | /** |
| | | * 报修人id |
| | | */ |
| | | @ApiModelProperty(value = "报修人id") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 反馈人id |
| | | */ |
| | | @ApiModelProperty(value = "反馈人id") |
| | | private Long feedbackBy; |
| | | |
| | | /** |
| | | * 反馈内容 |
| | | */ |
| | | @ApiModelProperty(value = "反馈内容") |
| | | private String feedbackContent; |
| | | |
| | | /** |
| | | * 反馈图片 |
| | | */ |
| | | @ApiModelProperty(value = "反馈图片") |
| | | private String feedbackUrl; |
| | | |
| | | /** |
| | | * 反馈时间 |
| | | */ |
| | | @ApiModelProperty(value = "反馈时间") |
| | | private Date feedbackTime; |
| | | |
| | | /** |
| | | * 评价星级 |
| | | */ |
| | | @ApiModelProperty(value = "评价星级") |
| | | private Integer replyScore; |
| | | |
| | | /** |
| | | * 物业id |
| | | */ |
| | | @ApiModelProperty(value = "物业id") |
| | | private Integer propertyId; |
| | | /** |
| | | * 反馈人 |
| | | */ |
| | | @ApiModelProperty(value = "反馈人名称") |
| | | private String feedback; |
| | | |
| | | /** |
| | | * 状态 0 待处理 1待评价 2已结束 |
| | | */ |
| | | public interface status{ |
| | | int dcl=0; |
| | | int dpj=1; |
| | | int yjs=2; |
| | | } |
| | | } |
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); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/loginGridBackstage") |
| | | R loginGridBackstage(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 城管后台登录 |
| | | * @param account 账号 |
| | | * @param password 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginCgBackage") |
| | | R loginCgBackage(@RequestParam("account") String account, @RequestParam("password") String password); |
| | | } |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 心愿详情 |
| | |
| | | @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); |
| | | |
| | | /** |
| | | * 确认导入实有人口(有则更新,无则新建) |
| | | * |
| | | * @param list |
| | |
| | | * @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查询实有人口电子档案信息 |
| | |
| | | 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(); |
| | | |
| | | /** |
| | | * 分页查询邻里圈 |
| | | * |
| | | * @param neighborCircleAppDTO |
| | |
| | | */ |
| | | @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 PageElderAuthRecordsDTO 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 |
| | | */ |
| | | R setPensionAuthType(@RequestParam("communityId") Long communityId, @RequestParam("type") Integer type); |
| | | |
| | | /** |
| | | * 小程序-查询疫苗分类列表 |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("/neighbor/getNeighborTopicByApp") |
| | | R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero); |
| | | 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 |
| | |
| | | */ |
| | | @PostMapping("/patrolRecord/safetyWorkRecord/page") |
| | | 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查询详情 |
| | |
| | | */ |
| | | @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查询详情 |
| | |
| | | * @param circleTopicAppDTO 请求参数 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/neighbor/circleTopicAppDTO") |
| | | @PostMapping("/neighbor/deleteNeighborByApp") |
| | | R deleteNeighborByApp(@RequestBody DeleteNeighborCircleAppDTO circleTopicAppDTO); |
| | | |
| | | /** |
| | |
| | | */ |
| | | @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); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.service.property; |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 物业接口 |
| | | */ |
| | | @FeignClient(name = "property") |
| | | public interface PropertyService { |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comPropertyRepair/queryAll") |
| | | R comPropertyRepairSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comPropertyRepair/{id}") |
| | | R comPropertyRepairSelectOne(@PathVariable("id") Integer id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyRepair 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comPropertyRepair") |
| | | R comPropertyRepairInsert(@RequestBody ComPropertyRepairVO comPropertyRepair); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyRepair 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comPropertyRepair/update") |
| | | R comPropertyRepairUpdate(@RequestBody ComPropertyRepairVO comPropertyRepair); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comPropertyRepair/del") |
| | | R comPropertyRepairDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 查询报警列表 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | @PostMapping("/comPropertyAlarm/queryAll") |
| | | R comPropertyAlarmSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comPropertyAlarm/{id}") |
| | | R comPropertyAlarmSelectOne(@PathVariable("id") Integer id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarm 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comPropertyAlarm") |
| | | R comPropertyAlarmInsert(@RequestBody ComPropertyAlarmVO comPropertyAlarm); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyAlarm 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comPropertyAlarm/update") |
| | | R comPropertyAlarmUpdate(@RequestBody ComPropertyAlarmVO comPropertyAlarm); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comPropertyAlarm/del") |
| | | R comPropertyAlarmDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comPropertyEquipment/queryAll") |
| | | R comPropertyEquipmentSelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comPropertyEquipment/{id}") |
| | | R comPropertyEquipmentSelectOne(@PathVariable("id") Integer id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyEquipment 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comPropertyEquipment") |
| | | R comPropertyEquipmentInsert(@RequestBody ComPropertyEquipmentVO comPropertyEquipment); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyEquipment 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comPropertyEquipment/update") |
| | | R comPropertyEquipmentUpdate(@RequestBody ComPropertyEquipmentVO comPropertyEquipment); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comPropertyEquipment/del") |
| | | R comPropertyEquipmentDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarmSettingVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comPropertyAlarmSetting") |
| | | R comPropertyAlarmSettingInsert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param communityId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comPropertyAlarmSetting") |
| | | R comPropertyAlarmSettingSelectOne(@RequestParam("communityId") Long communityId); |
| | | } |
| | |
| | | * @return 标签集合 |
| | | */ |
| | | @PostMapping("listtag/getTag") |
| | | R listTags(@RequestParam("communityId") Long communityId); |
| | | R listTags(); |
| | | |
| | | /** |
| | | * 添加SysUser信息 |
| | |
| | | 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 { |
| | |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveMakeRightExcelAdminVO.class) |
| | | excelWriter = EasyExcel.write(fileName, ComActReserveMakeDetailedExcelAdminVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("预约明细导出数据").build(); |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("comPropertyAlarm") |
| | | @Api(tags = "物业报警api") |
| | | public class ComPropertyAlarmApi extends BaseController { |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class) |
| | | @PostMapping("queryAll/noToken") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(2L); |
| | | return propertyService.comPropertyAlarmSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "详情",response = ComPropertyAlarmVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return propertyService.comPropertyAlarmSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarmVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) { |
| | | comPropertyAlarmVO.setCommunityId(this.getCommunityId()); |
| | | return propertyService.comPropertyAlarmInsert(comPropertyAlarmVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyAlarmVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value = "修改") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) { |
| | | comPropertyAlarmVO.setSolveId(this.getUserId()); |
| | | comPropertyAlarmVO.setSolveTime(DateUtil.date()); |
| | | return propertyService.comPropertyAlarmUpdate(comPropertyAlarmVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return propertyService.comPropertyAlarmDelete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("comPropertyAlarmSetting") |
| | | @Api(tags = "物业报警设置api") |
| | | public class ComPropertyAlarmSettingApi extends BaseController { |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("查询设置") |
| | | @GetMapping |
| | | public R selectOne() { |
| | | return this.propertyService.comPropertyAlarmSettingSelectOne(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarmSettingVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增或修改设置") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO) { |
| | | comPropertyAlarmSettingVO.setCommunityId(this.getCommunityId()); |
| | | return this.propertyService.comPropertyAlarmSettingInsert(comPropertyAlarmSettingVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("comPropertyEquipment") |
| | | @Api(tags = "物业设备api") |
| | | public class ComPropertyEquipmentApi extends BaseController { |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询",response = ComPropertyEquipmentVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return propertyService.comPropertyEquipmentSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "详情",response = ComPropertyEquipmentVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return propertyService.comPropertyEquipmentSelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyEquipmentVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) { |
| | | comPropertyEquipmentVO.setCommunityId(this.getCommunityId()); |
| | | comPropertyEquipmentVO.setCreateTime(DateUtil.date()); |
| | | return propertyService.comPropertyEquipmentInsert(comPropertyEquipmentVO); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyEquipmentVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation(value = "修改") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) { |
| | | return propertyService.comPropertyEquipmentUpdate(comPropertyEquipmentVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return propertyService.comPropertyEquipmentDelete(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.common.service.property.PropertyService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("propertyRepair") |
| | | @Api(tags = "物业报修api") |
| | | public class ComPropertyRepairApi extends BaseController { |
| | | @Resource |
| | | private PropertyService propertyService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "后台列表接口",response = ComPropertyRepairVO.class) |
| | | @PostMapping("/queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.propertyService.comPropertyRepairSelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 后台添加报修 |
| | | * @param comPropertyRepairVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("后台添加报修") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | comPropertyRepairVO.setCreateTime(DateUtil.date()); |
| | | comPropertyRepairVO.setCreateBy(this.getUserId()); |
| | | return this.propertyService.comPropertyRepairInsert(comPropertyRepairVO); |
| | | } |
| | | |
| | | /** |
| | | * 后台审核接口 |
| | | * |
| | | * @param comPropertyRepairVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("审核接口") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | if(comPropertyRepairVO!=null&& StringUtils.isNotEmpty(comPropertyRepairVO.getFeedbackContent())){ |
| | | comPropertyRepairVO.setFeedbackBy(this.getUserId()); |
| | | comPropertyRepairVO.setFeedbackTime(DateUtil.date()); |
| | | } |
| | | if(comPropertyRepairVO!=null&&StringUtils.isNotEmpty(comPropertyRepairVO.getReplyContent())){ |
| | | comPropertyRepairVO.setReplyTime(DateUtil.date()); |
| | | } |
| | | return this.propertyService.comPropertyRepairUpdate(comPropertyRepairVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除接口") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.propertyService.comPropertyRepairDelete(id); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @GetMapping("/{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.propertyService.comPropertyRepairSelectOne(id); |
| | | } |
| | | |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | 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.vos.community.*; |
| | | 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) { |
| | | 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(); |
| | | 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 = "/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 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.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(); |
| | | 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(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); |
| | | } |
| | | |
| | | private List<List<String>> headDataFilling() { |
| | | 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.add(head0); |
| | | list.add(head1); |
| | | list.add(head2); |
| | | list.add(head3); |
| | | list.add(head4); |
| | | list.add(head5); |
| | | return list; |
| | | } |
| | | } |
| | |
| | | return tokenService.logout(token); |
| | | } |
| | | |
| | | @ApiOperation(value = "城管平台登录", response = LoginReturnVO.class) |
| | | @PostMapping("cg/login") |
| | | public R cgLogin(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | boolean empty = ObjectUtils.isEmpty(account); |
| | | boolean empty1 = ObjectUtils.isEmpty(password); |
| | | if (empty || empty1) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | R r = tokenService.loginCgBackage(account, password); |
| | | return r; |
| | | } |
| | | |
| | | } |
| | |
| | | if(isOk.getData() != null){ |
| | | return isOk; |
| | | }else{ |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","2"); |
| | | isOk.setData("2"); |
| | | communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1"); |
| | | isOk.setData("1"); |
| | | return isOk; |
| | | } |
| | | } |
| | |
| | | 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: |
| | |
| | | <module>service_grid</module> |
| | | <!--网格治理-对接浪潮的市平台综治接口--> |
| | | <module>service_api</module> |
| | | <!--物业service--> |
| | | <module>service_property</module> |
| | | </modules> |
| | | <packaging>pom</packaging> |
| | | |
| | |
| | | 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()); |
| | |
| | | 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 cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | 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; |
| | | |
| | | @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); |
| | |
| | | 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 PageElderAuthRecordsDTO 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @GetMapping("getNeighborTopicByApp") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero); |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam("isZero") Integer isZero,@RequestParam("name") String name) { |
| | | return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId,isZero,name); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | 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") |
| | |
| | | "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`, " + |
| | |
| | | "w.`detail`, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "su.`name` responsible_name, " + |
| | | "su1.`name` responsible_name, " + |
| | | "w.score, " + |
| | | "w.img_width, " + |
| | | "w.finish_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 " + |
| | | "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 com_pb_service_team su ON w.responsible_id = su.id " + |
| | | "LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_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},'%') " + |
| | | " 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.`status` = #{comActMicroWishVO.status} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isPageMyWish==null'>" + |
| | | "AND w.`status` = 3 " + |
| | | "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 " + |
| | |
| | | "ORDER BY w.create_at desc "+ |
| | | "</script>") |
| | | IPage<ComActMicroWishVO> pageMicroWish(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | |
| | | IPage<ComActMicroWishVO> pageMicroWishApplets(Page page, @Param("comActMicroWishVO") ComActMicroWishVO comActMicroWishVO); |
| | | @Select("SELECT " + |
| | | "w.id, " + |
| | | "u.name sponsor_name, " + |
| | |
| | | "su.`name` responsible_name, " + |
| | | "w.form, " + |
| | | "w.reject_reason, " + |
| | | "w.community_id, " + |
| | | "w.examine_at, " + |
| | | "w.finish, " + |
| | | "w.finish_photo_path_list, " + |
| | |
| | | "w.evaluate " + |
| | | "FROM " + |
| | | "com_act_micro_wish w " + |
| | | "JOIN sys_user u ON w.sponsor_id = u.user_id " + |
| | | "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.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 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 " + |
| | |
| | | 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); |
| | | |
| | |
| | | + ",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" |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero); |
| | | List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId,@Param("isZero") Integer isZero,@Param("name") String name); |
| | | |
| | | /** |
| | | * 添加邻里圈话题热度 |
| | |
| | | * @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 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.dtos.community.PageElderAuthRecordsDTO; |
| | | 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.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationCommunityTagsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | 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") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | } |
| | |
| | | * @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.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 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.vos.community.*; |
| | | 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.ComPensionAuthRecordDO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @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); |
| | | } |
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); |
| | | |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | private Date createTime; |
| | | |
| | | /** |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 7反馈 8系统自动确认 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 反馈图片url |
| | | */ |
| | | private String imgUrl; |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | '}'; |
| | | } |
| | | /** |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 |
| | | *操作类型 1已提交 2审核通过 3 驳回 4完成集心 5 分配 6 完成 7反馈 8系统自动确认 |
| | | */ |
| | | public interface type{ |
| | | int ytj=1; |
| | |
| | | int jx=4; |
| | | int fp=5; |
| | | int wc=6; |
| | | int fk=7; |
| | | int zd=8; |
| | | } |
| | | } |
| | |
| | | * 题目选项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; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @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 com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 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.人脸认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | |
| | | /** |
| | | * 审核人员 |
| | | */ |
| | | 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; |
| | | } |
| | |
| | | */ |
| | | 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; |
| | | } |
| | | |
| | | } |
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; |
| | | |
| | | @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.*; |
| | | |
| | | 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.人脸认证) |
| | | */ |
| | | private Integer authMethod; |
| | | |
| | | /** |
| | | *认证期数 |
| | | */ |
| | | private String authPeriod; |
| | | /** |
| | | * 认证视频 |
| | | */ |
| | | private String authVideo; |
| | | /** |
| | | *审核人员 |
| | | */ |
| | | 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; |
| | | } |
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 |
| | |
| | | R getUserReward(Long userId, Long communityId); |
| | | |
| | | /** |
| | | * 获取首页弹窗接口 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 首页弹窗接口 |
| | | */ |
| | | R getUserRewards(Long userId, Long communityId); |
| | | |
| | | /** |
| | | * 读取用户随手拍奖励 |
| | | * |
| | | * @param userId |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * 心愿详情 |
| | | * |
| | |
| | | * 社区id |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero); |
| | | R getNeighborTopicByApp(Long communityId,Integer isZero,String name); |
| | | |
| | | /** |
| | | * 小程序-用户新增话题 |
| | |
| | | */ |
| | | 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.PageElderAuthRecordsDTO; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | 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(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskElderAuthStatisticsJobHandler(); |
| | | } |
| | |
| | | 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.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 com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | 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; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @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(); |
| | | } |
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 |
| | |
| | | |
| | | R getAuthHistoryExport(PageEldersAuthHistoryDTO pageEldersAuthElderlyDTO); |
| | | |
| | | R timedTaskEldersAuthJobHandler(); |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskEldersRecordAuthJobHandler(); |
| | | |
| | | } |
| | |
| | | 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("网络错误,请重试"); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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 |
| | |
| | | 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 org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | private ComActMicroWishFeedbackMapper comActMicroWishFeedbackMapper; |
| | | @Resource |
| | | private ComActMicroWishOperationRecordMapper comActMicroWishOperationRecordMapper; |
| | | @Resource |
| | | private ComActMicroWishOperationRecordService wishOperationRecordService; |
| | | /** |
| | | * 分页查询微心愿 |
| | | * |
| | |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActMicroWishVO> iPage = comActMicroWishDAO.pageMicroWish(page, 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); |
| | | } |
| | | 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 -> { |
| | |
| | | String feedbackPhotoPathList = comActMicroWishVO.getFeedbackPhotoPathList(); |
| | | ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO(); |
| | | comActMicroWishDO.setId(id); |
| | | Boolean isUpdate = false; |
| | | Date date = new Date(); |
| | | ComActMicroWishOperationRecordDO comActMicroWishOperationRecordDO=new ComActMicroWishOperationRecordDO(); |
| | | comActMicroWishOperationRecordDO.setCreateTime(date); |
| | |
| | | // 1 审核通过 2驳回 3分配人员 4发起活动 5反馈 |
| | | switch (type){ |
| | | case 1: |
| | | isUpdate = true; |
| | | if(!microWishDO.getStatus().equals(ComActMicroWishDO.status.dsh)){ |
| | | return R.fail("该微心愿已审核,不可重复审核"); |
| | | } |
| | |
| | | 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.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.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.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){ |
| | |
| | | comActMicroWishFeedbackDO.setImgUrl(feedbackPhotoPathList); |
| | | comActMicroWishFeedbackDO.setMicroId(comActMicroWishVO.getId()); |
| | | comActMicroWishFeedbackDO.setUserId(comActMicroWishVO.getUserId()); |
| | | if(comActMicroWishVO.getStatus() != null && comActMicroWishVO.getStatus().equals(ComActMicroWishDO.status.ywc)){ |
| | | comActMicroWishDO.setStatus(comActMicroWishVO.getStatus()); |
| | | 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); |
| | | return R.ok(); |
| | | 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(); |
| | |
| | | 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(); |
| | | } |
| | |
| | | return R.fail("心愿不存在"); |
| | | } |
| | | Integer status = comActMicroWishDO1.getStatus(); |
| | | if (!status.equals(ComActMicroWishDO.status.ywc)) { |
| | | return R.fail("心愿状态不是已完成状态"); |
| | | if (!status.equals(ComActMicroWishDO.status.dqr)) { |
| | | return R.fail("心愿状态不是待确认状态"); |
| | | } |
| | | ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO(); |
| | | comActMicroWishDO.setId(comActMicroWishVO.getId()); |
| | |
| | | comActMicroWishDO.setEvaluate(comActMicroWishVO.getEvaluate()); |
| | | int update = comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | if (update>0) { |
| | | //用户确认心愿添加操作记录 |
| | | wishOperationRecordService.addOperationRecord(comActMicroWishVO.getEvaluate(),comActMicroWishDO1.getSponsorId() |
| | | ,comActMicroWishDO1.getId(),ComActMicroWishOperationRecordDO.type.wc,"用户已确认",null); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | |
| | | @Override |
| | | public R timedTaskActMicroWishAll() { |
| | | |
| | | //微心愿自动确认前需要添加操作记录 |
| | | 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(); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleTopicService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComActNeighborCircleTopicMapper comActNeighborCircleTopicMapper; |
| | | @Resource |
| | | private ComActNeighborCircleTopicService comActNeighborCircleTopicService; |
| | | |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) { |
| | | neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone()); |
| | | } |
| | | //判断用户的话题是否是新增的 |
| | | if(StringUtils.isNotEmpty(addNeighborCircleAppDTO.getTopicName())){ |
| | | //新增邻里圈话题 |
| | | ComActNeighborCircleTopicDO circleTopicDO = comActNeighborCircleTopicMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>() |
| | | .lambda().eq(ComActNeighborCircleTopicDO::getCommunityId,neighborCircleDO.getCommunityId()) |
| | | .eq(ComActNeighborCircleTopicDO::getName,addNeighborCircleAppDTO.getTopicName())); |
| | | if(circleTopicDO == null){ |
| | | circleTopicDO = new ComActNeighborCircleTopicDO(); |
| | | circleTopicDO.setCommunityId(neighborCircleDO.getCommunityId()); |
| | | circleTopicDO.setName(addNeighborCircleAppDTO.getTopicName()); |
| | | circleTopicDO.setCreateBy(neighborCircleDO.getReleaseId()); |
| | | circleTopicDO.setCreateAt(new Date()); |
| | | circleTopicDO.setCount(0); |
| | | circleTopicDO.setHotNum(0L); |
| | | circleTopicDO.setStatus(ComActNeighborCircleTopicDO.status.yes); |
| | | comActNeighborCircleTopicMapper.insert(circleTopicDO); |
| | | } |
| | | neighborCircleDO.setTopicId(circleTopicDO.getId()); |
| | | } |
| | | //判断当前邻里圈是否需要审核 |
| | | if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){ |
| | |
| | | BeanUtils.copyProperties(commentDO, vo); |
| | | String name = user.getName() == null ? user.getNickName() : user.getName(); |
| | | vo.setUserName(name); |
| | | vo.setUserPhone(user.getPhone()); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | |
| | | * @return 邻里圈话题列表 |
| | | */ |
| | | @Override |
| | | public R getNeighborTopicByApp(Long communityId,Integer isZero){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero)); |
| | | public R getNeighborTopicByApp(Long communityId,Integer isZero,String name){ |
| | | return R.ok(this.baseMapper.getNeighborTopicByApp(communityId,isZero,name)); |
| | | } |
| | | |
| | | /** |
| | |
| | | subSelectionDO.setCreateBy(userId); |
| | | subSelectionDO.setType(subSelect.getType()); |
| | | subSelectionDO.setKey(subSelect.getKey()); |
| | | subSelectionDO.setUrl(subSelect.getUrl()); |
| | | subSelectionList.add(subSelectionDO); |
| | | } |
| | | } |
| | |
| | | } |
| | | if (vo.getAdverPositionApplication().equals(ComActQuestnaireDO.isOk.yes)) { |
| | | sb.append("首页应用,"); |
| | | } |
| | | if (vo.getIsCover().equals(ComActQuestnaireDO.isOk.yes)) { |
| | | sb.append("设置封面,"); |
| | | } |
| | | String advertPosition = sb.toString(); |
| | | if (advertPosition.length() > 0) { |
| | |
| | | new QueryWrapper<ComActQuestnaireSubDO>().lambda().eq(ComActQuestnaireSubDO::getQueId, questId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | if(!subDo.getType().equals(ComActQuestnaireSubDO.type.describe)){ |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | } |
| | | }); |
| | | questnaireAnswersDTO.setSubs(listSubVo); |
| | | /** |
| | | * 查询用户回答 |
| | | */ |
| | | List<ComActQuestnaireAnswerContentDO> questnaireAnswerContentDOList = |
| | | List<ComActQuestnaireAnswerContentVO> questnaireAnswerContentDOList = |
| | | questnaireAnswerContentDAO.selectListByQuestnaire(questId); |
| | | List<ComActQuestnaireAnswerContentVO> vos = new ArrayList<>(); |
| | | questnaireAnswerContentDOList.forEach(dos -> { |
| | | ComActQuestnaireAnswerContentVO vo = new ComActQuestnaireAnswerContentVO(); |
| | | BeanUtils.copyProperties(dos, vo); |
| | | vos.add(vo); |
| | | }); |
| | | questnaireAnswersDTO.setAnswers(vos); |
| | | questnaireAnswersDTO.setAnswers(questnaireAnswerContentDOList); |
| | | |
| | | return R.ok(questnaireAnswersDTO); |
| | | } |
| | |
| | | @Override |
| | | public R pageQuestnaireAnswer(PageQuestnaireAnswerDTO pageQuestnaireAnswerDTO) { |
| | | if (pageQuestnaireAnswerDTO.getPageNum() == null || pageQuestnaireAnswerDTO.getPageNum().longValue() == 0) { |
| | | pageQuestnaireAnswerDTO.setPageNum(1l); |
| | | pageQuestnaireAnswerDTO.setPageNum(1L); |
| | | } |
| | | if (pageQuestnaireAnswerDTO.getPageSize() == null || pageQuestnaireAnswerDTO.getPageSize().longValue() == 0) { |
| | | pageQuestnaireAnswerDTO.setPageSize(10l); |
| | | pageQuestnaireAnswerDTO.setPageSize(10L); |
| | | } |
| | | Page userPage = new Page(pageQuestnaireAnswerDTO.getPageNum(), pageQuestnaireAnswerDTO.getPageSize()); |
| | | IPage<ComActQuestnaireAnswerContentVO> doPager = |
| | |
| | | |
| | | Long queSubId = questnaireSubDO.getId(); |
| | | // 根据上传的类型查询不同的题目选项 |
| | | if (questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan)) { |
| | | |
| | | if (questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan) || questnaiteSub.getType().equals(QuestnaiteSubVO.type.imgselect)) { |
| | | // 单选题处理 |
| | | ComActQuestnaireSubSelectionDO subSelectionDO = |
| | | questnaireSubSelectionDAO.selectOne(new QueryWrapper<ComActQuestnaireSubSelectionDO>().lambda() |
| | |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } else if (questnaiteSub.getType().equals(QuestnaiteSubVO.type.wenda)) { |
| | | } else { |
| | | // 问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActQuestnaireAnswerContentDO answerContentDO = new ComActQuestnaireAnswerContentDO(); |
| | |
| | | } |
| | | // 新增用户填写的答卷 |
| | | if (!answerContentList.isEmpty()) { |
| | | answerContentService.saveBatch(answerContentList); |
| | | |
| | | // 更新回答用户数量 |
| | | Integer joinCount = questnaireDO.getJoinCount(); |
| | | questnaireDO.setJoinCount(joinCount != null ? joinCount + 1 : 1); |
| | |
| | | userAnswerDO.setJsonObject(answerQuestnaireVO.getJsonObject()); |
| | | comActQuestnaireUserAnswerMapper.insert(userAnswerDO); |
| | | |
| | | answerContentList.forEach(answerContent -> { |
| | | answerContent.setAnswerId(userAnswerDO.getId()); |
| | | }); |
| | | answerContentService.saveBatch(answerContentList); |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveAnswerContentMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireAnswerContentDO; |
| | |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda().eq(ComActReserveSubDO::getReserveId, reserveId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | if(!subDo.getType().equals(5)){ |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | } |
| | | }); |
| | | result.setSubs(listSubVo); |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO){ |
| | | IPage<HashMap<String,Object>> resultPage = new Page<>(); |
| | | IPage<HashMap<String,String>> resultPage = new Page<>(); |
| | | |
| | | IPage<ComActReserveRegisterDetailedVO> registerDetailedPage = this.baseMapper.pageRegisterDetailedListAdmin(new Page(detailedAdminDTO.getPageNum(),detailedAdminDTO.getPageSize()),detailedAdminDTO); |
| | | resultPage.setCurrent(registerDetailedPage.getCurrent()); |
| | |
| | | resultPage.setSize(registerDetailedPage.getSize()); |
| | | resultPage.setPages(registerDetailedPage.getPages()); |
| | | |
| | | List<HashMap<String,Object>> resultMapList = new ArrayList<>(); |
| | | Integer nub = 1; |
| | | List<HashMap<String,String>> resultMapList = new ArrayList<>(); |
| | | int nub = 1; |
| | | if(!registerDetailedPage.getRecords().isEmpty()){ |
| | | for (ComActReserveRegisterDetailedVO registerDetailed:registerDetailedPage.getRecords()) { |
| | | //渲染序号 |
| | | HashMap<String,Object> map = new HashMap<>(); |
| | | map.put("nub",nub); |
| | | HashMap<String,String> map = new HashMap<>(); |
| | | map.put("nub",nub + ""); |
| | | //渲染用户昵称 |
| | | map.put("nickName",registerDetailed.getNickName()); |
| | | //查询记录填写答案并装载到数据集中 |
| | | List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(registerDetailed.getId()); |
| | | if(!registerDetailedAnswerList.isEmpty()){ |
| | | for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | if(!detailed.getType().equals(5)){ |
| | | if(detailed.getType().equals(1)){ |
| | | String key = detailed.getReserveSubId() + ""; |
| | | String value = map.get(key); |
| | | if(StringUtils.isNotEmpty(value)){ |
| | | value = value + "," + detailed.getAnswerContent(); |
| | | }else{ |
| | | value = detailed.getAnswerContent(); |
| | | } |
| | | map.put(key,value); |
| | | }else{ |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //渲染登记流水号 |
| | | map.put("id",registerDetailed.getId()); |
| | | map.put("id",registerDetailed.getId() + ""); |
| | | //渲染登记时间 |
| | | map.put("time", DateUtils.format(registerDetailed.getCreateAt(),DateUtils.ymdhms_format)); |
| | | resultMapList.add(map); |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.common.model.dtos.community.CancelRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private ComActReserveOperationRecordMapper comActReserveOperationRecordMapper; |
| | | @Resource |
| | | private ComActReserveOperationRecordService comActReserveOperationRecordService; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | |
| | | private final static String CANCEL="用户取消"; |
| | | @Override |
| | |
| | | comActReserveDO.setJoinCount(joinCount != null ? joinCount - 1 : 0); |
| | | comActReserveMapper.updateById(comActReserveDO); |
| | | ComActReserveOperationRecordDO comActReserveOperationRecordDO=new ComActReserveOperationRecordDO(); |
| | | comActReserveOperationRecordDO.setRemark(comActReserveRecord.getContent()); |
| | | comActReserveOperationRecordDO.setReserveId(comActReserveRecordDO.getReserveId()); |
| | | comActReserveOperationRecordDO.setReserveRecordId(comActReserveRecordDO.getId()); |
| | | comActReserveOperationRecordDO.setType(ComActReserveOperationRecordDO.type.br); |
| | |
| | | comActReserveOperationRecordDO.setReserveContent(CANCEL); |
| | | comActReserveOperationRecordDO.setPhone(comActReserveRecordDO.getPhone()); |
| | | comActReserveOperationRecordDO.setStatus(ComActReserveOperationRecordDO.status.qx); |
| | | comActReserveOperationRecordDO.setUserId(comActReserveRecordDO.getUserId()); |
| | | comActReserveOperationRecordDO.setUserId(comActReserveRecord.getUserId()); |
| | | comActReserveOperationRecordDO.setReserveTime(DateUtil.date()); |
| | | comActReserveOperationRecordMapper.insert(comActReserveOperationRecordDO); |
| | | return R.ok(); |
| | |
| | | reserveRecordDTO.getIds().forEach(id -> { |
| | | ComActReserveRecordDO reserveRecordDO = comActReserveRecordMapper.selectById(id); |
| | | if(reserveRecordDO != null){ |
| | | //更新预约记录社区备注字段 |
| | | reserveRecordDO.setActRemark(reserveRecordDTO.getRemark()); |
| | | reserveRecordDO.setHandleId(userId); |
| | | comActReserveRecordMapper.updateById(reserveRecordDO); |
| | | //取消预约返还可参加名额 |
| | | comActReserveMapper.addReserveCountById(reserveRecordDO.getReserveId()); |
| | | //添加操作记录 |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,reserveRecordDO.getId(),reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员取消预约",reserveRecordDTO.getRemark(),ComActReserveOperationRecordDO.status.qx,userId,null); |
| | | ,"社区管理员取消预约",reserveRecordDTO.getRemark(),ComActReserveOperationRecordDO.status.qx,userId,new Date()); |
| | | } |
| | | }); |
| | | return R.ok(); |
| | |
| | | Date nowDate = new Date(); |
| | | Long userId = makeHandleDTO.getUserId(); |
| | | String remark = makeHandleDTO.getRemark(); |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | List<ComActReserveRecordDO> updateList = new ArrayList<>(); |
| | | makeHandleDTO.getIds().forEach(id -> { |
| | | ComActReserveRecordDO reserveRecordDO = this.baseMapper.selectById(id); |
| | | if(reserveRecordDO != null){ |
| | | Date reserveTime = DateUtils.stringToDate(makeHandleDTO.getMakeTime(),DateUtils.ymdhms_format); |
| | | |
| | | //查询预约登记信息 |
| | | ComActReserveDO reserveDO = comActReserveMapper.selectById(reserveRecordDO.getReserveId()); |
| | | // 预约以后给用户推送消息 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(reserveRecordDO.getUserId()); |
| | | |
| | | //判断处理是否通过 |
| | | if(makeHandleDTO.getIsOk().equals(MakeHandleAdminDTO.isOk.yes)){ |
| | | reserveRecordDO.setStatus(ComActReserveRecordDO.status.cg); |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,id,reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员处理预约成功",remark,ComActReserveOperationRecordDO.status.cg,userId,reserveTime); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxUtil.sendSubscribeYYTX(openid, util.getAppAccessToken(), "预约成功", |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), makeHandleDTO.getMakeTime()); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | }else if(makeHandleDTO.getIsOk().equals(MakeHandleAdminDTO.isOk.no)){ |
| | | reserveRecordDO.setStatus(ComActReserveRecordDO.status.sb); |
| | | comActReserveOperationRecordService.addReserveOperationRecord(reserveRecordDO.getReserveId() |
| | | ,id,reserveRecordDO.getUserId(),ComActReserveOperationRecordDO.type.sq,null |
| | | ,"社区管理员处理预约失败",remark,ComActReserveOperationRecordDO.status.sb,userId,null); |
| | | |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxUtil.sendSubscribeYYTX(openid, util.getAppAccessToken(), "预约失败", |
| | | reserveDO.getTitle(), reserveRecordDO.getName(), DateUtils.format(reserveRecordDO.getReserveTime(),DateUtils.ymdhms_format)); |
| | | } catch (Exception e) { |
| | | log.error("消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | //预约失败时需要更新预约登记参与人数 |
| | | comActReserveMapper.addReserveCountById(reserveRecordDO.getReserveId()); |
| | | } |
| | | reserveRecordDO.setActRemark(remark); |
| | | reserveRecordDO.setReserveTime(reserveTime); |
| | | reserveRecordDO.setUpdateAt(nowDate); |
| | | reserveRecordDO.setUpdateBy(userId); |
| | | reserveRecordDO.setHandleId(userId); |
| | | updateList.add(reserveRecordDO); |
| | | } |
| | | }); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.model.dtos.community.OperationDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActReserveIndexVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubSelectionVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | |
| | | if(comActReserveDO!=null){ |
| | | //查询当前用户是否已预约并判断是否能继续预约 |
| | | if(comActReserveDO.getJoinAllCount()!=0){ |
| | | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId())); |
| | | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>() |
| | | .eq("reserve_id",comActReserveCommitVO.getId()) |
| | | .eq("status",ComActReserveRecordDO.status.cg)); |
| | | if(count>=comActReserveDO.getJoinAllCount()){ |
| | | return R.fail("预约已上限"); |
| | | } |
| | | } |
| | | |
| | | |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); |
| | | if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ |
| | |
| | | |
| | | Long queSubId = questnaireSubDO.getId(); |
| | | //根据上传的类型查询不同的题目选项 |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan)){ |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan) || questnaiteSub.getType().equals(QuestnaiteSubVO.type.imgselect)){ |
| | | |
| | | //单选题处理 |
| | | ComActReserveSubSelectionDO subSelectionDO = comActReserveSubSelectionMapper.selectOne(new QueryWrapper<ComActReserveSubSelectionDO>() |
| | |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | }else{ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(2); |
| | | answerContentDO.setAnswerContent(values); |
| | | answerContentList.add(answerContentDO); |
| | | //文字描述不做处理 |
| | | if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)){ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setUserId(userId); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setCreateBy(userId); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(2); |
| | | answerContentDO.setAnswerContent(values); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } |
| | | } |
| | | if(!answerContentList.isEmpty()){ |
| | |
| | | subSelectionDO.setCreateAt(nowDate); |
| | | subSelectionDO.setType(subSelect.getType()); |
| | | subSelectionDO.setKey(subSelect.getKey()); |
| | | subSelectionDO.setUrl(subSelect.getUrl()); |
| | | subSelectionList.add(subSelectionDO); |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R pageReserveList(PageUserReserveDTO pageUserReserveDTO) { |
| | | return R.ok(comActReserveRecordMapper.pageReserveList(new Page<ComActReserveDO>(pageUserReserveDTO.getPageNum(), pageUserReserveDTO.getPageSize()),pageUserReserveDTO)); |
| | | IPage<ComActReserveAppletsVO> ipage = comActReserveRecordMapper.pageReserveList(new Page<>(pageUserReserveDTO.getPageNum(), pageUserReserveDTO.getPageSize()),pageUserReserveDTO); |
| | | OperationDetailDTO operationDetailDTO = new OperationDetailDTO(); |
| | | ipage.getRecords().forEach(page -> { |
| | | operationDetailDTO.setReserveRecordId(page.getId()); |
| | | List<ComOperationListVO> operationList = comActReserveRecordMapper.queryAll(operationDetailDTO); |
| | | page.setOperationList(operationList); |
| | | }); |
| | | return R.ok(ipage); |
| | | } |
| | | |
| | | /** |
| | | * 小程序查询所有进行中的预约登记 |
| | | * @param communityId 社区id |
| | | * @return 社区所有进行中的预约登记列表 |
| | | */ |
| | | @Override |
| | | public R reserveListApplets(Long communityId){ |
| | | return R.ok(this.baseMapper.getReserveIndexList(communityId)); |
| | | } |
| | | } |
| | |
| | | List<ComActReserveSubListVO> resultList = new ArrayList<>(100); |
| | | resultList.add(new ComActReserveSubListVO("nub","序号")); |
| | | resultList.add(new ComActReserveSubListVO("nickName","用户昵称")); |
| | | List<ComActReserveSubListVO> list = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(list != null && !list.isEmpty()){ |
| | | resultList.addAll(list); |
| | | List<ComActReserveSubListVO> subList = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(subList != null && !subList.isEmpty()){ |
| | | subList.forEach(list -> { |
| | | if(!list.getType().equals(5)){ |
| | | resultList.add(list); |
| | | } |
| | | }); |
| | | // resultList.addAll(list); |
| | | } |
| | | resultList.add(new ComActReserveSubListVO("id","登记流水")); |
| | | resultList.add(new ComActReserveSubListVO("time","登记时间")); |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.enums.PopulCultureLevelEnum; |
| | | import com.panzhihua.common.enums.PopulMarriageEnum; |
| | | import com.panzhihua.common.enums.PopulPoliticalOutlookEnum; |
| | | import com.panzhihua.common.enums.PopulRelationEnum; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngUserTagDO; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideClassifyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComActWorkGuideClassifyServiceImpl 社区》办事指南》分类管理服务实现类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区》办事指南》分类管理服务实现类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/8/31 14:21 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActWorkGuideClassifyServiceImpl extends ServiceImpl<ComActWorkGuideClassifyDAO, ComActWorkGuideClassifyDO> implements ComActWorkGuideClassifyService { |
| | | |
| | | @Resource |
| | | private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO; |
| | | @Resource |
| | | private ComActWorkGuideDAO comActWorkGuideDAO; |
| | | |
| | | @Override |
| | | public R pageWorkGuideClassify(ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = comActWorkGuideClassifyVO.getPageNum(); |
| | | Long pageSize = comActWorkGuideClassifyVO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1L; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10L; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | |
| | | IPage<ComActWorkGuideClassifyVO> iPage = comActWorkGuideClassifyDAO.pageWorkGuideClassify(page, comActWorkGuideClassifyVO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R addWorkGuideClassify(ComActWorkGuideClassifyVO comActWorkGuideClassifyVO) { |
| | | if (null != comActWorkGuideClassifyVO.getId() && comActWorkGuideClassifyVO.getId() != 0) { |
| | | // 修改 |
| | | ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = comActWorkGuideClassifyDAO.selectById(comActWorkGuideClassifyVO.getId()); |
| | | if (null == comActWorkGuideClassifyDO) { |
| | | return R.fail("该办事指南分类不存在"); |
| | | } |
| | | ComActWorkGuideClassifyDO checkCreditCode = comActWorkGuideClassifyDAO.selectOne( |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda().eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName())); |
| | | if (null != checkCreditCode && !comActWorkGuideClassifyDO.getId().equals(checkCreditCode.getId())) { |
| | | return R.fail("该办事指南分类已存在,办事指南分类名称重复"); |
| | | } |
| | | |
| | | BeanUtils.copyProperties(comActWorkGuideClassifyVO, comActWorkGuideClassifyDO); |
| | | int update = comActWorkGuideClassifyDAO.updateById(comActWorkGuideClassifyDO); |
| | | if (update > 0) { |
| | | return R.ok(); |
| | | } |
| | | } else { |
| | | // 新增 |
| | | Integer count = comActWorkGuideClassifyDAO.selectCount( |
| | | new QueryWrapper<ComActWorkGuideClassifyDO>().lambda().eq(ComActWorkGuideClassifyDO::getClassifyName, comActWorkGuideClassifyVO.getClassifyName())); |
| | | if (count > 0) { |
| | | return R.fail("该办事指南分类已存在,办事指南分类名称重复"); |
| | | } |
| | | ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = new ComActWorkGuideClassifyDO(); |
| | | BeanUtils.copyProperties(comActWorkGuideClassifyVO, comActWorkGuideClassifyDO); |
| | | int insert = comActWorkGuideClassifyDAO.insert(comActWorkGuideClassifyDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteWorkGuideClassify(Long workGuideClassifyId) { |
| | | // 查询特殊群体人员 |
| | | ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = comActWorkGuideClassifyDAO.selectById(workGuideClassifyId); |
| | | if (comActWorkGuideClassifyDO == null) { |
| | | return R.fail("办事指南分类不存在"); |
| | | } |
| | | |
| | | Integer count = comActWorkGuideDAO.selectCount(new QueryWrapper<ComActWorkGuideDO>() |
| | | .lambda().eq(ComActWorkGuideDO::getClassify,workGuideClassifyId)); |
| | | if(count > 0){ |
| | | return R.fail("该分类下存在办事指南,不可删除"); |
| | | } |
| | | |
| | | int delete = comActWorkGuideClassifyDAO.deleteById(workGuideClassifyId); |
| | | if (delete > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R getWorkGuideClassifyList() { |
| | | List<ComActWorkGuideClassifyDO> comActWorkGuideClassifyDOS = comActWorkGuideClassifyDAO.selectList(null); |
| | | List<ComActWorkGuideClassifyVO> comActWorkGuideClassifyVOList = new ArrayList<>(); |
| | | if (comActWorkGuideClassifyDOS != null && comActWorkGuideClassifyDOS.size() > 0) { |
| | | comActWorkGuideClassifyDOS.forEach(comActWorkGuideClassifyDO -> { |
| | | ComActWorkGuideClassifyVO comActWorkGuideClassifyVO = new ComActWorkGuideClassifyVO(); |
| | | BeanUtils.copyProperties(comActWorkGuideClassifyDO, comActWorkGuideClassifyVO); |
| | | comActWorkGuideClassifyVOList.add(comActWorkGuideClassifyVO); |
| | | }); |
| | | } |
| | | return R.ok(comActWorkGuideClassifyVOList); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO; |
| | | import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO; |
| | | import com.panzhihua.service_community.service.ComActWorkGuideClassifyService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | static String AK = "W3x8DhCWKc2UFIwYgclpRBdL6BeGLLQt"; // 百度地图密钥 |
| | | @Resource |
| | | ComActWorkGuideMaterialDAO workGuideMaterialDAO; |
| | | @Resource |
| | | private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO; |
| | | @Resource |
| | | ComActDAO comActDAO; |
| | | |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActWorkGuideVO> iPage = this.baseMapper.pageWorkGuide(page, pageActWorkGuideDTO); |
| | | if (!iPage.getRecords().isEmpty()) { |
| | | iPage.getRecords().forEach(comActWorkGuideVO -> { |
| | | ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = comActWorkGuideClassifyDAO.selectById(comActWorkGuideVO.getClassify()); |
| | | if (comActWorkGuideClassifyDO != null) { |
| | | comActWorkGuideVO.setClassifyName(comActWorkGuideClassifyDO.getClassifyName()); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | .eq(ComActWorkGuideMaterialDO::getWorkGuideId, workGuideId)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 办事指南列表-按分类查询 |
| | | * @param pageActWorkGuideDTO 请求参数 |
| | | * @return 办事指南分类列表 |
| | | */ |
| | | @Override |
| | | public R listWorkGuide(PageActWorkGuideDTO pageActWorkGuideDTO){ |
| | | //结果数据集合 |
| | | List<ComActWorkGuideAppletsVO> resultList = new ArrayList<>(); |
| | | |
| | | List<ComActWorkGuideAppletsVO> workGuideClassifyList = comActWorkGuideClassifyDAO.listWorkGuideClassify(); |
| | | //通过办事指南分类查询分类下办事指南 |
| | | workGuideClassifyList.forEach(workGuideClassify -> { |
| | | List<ComActWorkGuideDetailAppletsVO> workGuideList = this.baseMapper.getWorkGuideListByClassifyId(workGuideClassify.getId(),10L); |
| | | if(workGuideList != null && workGuideList.size() > 0){ |
| | | workGuideClassify.setGuideDetailList(workGuideList); |
| | | //分类下办事指南数据大于0加入到结果集中向小程序展示 |
| | | resultList.add(workGuideClassify); |
| | | } |
| | | }); |
| | | return R.ok(resultList); |
| | | } |
| | | |
| | | /** |
| | | * 根据办事指南分类id查询办事指南列表 |
| | | * @param classifyId 办事指南分类id |
| | | * @return 办事指南列表数据 |
| | | */ |
| | | @Override |
| | | public R listWorkGuideByClassifyId(Long classifyId){ |
| | | return R.ok(this.baseMapper.getWorkGuideListByClassifyId(classifyId,null)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComElderAuthElderliesDAO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthElderliesService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesServiceImpl 社区政务》高龄老人认证》高龄老人表服务实现类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》高龄老人表服务实现类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComElderAuthElderliesServiceImpl extends ServiceImpl<ComElderAuthElderliesDAO, ComElderAuthElderliesDO> implements ComElderAuthElderliesService { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.base.Joiner; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsServiceImpl 社区政务》高龄老人认证》认证记录表服务实现类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * description: 社区政务》高龄老人认证》认证记录表服务实现类 |
| | | * |
| | | * @author txb |
| | | * @date 2021/9/01 14:12 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComElderAuthRecordsServiceImpl extends ServiceImpl<ComElderAuthRecordsDAO, ComElderAuthRecordsDO> implements ComElderAuthRecordsService { |
| | | |
| | | @Resource |
| | | private ComElderAuthRecordsDAO comElderAuthRecordsDAO; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | @Resource |
| | | private ComMngPopulationDAO comMngPopulationDAO; |
| | | @Resource |
| | | private ComElderAuthRecordsService comElderAuthRecordsService; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | @Override |
| | | public R pageElderAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageElderAuthRecordsDTO.getPageNum(); |
| | | Long pageSize = pageElderAuthRecordsDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1L; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10L; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComElderAuthRecordVO> iPage = comElderAuthRecordsDAO.pageElderAuthRecords(page, pageElderAuthRecordsDTO); |
| | | if (!iPage.getRecords().isEmpty()) { |
| | | iPage.getRecords().forEach(comElderAuthRecordVO -> { |
| | | if (StringUtils.isNotEmpty(comElderAuthRecordVO.getBirthday())) { |
| | | comElderAuthRecordVO.setAge(AgeUtils.getAgeFromBirthTimes(comElderAuthRecordVO.getBirthday())); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R detailElderAuthRecords(Long authRecordId) { |
| | | ComElderAuthRecordVO comElderAuthRecordVO = comElderAuthRecordsDAO.detailElderAuthRecords(authRecordId); |
| | | return R.ok(comElderAuthRecordVO); |
| | | } |
| | | |
| | | @Override |
| | | public R examineElderAuthRecords(ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = comElderAuthRecordsDAO.selectById(comElderAuthRecordVO.getId()); |
| | | if (comElderAuthRecordsDO == null) { |
| | | return R.fail("未查询到高龄老人认证记录"); |
| | | } |
| | | BeanUtils.copyProperties(comElderAuthRecordVO, comElderAuthRecordsDO); |
| | | if (comElderAuthRecordVO.getApprovalStatus().equals(3)) { |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | } |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | int nub = comElderAuthRecordsDAO.updateById(comElderAuthRecordsDO); |
| | | if (nub < 1) { |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R signElderAuthRecords(ComElderAuthRecordVO comElderAuthRecordVO) { |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = comElderAuthRecordsDAO.selectById(comElderAuthRecordVO.getId()); |
| | | if (comElderAuthRecordsDO == null) { |
| | | return R.fail("未查询到高龄老人认证记录"); |
| | | } |
| | | BeanUtils.copyProperties(comElderAuthRecordVO, comElderAuthRecordsDO); |
| | | int nub = comElderAuthRecordsDAO.updateById(comElderAuthRecordsDO); |
| | | if (nub < 1) { |
| | | return R.fail("标记失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getElderAuthRecordsByIds(List<Long> ids) { |
| | | List<ComElderAuthRecordExcleVO> comElderAuthRecordExcleVOS = comElderAuthRecordsDAO.getElderAuthRecordsByIds(ids); |
| | | if (null != comElderAuthRecordExcleVOS && comElderAuthRecordExcleVOS.size() > 0) { |
| | | comElderAuthRecordExcleVOS.forEach(comElderAuthRecordExcleVO -> { |
| | | if (StringUtils.isNotEmpty(comElderAuthRecordExcleVO.getBirthday())) { |
| | | comElderAuthRecordExcleVO.setAge(AgeUtils.getAgeFromBirthTimes(comElderAuthRecordExcleVO.getBirthday())); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comElderAuthRecordExcleVOS); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSaveElderAuthRecordExcelVO(List<ComElderAuthRecordImportExcelVO> list, Long communityId, Long userId) { |
| | | // 需要新增的认证记录集合 |
| | | List<ComElderAuthRecordsDO> saveList = new ArrayList<>(); |
| | | // 需要修改的认证记录集合 |
| | | List<ComElderAuthRecordsDO> updateList = new ArrayList<>(); |
| | | log.info("开始处理导入数据"); |
| | | List<ComElderAuthRecordImportMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = comMngPopulationDAO.selectList(null); |
| | | HashMap<String, Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | |
| | | for (ComElderAuthRecordImportExcelVO vo : list) { |
| | | String cardNoAES = AESUtil.encrypt128(vo.getIdCard(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | String populationKey = vo.getIdCard(); |
| | | if (!isOnly(populationKey, populationMap)) { |
| | | // 存在实有人口信息,则查询高龄信息(是否符合认证条件(健在且登记了高龄认证)) |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>() |
| | | .lambda().eq(ComElderAuthElderliesDO::getPopulationId, populationDO.getId()).eq(ComElderAuthElderliesDO::getCommunityId, communityId)); |
| | | //不存在高龄信息,需要先导入高龄信息 |
| | | if (null == comElderAuthElderliesDO) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在,但本社区不存在高龄信息,请先导入高龄人口"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在高龄信息,判断是否满足认证条件 |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | | if (age < 80 || !comElderAuthElderliesDO.getIsRegister().equals(1) || !comElderAuthElderliesDO.getIsAlive().equals(1)) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口未满80岁,或者不健在,或者未做高龄老人登记"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //满足认证条件,判断是否存在当期认证记录 |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = null; |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | String authPeriod = ""; |
| | | if (month < 10) { |
| | | authPeriod = String.valueOf(year) + "0" + String.valueOf(month); |
| | | }else { |
| | | authPeriod = String.valueOf(year) + String.valueOf(month); |
| | | } |
| | | comElderAuthRecordsDO = comElderAuthRecordsDAO.selectOne(new QueryWrapper<ComElderAuthRecordsDO>().lambda(). |
| | | eq(ComElderAuthRecordsDO::getElderliesId, comElderAuthElderliesDO.getId()).eq(ComElderAuthRecordsDO::getAuthPeriod, authPeriod)); |
| | | if (null != comElderAuthRecordsDO) { |
| | | //存在记录且状态为已认证,不能修改 |
| | | if (comElderAuthRecordsDO.getAuthStatus().equals(1)) { |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口本期已认证,不能修改"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在记录,执行修改 |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO1 = |
| | | updateElderAuthRecordsDO(vo, comElderAuthRecordsDO, userId); |
| | | updateList.add(comElderAuthRecordsDO1); |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该认证已存在,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | }else { |
| | | // 不存在记录,则新增 |
| | | comElderAuthRecordsDO = saveElderAuthRecordsDO(vo, comElderAuthElderliesDO, authPeriod, userId); |
| | | saveList.add(comElderAuthRecordsDO); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | // 不存在实有人口,则新增 |
| | | ComElderAuthRecordImportMistakeExcelVO mistake = new ComElderAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("不存在该实有人口,请先导入实有人口信息"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | log.info("处理完成导入数据"); |
| | | |
| | | log.info("开始执行数据库导入"); |
| | | if (!saveList.isEmpty()) { |
| | | log.info("执行数据库导入线下认证记录"); |
| | | comElderAuthRecordsService.saveBatch(saveList); |
| | | log.info("数据库导入线下认证记录完成"); |
| | | } |
| | | if (!updateList.isEmpty()) { |
| | | log.info("执行数据库更新线下认证记录"); |
| | | comElderAuthRecordsDAO.updateAll(updateList); |
| | | log.info("数据库更新线下认证记录完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("返回错误数据"); |
| | | return R.fail(mistakes); |
| | | } |
| | | return R.ok(mistakes); |
| | | } |
| | | |
| | | @Override |
| | | public R exportElderAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | List<ComElderAuthRecordStatisticExcleVO> comElderAuthRecordStatisticExcleVOS = comElderAuthRecordsDAO.exportElderAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | if (null != comElderAuthRecordStatisticExcleVOS && comElderAuthRecordStatisticExcleVOS.size() > 0) { |
| | | comElderAuthRecordStatisticExcleVOS.forEach(comElderAuthRecordStatisticExcleVO -> { |
| | | if (StringUtils.isNotEmpty(comElderAuthRecordStatisticExcleVO.getBirthday())) { |
| | | comElderAuthRecordStatisticExcleVO.setAge(AgeUtils.getAgeFromBirthTimes(comElderAuthRecordStatisticExcleVO.getBirthday())); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comElderAuthRecordStatisticExcleVOS); |
| | | } |
| | | |
| | | @Override |
| | | public R timedTaskElderAuthStatisticsJobHandler() { |
| | | Date nowDate = new Date(); |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | int year = DateUtils.getYear(nowDate); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | actList.forEach(act -> { |
| | | //高龄认证统计本期应认证人数 |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = new ComEldersAuthStatisticsDO(); |
| | | comEldersAuthStatisticsDO.setCommunityId(act.getCommunityId()); |
| | | comEldersAuthStatisticsDO.setMonth(month); |
| | | comEldersAuthStatisticsDO.setYear(year); |
| | | comEldersAuthStatisticsDO.setCreateAt(nowDate); |
| | | List<ComElderAuthElderliesDO> comElderAuthElderliesDOS = comElderAuthElderliesDAO.selectList(new QueryWrapper<ComElderAuthElderliesDO>().lambda() |
| | | .eq(ComElderAuthElderliesDO::getCommunityId, act.getCommunityId()) |
| | | .eq(ComElderAuthElderliesDO::getIsAlive, 1) |
| | | .eq(ComElderAuthElderliesDO::getIsRegister, 1)); |
| | | if (null != comElderAuthElderliesDOS) { |
| | | comEldersAuthStatisticsDO.setSum(comElderAuthElderliesDOS.size()); |
| | | } |
| | | comEldersAuthStatisticsMapper.insert(comEldersAuthStatisticsDO); |
| | | //上期已认证人数 |
| | | String authPeriod = ""; |
| | | if (month < 10) { |
| | | authPeriod = String.valueOf(year) + 0 + month; |
| | | } else { |
| | | authPeriod = String.valueOf(year) + month; |
| | | } |
| | | int authSum = comElderAuthElderliesDAO.haveElderAuthElderliesAmount(act.getCommunityId(), authPeriod); |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO1 = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, act.getCommunityId()).eq(ComEldersAuthStatisticsDO::getYear, year) |
| | | .eq(ComEldersAuthStatisticsDO::getMonth, month - 1)); |
| | | comEldersAuthStatisticsDO1.setAuthSum(authSum); |
| | | comEldersAuthStatisticsDO1.setNoAuthSum(comEldersAuthStatisticsDO1.getSum() - comEldersAuthStatisticsDO1.getAuthSum()); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO1); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComElderAuthRecordsDO updateElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo, ComElderAuthRecordsDO comElderAuthRecordsDO, Long userId) { |
| | | BeanUtils.copyProperties(vo, comElderAuthRecordsDO); |
| | | comElderAuthRecordsDO.setSubmitUserId(userId); |
| | | comElderAuthRecordsDO.setApproverId(userId); |
| | | comElderAuthRecordsDO.setApprovalStatus(3); |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | return comElderAuthRecordsDO; |
| | | } |
| | | |
| | | private ComElderAuthRecordsDO saveElderAuthRecordsDO(ComElderAuthRecordImportExcelVO vo, ComElderAuthElderliesDO comElderAuthElderliesDO, String authPeriod, Long userId) { |
| | | ComElderAuthRecordsDO comElderAuthRecordsDO = new ComElderAuthRecordsDO(); |
| | | BeanUtils.copyProperties(vo, comElderAuthRecordsDO); |
| | | comElderAuthRecordsDO.setId(Snowflake.getId()); |
| | | comElderAuthRecordsDO.setElderliesId(comElderAuthElderliesDO.getId()); |
| | | comElderAuthRecordsDO.setAuthPeriod(authPeriod); |
| | | comElderAuthRecordsDO.setSubmitUserId(userId); |
| | | comElderAuthRecordsDO.setApproverId(userId); |
| | | comElderAuthRecordsDO.setApprovalStatus(3); |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | comElderAuthRecordsDO.setAuthStatus(1); |
| | | return comElderAuthRecordsDO; |
| | | } |
| | | |
| | | private void setMistake(ComElderAuthRecordImportMistakeExcelVO mvo, |
| | | ComElderAuthRecordImportExcelVO vo) { |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判重方法 |
| | | * |
| | | * @param key |
| | | * 主键 |
| | | * @param hashMap |
| | | * 数据集 |
| | | * @return 存在即为false 不存在则为true |
| | | */ |
| | | private boolean isOnly(String key, HashMap<String, Object> hashMap) { |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | |
| | | } |
| | |
| | | lastestOne.setIdCard(null); |
| | | lastestOne.setDomicile(eldersAuthService.queryDomicile(e.getIdCard())); |
| | | lastestOne.setIsExist(Objects.equals("是", e.getIsExist()) ? 1 : 2); |
| | | lastestOne.setIsBigAge(Objects.equals("是", e.getIsExist()) ? 1 : 2); |
| | | lastestOne.setIsBigAge(Objects.equals("是", e.getIsBigAge()) ? 1 : 2); |
| | | lastestOne.setUpdateAt(new Date()); |
| | | listUpdateDO.add(lastestOne); |
| | | } else { |
| | |
| | | comEldersAuthElderlyDO.setCreateBy(createBy); |
| | | comEldersAuthElderlyDO.setDomicile(eldersAuthService.queryDomicile(e.getIdCard())); |
| | | comEldersAuthElderlyDO.setIsExist(Objects.equals("是", e.getIsExist()) ? 1 : 2); |
| | | comEldersAuthElderlyDO.setIsBigAge(Objects.equals("是", e.getIsExist()) ? 1 : 2); |
| | | comEldersAuthElderlyDO.setIsBigAge(Objects.equals("是", e.getIsBigAge()) ? 1 : 2); |
| | | comEldersAuthElderlyDO.setBirthday(e.getBirthday()); |
| | | comEldersAuthElderlyDO.setLevel(e.getLevel()); |
| | | listNewDO.add(comEldersAuthElderlyDO); |
| | |
| | | @Override |
| | | public R updateEldersAuthElderly(EldersAuthElderlyDTO eldersAuthElderlyDTO) { |
| | | ComEldersAuthElderlyDO comEldersAuthElderlyDO = this.baseMapper.selectById(eldersAuthElderlyDTO.getId()); |
| | | if(comEldersAuthElderlyDO == null){ |
| | | return R.fail("未查询到该老人信息"); |
| | | } |
| | | if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getName())) { |
| | | comEldersAuthElderlyDO.setName(eldersAuthElderlyDTO.getName()); |
| | | } |
| | | if (eldersAuthElderlyDTO.getIsExist() != null && eldersAuthElderlyDTO.getIsExist().intValue() != 1 |
| | | && eldersAuthElderlyDTO.getIsExist() != 2) { |
| | | return R.fail("参数错误,是否健在只能为1或2"); |
| | | } |
| | | comEldersAuthElderlyDO.setIsExist(eldersAuthElderlyDTO.getIsExist()); |
| | | comEldersAuthElderlyDO.setIsBigAge(eldersAuthElderlyDTO.getIsBigAge()); |
| | | comEldersAuthElderlyDO.setIdCard(eldersAuthElderlyDTO.getIdCard()); |
| | | // if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getIdCard())) { |
| | | // try { |
| | | // String idCard = AESUtil.encrypt128(eldersAuthElderlyDTO.getIdCard(), aesKey); |
| | | // comEldersAuthElderlyDO.setIdCard(idCard); |
| | | // } catch (Exception exp) { |
| | | // log.error("身份证转义失败"); |
| | | // } |
| | | // } |
| | | baseMapper.updateEldersAuthElderly(comEldersAuthElderlyDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 实有人口Service实现类 |
| | |
| | | private ComDisabilityPopulationDAO comDisabilityPopulationDAO; |
| | | @Resource |
| | | private ComLowSecurityPopulationDAO comLowSecurityPopulationDAO; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | @Resource |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | @Resource |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | |
| | | * @return 实有人口详情 |
| | | */ |
| | | @Override |
| | | public R detailPopulation(Long populationId) { |
| | | public R detailPopulation(Long populationId, Long communityId) { |
| | | ComMngPopulationDO comMngPopulationDO = populationDAO.selectById(populationId); |
| | | if (ObjectUtils.isEmpty(comMngPopulationDO)) { |
| | | return R.fail("用户信息不存在"); |
| | |
| | | // 设置特殊群体标签 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = |
| | | comMngPopulationCommunityTagsDAO.selectOne(new QueryWrapper<ComMngPopulationCommunityTagsDO>().lambda() |
| | | .eq(ComMngPopulationCommunityTagsDO::getPopulationId, populationId)); |
| | | .eq(ComMngPopulationCommunityTagsDO::getPopulationId, populationId) |
| | | .eq(ComMngPopulationCommunityTagsDO::getCommunityId, communityId)); |
| | | if (null != comMngPopulationCommunityTagsDO) { |
| | | comMngPopulationVO.setLabel(comMngPopulationCommunityTagsDO.getLabel()); |
| | | } |
| | |
| | | comMngPopulationVO.setCarList(carList); |
| | | } |
| | | |
| | | // 吸毒信息 |
| | | List<ComDrugPopulationVO> comDrugPopulationVOs = new ArrayList<>(); |
| | | List<ComDrugPopulationDO> comDrugPopulationDOs = comDrugPopulationDAO.selectList( |
| | | new QueryWrapper<ComDrugPopulationDO>().lambda().eq(ComDrugPopulationDO::getPopulationId, populationId)); |
| | | if (!comDrugPopulationDOs.isEmpty()) { |
| | | comDrugPopulationDOs.forEach(comDrugPopulationDO -> { |
| | | ComDrugPopulationVO comDrugPopulationVO = new ComDrugPopulationVO(); |
| | | BeanUtils.copyProperties(comDrugPopulationDO, comDrugPopulationVO); |
| | | comDrugPopulationVOs.add(comDrugPopulationVO); |
| | | comMngPopulationVO.setComDrugPopulationVOs(comDrugPopulationVOs); |
| | | }); |
| | | } |
| | | if (communityId != null){ |
| | | // 吸毒信息 |
| | | List<ComDrugPopulationVO> comDrugPopulationVOs = new ArrayList<>(); |
| | | List<ComDrugPopulationDO> comDrugPopulationDOs = comDrugPopulationDAO.selectList( |
| | | new QueryWrapper<ComDrugPopulationDO>().lambda().eq(ComDrugPopulationDO::getPopulationId, populationId) |
| | | .eq(ComDrugPopulationDO::getCommunityId, communityId)); |
| | | if (!comDrugPopulationDOs.isEmpty()) { |
| | | comDrugPopulationDOs.forEach(comDrugPopulationDO -> { |
| | | ComDrugPopulationVO comDrugPopulationVO = new ComDrugPopulationVO(); |
| | | BeanUtils.copyProperties(comDrugPopulationDO, comDrugPopulationVO); |
| | | comDrugPopulationVOs.add(comDrugPopulationVO); |
| | | comMngPopulationVO.setComDrugPopulationVOs(comDrugPopulationVOs); |
| | | }); |
| | | } |
| | | |
| | | // 社区矫正信息 |
| | | List<ComCorrectPopulationVO> comCorrectPopulationVOS = new ArrayList<>(); |
| | | List<ComCorrectPopulationDO> comCorrectPopulationDOS = |
| | | comCorrectPopulationDAO.selectList(new QueryWrapper<ComCorrectPopulationDO>().lambda() |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationId)); |
| | | if (!comCorrectPopulationDOS.isEmpty()) { |
| | | comCorrectPopulationDOS.forEach(comCorrectPopulationDO -> { |
| | | ComCorrectPopulationVO comCorrectPopulationVO = new ComCorrectPopulationVO(); |
| | | BeanUtils.copyProperties(comCorrectPopulationDO, comCorrectPopulationVO); |
| | | comCorrectPopulationVOS.add(comCorrectPopulationVO); |
| | | comMngPopulationVO.setComCorrectPopulationVOs(comCorrectPopulationVOS); |
| | | }); |
| | | } |
| | | // 社区矫正信息 |
| | | List<ComCorrectPopulationVO> comCorrectPopulationVOS = new ArrayList<>(); |
| | | List<ComCorrectPopulationDO> comCorrectPopulationDOS = |
| | | comCorrectPopulationDAO.selectList(new QueryWrapper<ComCorrectPopulationDO>().lambda() |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationId) |
| | | .eq(ComCorrectPopulationDO::getCommunityId, communityId)); |
| | | if (!comCorrectPopulationDOS.isEmpty()) { |
| | | comCorrectPopulationDOS.forEach(comCorrectPopulationDO -> { |
| | | ComCorrectPopulationVO comCorrectPopulationVO = new ComCorrectPopulationVO(); |
| | | BeanUtils.copyProperties(comCorrectPopulationDO, comCorrectPopulationVO); |
| | | comCorrectPopulationVOS.add(comCorrectPopulationVO); |
| | | comMngPopulationVO.setComCorrectPopulationVOs(comCorrectPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 精神障碍信息 |
| | | List<ComMajorPopulationVO> comMajorPopulationVOS = new ArrayList<>(); |
| | | List<ComMajorPopulationDO> comMajorPopulationDOs = comMajorPopulationDAO.selectList( |
| | | new QueryWrapper<ComMajorPopulationDO>().lambda().eq(ComMajorPopulationDO::getPopulationId, populationId)); |
| | | if (!comMajorPopulationDOs.isEmpty()) { |
| | | comMajorPopulationDOs.forEach(comMajorPopulationDO -> { |
| | | ComMajorPopulationVO comMajorPopulationVO = new ComMajorPopulationVO(); |
| | | BeanUtils.copyProperties(comMajorPopulationDO, comMajorPopulationVO); |
| | | comMajorPopulationVOS.add(comMajorPopulationVO); |
| | | comMngPopulationVO.setComMajorPopulationVOs(comMajorPopulationVOS); |
| | | }); |
| | | } |
| | | // 精神障碍信息 |
| | | List<ComMajorPopulationVO> comMajorPopulationVOS = new ArrayList<>(); |
| | | List<ComMajorPopulationDO> comMajorPopulationDOs = comMajorPopulationDAO.selectList( |
| | | new QueryWrapper<ComMajorPopulationDO>().lambda().eq(ComMajorPopulationDO::getPopulationId, populationId) |
| | | .eq(ComMajorPopulationDO::getCommunityId, communityId)); |
| | | if (!comMajorPopulationDOs.isEmpty()) { |
| | | comMajorPopulationDOs.forEach(comMajorPopulationDO -> { |
| | | ComMajorPopulationVO comMajorPopulationVO = new ComMajorPopulationVO(); |
| | | BeanUtils.copyProperties(comMajorPopulationDO, comMajorPopulationVO); |
| | | comMajorPopulationVOS.add(comMajorPopulationVO); |
| | | comMngPopulationVO.setComMajorPopulationVOs(comMajorPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 邪教信息 |
| | | List<ComCultPopulationVO> comCultPopulationVOS = new ArrayList<>(); |
| | | List<ComCultPopulationDO> comCultPopulationDOS = comCultPopulationDAO.selectList( |
| | | new QueryWrapper<ComCultPopulationDO>().lambda().eq(ComCultPopulationDO::getPopulationId, populationId)); |
| | | if (!comCultPopulationDOS.isEmpty()) { |
| | | comCultPopulationDOS.forEach(comCultPopulationDO -> { |
| | | ComCultPopulationVO comCultPopulationVO = new ComCultPopulationVO(); |
| | | BeanUtils.copyProperties(comCultPopulationDO, comCultPopulationVO); |
| | | comCultPopulationVOS.add(comCultPopulationVO); |
| | | comMngPopulationVO.setComCultPopulationVOs(comCultPopulationVOS); |
| | | }); |
| | | } |
| | | // 邪教信息 |
| | | List<ComCultPopulationVO> comCultPopulationVOS = new ArrayList<>(); |
| | | List<ComCultPopulationDO> comCultPopulationDOS = comCultPopulationDAO.selectList( |
| | | new QueryWrapper<ComCultPopulationDO>().lambda().eq(ComCultPopulationDO::getPopulationId, populationId) |
| | | .eq(ComCultPopulationDO::getCommunityId, communityId)); |
| | | if (!comCultPopulationDOS.isEmpty()) { |
| | | comCultPopulationDOS.forEach(comCultPopulationDO -> { |
| | | ComCultPopulationVO comCultPopulationVO = new ComCultPopulationVO(); |
| | | BeanUtils.copyProperties(comCultPopulationDO, comCultPopulationVO); |
| | | comCultPopulationVOS.add(comCultPopulationVO); |
| | | comMngPopulationVO.setComCultPopulationVOs(comCultPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 刑释信息 |
| | | List<ComRehabilitationPopulationVO> comRehabilitationPopulationVOS = new ArrayList<>(); |
| | | List<ComRehabilitationPopulationDO> comRehabilitationPopulationDOS = |
| | | comRehabilitationPopulationDAO.selectList(new QueryWrapper<ComRehabilitationPopulationDO>().lambda() |
| | | .eq(ComRehabilitationPopulationDO::getPopulationId, populationId)); |
| | | if (!comRehabilitationPopulationDOS.isEmpty()) { |
| | | comRehabilitationPopulationDOS.forEach(comRehabilitationPopulationDO -> { |
| | | ComRehabilitationPopulationVO comRehabilitationPopulationVO = new ComRehabilitationPopulationVO(); |
| | | BeanUtils.copyProperties(comRehabilitationPopulationDO, comRehabilitationPopulationVO); |
| | | comRehabilitationPopulationVOS.add(comRehabilitationPopulationVO); |
| | | comMngPopulationVO.setComRehabilitationPopulationVOs(comRehabilitationPopulationVOS); |
| | | }); |
| | | } |
| | | // 刑释信息 |
| | | List<ComRehabilitationPopulationVO> comRehabilitationPopulationVOS = new ArrayList<>(); |
| | | List<ComRehabilitationPopulationDO> comRehabilitationPopulationDOS = |
| | | comRehabilitationPopulationDAO.selectList(new QueryWrapper<ComRehabilitationPopulationDO>().lambda() |
| | | .eq(ComRehabilitationPopulationDO::getPopulationId, populationId) |
| | | .eq(ComRehabilitationPopulationDO::getCommunityId, communityId)); |
| | | if (!comRehabilitationPopulationDOS.isEmpty()) { |
| | | comRehabilitationPopulationDOS.forEach(comRehabilitationPopulationDO -> { |
| | | ComRehabilitationPopulationVO comRehabilitationPopulationVO = new ComRehabilitationPopulationVO(); |
| | | BeanUtils.copyProperties(comRehabilitationPopulationDO, comRehabilitationPopulationVO); |
| | | comRehabilitationPopulationVOS.add(comRehabilitationPopulationVO); |
| | | comMngPopulationVO.setComRehabilitationPopulationVOs(comRehabilitationPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 上访信息 |
| | | List<ComKeyPopulationVO> comKeyPopulationVOS = new ArrayList<>(); |
| | | List<ComKeyPopulationDO> comKeyPopulationDOS = comKeyPopulationDAO.selectList( |
| | | new QueryWrapper<ComKeyPopulationDO>().lambda().eq(ComKeyPopulationDO::getPopulationId, populationId)); |
| | | if (!comKeyPopulationDOS.isEmpty()) { |
| | | comKeyPopulationDOS.forEach(comKeyPopulationDO -> { |
| | | ComKeyPopulationVO comKeyPopulationVO = new ComKeyPopulationVO(); |
| | | BeanUtils.copyProperties(comKeyPopulationDO, comKeyPopulationVO); |
| | | comKeyPopulationVOS.add(comKeyPopulationVO); |
| | | comMngPopulationVO.setComKeyPopulationVOs(comKeyPopulationVOS); |
| | | }); |
| | | } |
| | | // 上访信息 |
| | | List<ComKeyPopulationVO> comKeyPopulationVOS = new ArrayList<>(); |
| | | List<ComKeyPopulationDO> comKeyPopulationDOS = comKeyPopulationDAO.selectList( |
| | | new QueryWrapper<ComKeyPopulationDO>().lambda().eq(ComKeyPopulationDO::getPopulationId, populationId) |
| | | .eq(ComKeyPopulationDO::getCommunityId, communityId)); |
| | | if (!comKeyPopulationDOS.isEmpty()) { |
| | | comKeyPopulationDOS.forEach(comKeyPopulationDO -> { |
| | | ComKeyPopulationVO comKeyPopulationVO = new ComKeyPopulationVO(); |
| | | BeanUtils.copyProperties(comKeyPopulationDO, comKeyPopulationVO); |
| | | comKeyPopulationVOS.add(comKeyPopulationVO); |
| | | comMngPopulationVO.setComKeyPopulationVOs(comKeyPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 退役军人信息 |
| | | List<ComVeteransPopulationVO> comVeteransPopulationVOS = new ArrayList<>(); |
| | | List<ComVeteransPopulationDO> comVeteransPopulationDOS = |
| | | comVeteransPopulationDAO.selectList(new QueryWrapper<ComVeteransPopulationDO>().lambda() |
| | | .eq(ComVeteransPopulationDO::getPopulationId, populationId)); |
| | | if (!comVeteransPopulationDOS.isEmpty()) { |
| | | comVeteransPopulationDOS.forEach(comVeteransPopulationDO -> { |
| | | ComVeteransPopulationVO comVeteransPopulationVO = new ComVeteransPopulationVO(); |
| | | BeanUtils.copyProperties(comVeteransPopulationDO, comVeteransPopulationVO); |
| | | comVeteransPopulationVOS.add(comVeteransPopulationVO); |
| | | comMngPopulationVO.setComVeteransPopulationVOs(comVeteransPopulationVOS); |
| | | }); |
| | | } |
| | | // 退役军人信息 |
| | | List<ComVeteransPopulationVO> comVeteransPopulationVOS = new ArrayList<>(); |
| | | List<ComVeteransPopulationDO> comVeteransPopulationDOS = |
| | | comVeteransPopulationDAO.selectList(new QueryWrapper<ComVeteransPopulationDO>().lambda() |
| | | .eq(ComVeteransPopulationDO::getPopulationId, populationId) |
| | | .eq(ComVeteransPopulationDO::getCommunityId, communityId)); |
| | | if (!comVeteransPopulationDOS.isEmpty()) { |
| | | comVeteransPopulationDOS.forEach(comVeteransPopulationDO -> { |
| | | ComVeteransPopulationVO comVeteransPopulationVO = new ComVeteransPopulationVO(); |
| | | BeanUtils.copyProperties(comVeteransPopulationDO, comVeteransPopulationVO); |
| | | comVeteransPopulationVOS.add(comVeteransPopulationVO); |
| | | comMngPopulationVO.setComVeteransPopulationVOs(comVeteransPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 残疾人信息 |
| | | List<ComDisabilityPopulationVO> comDisabilityPopulationVOS = new ArrayList<>(); |
| | | List<ComDisabilityPopulationDO> comDisabilityPopulationDOS = |
| | | comDisabilityPopulationDAO.selectList(new QueryWrapper<ComDisabilityPopulationDO>().lambda() |
| | | .eq(ComDisabilityPopulationDO::getPopulationId, populationId)); |
| | | if (!comDisabilityPopulationDOS.isEmpty()) { |
| | | comDisabilityPopulationDOS.forEach(comDisabilityPopulationDO -> { |
| | | ComDisabilityPopulationVO comDisabilityPopulationVO = new ComDisabilityPopulationVO(); |
| | | BeanUtils.copyProperties(comDisabilityPopulationDO, comDisabilityPopulationVO); |
| | | comDisabilityPopulationVOS.add(comDisabilityPopulationVO); |
| | | comMngPopulationVO.setComDisabilityPopulationVOs(comDisabilityPopulationVOS); |
| | | }); |
| | | } |
| | | // 残疾人信息 |
| | | List<ComDisabilityPopulationVO> comDisabilityPopulationVOS = new ArrayList<>(); |
| | | List<ComDisabilityPopulationDO> comDisabilityPopulationDOS = |
| | | comDisabilityPopulationDAO.selectList(new QueryWrapper<ComDisabilityPopulationDO>().lambda() |
| | | .eq(ComDisabilityPopulationDO::getPopulationId, populationId) |
| | | .eq(ComDisabilityPopulationDO::getCommunityId, communityId)); |
| | | if (!comDisabilityPopulationDOS.isEmpty()) { |
| | | comDisabilityPopulationDOS.forEach(comDisabilityPopulationDO -> { |
| | | ComDisabilityPopulationVO comDisabilityPopulationVO = new ComDisabilityPopulationVO(); |
| | | BeanUtils.copyProperties(comDisabilityPopulationDO, comDisabilityPopulationVO); |
| | | comDisabilityPopulationVOS.add(comDisabilityPopulationVO); |
| | | comMngPopulationVO.setComDisabilityPopulationVOs(comDisabilityPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 低保户信息 |
| | | List<ComLowSecurityPopulationVO> comLowSecurityPopulationVOS = new ArrayList<>(); |
| | | List<ComLowSecurityPopulationDO> comLowSecurityPopulationDOS = |
| | | comLowSecurityPopulationDAO.selectList(new QueryWrapper<ComLowSecurityPopulationDO>().lambda() |
| | | .eq(ComLowSecurityPopulationDO::getPopulationId, populationId)); |
| | | if (!comLowSecurityPopulationDOS.isEmpty()) { |
| | | comLowSecurityPopulationDOS.forEach(comLowSecurityPopulationDO -> { |
| | | ComLowSecurityPopulationVO comLowSecurityPopulationVO = new ComLowSecurityPopulationVO(); |
| | | BeanUtils.copyProperties(comLowSecurityPopulationDO, comLowSecurityPopulationVO); |
| | | comLowSecurityPopulationVOS.add(comLowSecurityPopulationVO); |
| | | comMngPopulationVO.setComLowSecurityPopulationVOs(comLowSecurityPopulationVOS); |
| | | }); |
| | | // 低保户信息 |
| | | List<ComLowSecurityPopulationVO> comLowSecurityPopulationVOS = new ArrayList<>(); |
| | | List<ComLowSecurityPopulationDO> comLowSecurityPopulationDOS = |
| | | comLowSecurityPopulationDAO.selectList(new QueryWrapper<ComLowSecurityPopulationDO>().lambda() |
| | | .eq(ComLowSecurityPopulationDO::getPopulationId, populationId) |
| | | .eq(ComLowSecurityPopulationDO::getCommunityId, communityId)); |
| | | if (!comLowSecurityPopulationDOS.isEmpty()) { |
| | | comLowSecurityPopulationDOS.forEach(comLowSecurityPopulationDO -> { |
| | | ComLowSecurityPopulationVO comLowSecurityPopulationVO = new ComLowSecurityPopulationVO(); |
| | | BeanUtils.copyProperties(comLowSecurityPopulationDO, comLowSecurityPopulationVO); |
| | | comLowSecurityPopulationVOS.add(comLowSecurityPopulationVO); |
| | | comMngPopulationVO.setComLowSecurityPopulationVOs(comLowSecurityPopulationVOS); |
| | | }); |
| | | } |
| | | |
| | | // 高龄老人信息 |
| | | List<ComElderAuthElderliesVO> comElderAuthElderliesVOList = new ArrayList<>(); |
| | | List<ComElderAuthElderliesDO> comElderAuthElderliesDOS = |
| | | comElderAuthElderliesDAO.selectList(new QueryWrapper<ComElderAuthElderliesDO>().lambda() |
| | | .eq(ComElderAuthElderliesDO::getPopulationId, populationId) |
| | | .eq(ComElderAuthElderliesDO::getCommunityId, communityId)); |
| | | if (!comElderAuthElderliesDOS.isEmpty()) { |
| | | comElderAuthElderliesDOS.forEach(comElderAuthElderliesDO -> { |
| | | ComElderAuthElderliesVO comElderAuthElderliesVO = new ComElderAuthElderliesVO(); |
| | | BeanUtils.copyProperties(comElderAuthElderliesDO, comElderAuthElderliesVO); |
| | | comElderAuthElderliesVOList.add(comElderAuthElderliesVO); |
| | | comMngPopulationVO.setComElderAuthElderliesVOList(comElderAuthElderliesVOList); |
| | | }); |
| | | } |
| | | |
| | | // 养老人员信息 |
| | | List<ComPensionAuthPensionerVO> comPensionAuthPensionerVOList = new ArrayList<>(); |
| | | List<ComPensionAuthPensionerDO> comPensionAuthPensionerDOS = |
| | | comPensionAuthPensionerDAO.selectList(new QueryWrapper<ComPensionAuthPensionerDO>().lambda() |
| | | .eq(ComPensionAuthPensionerDO::getPopulationId, populationId) |
| | | .eq(ComPensionAuthPensionerDO::getCommunityId, communityId)); |
| | | if (!comPensionAuthPensionerDOS.isEmpty()) { |
| | | comPensionAuthPensionerDOS.forEach(comPensionAuthPensionerDO -> { |
| | | ComPensionAuthPensionerVO comPensionAuthPensionerVO = new ComPensionAuthPensionerVO(); |
| | | BeanUtils.copyProperties(comPensionAuthPensionerDO, comPensionAuthPensionerVO); |
| | | comPensionAuthPensionerVOList.add(comPensionAuthPensionerVO); |
| | | comMngPopulationVO.setComPensionAuthPensionerVOList(comPensionAuthPensionerVOList); |
| | | }); |
| | | } |
| | | } |
| | | return R.ok(comMngPopulationVO); |
| | | } |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | }else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId)); |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setCreateBy(userId); |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setLowSecurityMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | log.info("处理完成导入数据"); |
| | | |
| | | log.info("开始执行数据库导入"); |
| | | if (!houseList.isEmpty()) { |
| | | log.info("执行数据库导入房屋"); |
| | | comMngPopulationHouseDAO.insertAll(houseList); |
| | | log.info("执行数据库导入房屋完成"); |
| | | } |
| | | if (!saveList.isEmpty()) { |
| | | log.info("执行数据库导入人口"); |
| | | this.baseMapper.insertAll(saveList); |
| | | log.info("执行数据库导入人口完成"); |
| | | } |
| | | if (!updateList.isEmpty()) { |
| | | log.info("执行数据库更新人口"); |
| | | this.baseMapper.updateAll(updateList); |
| | | // this.updateBatchById(updateList); |
| | | log.info("执行数据库更新人口完成"); |
| | | } |
| | | if (!houseUserList.isEmpty()) { |
| | | log.info("执行数据库导入人口房屋关系"); |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if (!savePopulationCommunityList.isEmpty()) { |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if (!updatePopulationCommunityList.isEmpty()) { |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("返回错误数据"); |
| | | return R.fail(mistakes); |
| | | } |
| | | return R.ok(mistakes); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSaveEdlerPopulation(List<ComMngPopulationElderExcelVO> list, Long communityId, Long userId) { |
| | | // 需要新增的房屋集合 |
| | | List<ComMngPopulationHouseDO> houseList = new ArrayList<>(); |
| | | // 需要新增的人口集合 |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationElderMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询社区信息 |
| | | log.info("开始查询社区信息数据"); |
| | | ComPopulationActVO populationActVO = comActDAO.getPopulationActById(communityId); |
| | | if (populationActVO == null) { |
| | | log.error("未查询到社区信息"); |
| | | return R.fail("未查询到社区信息"); |
| | | } |
| | | log.info("开始查询社区信息数据完成"); |
| | | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO |
| | | .selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | StringBuilder areaPath = new StringBuilder(); |
| | | areaPath.append(populationActVO.getProvinceName()).append(">").append(populationActVO.getCityName()) |
| | | .append(">").append(populationActVO.getDistrictName()).append(">"); |
| | | // 处理实有人口信息 |
| | | Integer nub = 1; |
| | | |
| | | // 查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null); |
| | | HashMap<String, Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | // 查询所有房屋信息放入到HashMap中 |
| | | List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null); |
| | | HashMap<String, Object> houseMap = new HashMap<>(); |
| | | houseLists.forEach(house -> { |
| | | String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo() |
| | | + house.getHouseNo(); |
| | | houseMap.put(key, house); |
| | | }); |
| | | |
| | | List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null); |
| | | HashMap<String, Object> villageMap = new HashMap<>(); |
| | | villageList.forEach(village -> { |
| | | String key = village.getCommunityId() + village.getAlley() + village.getHouseNum(); |
| | | villageMap.put(key, village); |
| | | }); |
| | | |
| | | List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null); |
| | | HashMap<String, Object> houseUserMap = new HashMap<>(); |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key, houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = |
| | | comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String, Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key, populationCommunity); |
| | | }); |
| | | |
| | | for (ComMngPopulationElderExcelVO vo : list) { |
| | | if (vo.getDoorNo().contains("号")) { |
| | | vo.setDoorNo(vo.getDoorNo().replace("号", "")); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getFloor())) { |
| | | if (vo.getFloor().contains("栋")) { |
| | | vo.setFloor(vo.getFloor().replace("栋", "")); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getUnitNo())) { |
| | | if (vo.getUnitNo().contains("单元")) { |
| | | vo.setUnitNo(vo.getUnitNo().replace("单元", "")); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getHouseNo())) { |
| | | if (vo.getHouseNo().contains("号")) { |
| | | vo.setHouseNo(vo.getHouseNo().replace("号", "")); |
| | | } |
| | | } |
| | | log.info("开始查询小区街路巷是否存在"); |
| | | // 查询小区街路巷是否存在 |
| | | ComMngVillageDO comMngVillageDO = null; |
| | | String villageKey = communityId + vo.getRoad() + vo.getDoorNo(); |
| | | if (!isOnly(villageKey, villageMap)) { |
| | | comMngVillageDO = (ComMngVillageDO)villageMap.get(villageKey); |
| | | } else { |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setElderMistake(mistake, vo); |
| | | mistake.setMistake("街路巷或小区号不存在,请先在“小区管理”中添加该小区:街路巷:" + vo.getRoad() + ",小区号:" + vo.getDoorNo()); |
| | | mistakes.add(mistake); |
| | | log.info("未查询到街路巷:" + vo.getRoad() + ",小区号:" + vo.getDoorNo()); |
| | | continue; |
| | | } |
| | | StringBuilder address = new StringBuilder(); |
| | | address.append(populationActVO.getProvinceName()).append(populationActVO.getCityName()) |
| | | .append(populationActVO.getDistrictName()).append(populationActVO.getStreetName()) |
| | | .append(comMngVillageDO.getAlley()).append(vo.getDoorNo()).append("号"); |
| | | if (StringUtils.isNotEmpty(vo.getFloor())) { |
| | | address.append(vo.getFloor()).append("栋"); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getUnitNo())) { |
| | | address.append(vo.getUnitNo()).append("单元"); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getHouseNo())) { |
| | | address.append(vo.getHouseNo()).append("号"); |
| | | } |
| | | vo.setAddress(address.toString()); |
| | | log.info("开始查询小区街路巷是否存在完成"); |
| | | |
| | | log.info("开始查询房屋是否存在"); |
| | | // 先判断房屋是否存在 |
| | | ComMngPopulationHouseDO populationHouseDO = null; |
| | | String houseKey = |
| | | communityId + comMngVillageDO.getVillageId() + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | if (isOnly(houseKey, houseMap)) { |
| | | if (!houseList.isEmpty()) { |
| | | for (ComMngPopulationHouseDO house : houseList) { |
| | | if (house.getVillageId().equals(comMngVillageDO.getVillageId()) |
| | | && house.getCommunityId().equals(communityId) && house.getFloor().equals(vo.getFloor()) |
| | | && house.getUnitNo().equals(vo.getUnitNo()) |
| | | && house.getHouseNo().equals(vo.getHouseNo())) { |
| | | populationHouseDO = house; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (populationHouseDO == null) { |
| | | // 房屋信息不存在建立房屋信息 |
| | | populationHouseDO = saveElderPopulationHouse(vo, comMngVillageDO, communityId, areaPath, |
| | | populationActVO.getName()); |
| | | houseList.add(populationHouseDO); |
| | | } |
| | | } else { |
| | | populationHouseDO = (ComMngPopulationHouseDO)houseMap.get(houseKey); |
| | | } |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | log.info("开始查询房屋是否存在完成"); |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | | // 空户处理完房屋信息,直接返回 |
| | | continue; |
| | | } |
| | | String cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | String populationKey = vo.getCardNo(); |
| | | if (!isOnly(populationKey, populationMap)) { |
| | | // 存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = |
| | | updateElderPopulationDO(vo, populationDO, communityId, userId); |
| | | updateList.add(updatePopulationDO); |
| | | } else { |
| | | // 不存在实有人口,则新增 |
| | | populationDO = saveElderPopulationDO(vo, populationActVO, comMngVillageDO, userId,communityId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | | log.info("开始查询实有人口房屋居住信息"); |
| | | // 处理实有人口房屋居住信息 |
| | | if (populationDO != null) { |
| | | ComMngPopulationHouseUserDO populationHouseUserDO = null; |
| | | String houseUserKey = populationDO.getId() + populationHouseDO.getId() + ""; |
| | | if (isOnly(houseUserKey, houseUserMap)) { |
| | | populationHouseUserDO = new ComMngPopulationHouseUserDO(); |
| | | populationHouseUserDO.setId(Snowflake.getId()); |
| | | populationHouseUserDO.setHouseId(populationHouseDO.getId()); |
| | | populationHouseUserDO.setPopulId(populationDO.getId()); |
| | | // populationHouseUserDO.setRelation(vo.getRelation()); |
| | | populationHouseUserDO.setRelationId(vo.getIsRent()); |
| | | // populationHouseUserDO.setResidence(vo.getResidence()); |
| | | houseUserList.add(populationHouseUserDO); |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | // 处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if (isOnly(populationCommunityKey, populationCommunityMap)) { |
| | | // 实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]) |
| | | .collect(Collectors.toList()); |
| | | // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = |
| | | (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]) |
| | | .collect(Collectors.toList()); |
| | | // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationElderMistakeExcelVO mistake = new ComMngPopulationElderMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setElderMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | } |
| | | log.info("查询实有人口存在社区信息完成"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | log.info("处理完成导入数据"); |
| | | |
| | | log.info("开始执行数据库导入"); |
| | | if (!houseList.isEmpty()) { |
| | | log.info("执行数据库导入房屋"); |
| | | comMngPopulationHouseDAO.insertAll(houseList); |
| | | log.info("执行数据库导入房屋完成"); |
| | | } |
| | | if (!saveList.isEmpty()) { |
| | | log.info("执行数据库导入人口"); |
| | | this.baseMapper.insertAll(saveList); |
| | | log.info("执行数据库导入人口完成"); |
| | | } |
| | | if (!updateList.isEmpty()) { |
| | | log.info("执行数据库更新人口"); |
| | | this.baseMapper.updateAll(updateList); |
| | | // this.updateBatchById(updateList); |
| | | log.info("执行数据库更新人口完成"); |
| | | } |
| | | if (!houseUserList.isEmpty()) { |
| | | log.info("执行数据库导入人口房屋关系"); |
| | | comMngPopulationHouseUserService.saveBatch(houseUserList); |
| | | log.info("执行数据库导入人口房屋关系完成"); |
| | | } |
| | | if (!savePopulationCommunityList.isEmpty()) { |
| | | log.info("执行数据库导入人口社区关系"); |
| | | comMngPopulationCommunityTagsService.saveBatch(savePopulationCommunityList); |
| | | log.info("数据库导入人口社区关系完成"); |
| | | } |
| | | if (!updatePopulationCommunityList.isEmpty()) { |
| | | log.info("执行数据库更新人口社区关系"); |
| | | comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList); |
| | | log.info("数据库更新人口社区关系完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("返回错误数据"); |
| | | return R.fail(mistakes); |
| | | } |
| | | return R.ok(mistakes); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R listSavePensionPopulation(List<ComMngPopulationPensionExcelVO> list, Long communityId, Long userId) { |
| | | // 需要新增的房屋集合 |
| | | List<ComMngPopulationHouseDO> houseList = new ArrayList<>(); |
| | | // 需要新增的人口集合 |
| | | List<ComMngPopulationDO> saveList = new ArrayList<>(); |
| | | // 需要修改的人口集合 |
| | | List<ComMngPopulationDO> updateList = new ArrayList<>(); |
| | | // 需要新增的吸毒人员集合 |
| | | List<ComDrugPopulationDO> saveDrugList = new ArrayList<>(); |
| | | // 需要修改的吸毒人员集合 |
| | | List<ComDrugPopulationDO> updateDrugList = new ArrayList<>(); |
| | | // 需要新增的人口与房屋关系集合 |
| | | List<ComMngPopulationHouseUserDO> houseUserList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> savePopulationCommunityList = new ArrayList<>(); |
| | | // 需要新增的人口与社区关系集合 |
| | | List<ComMngPopulationCommunityTagsDO> updatePopulationCommunityList = new ArrayList<>(); |
| | | |
| | | log.info("开始处理导入数据"); |
| | | List<ComMngPopulationPensionMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询社区信息 |
| | | log.info("开始查询社区信息数据"); |
| | | ComPopulationActVO populationActVO = comActDAO.getPopulationActById(communityId); |
| | | if (populationActVO == null) { |
| | | log.error("未查询到社区信息"); |
| | | return R.fail("未查询到社区信息"); |
| | | } |
| | | log.info("开始查询社区信息数据完成"); |
| | | |
| | | // 查询当前社区标签列表 |
| | | List<String> labelList = new ArrayList<>(); |
| | | List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(null); |
| | | if (!ObjectUtils.isEmpty(comMngUserTagDOS)) { |
| | | labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | StringBuilder areaPath = new StringBuilder(); |
| | | areaPath.append(populationActVO.getProvinceName()).append(">").append(populationActVO.getCityName()) |
| | | .append(">").append(populationActVO.getDistrictName()).append(">"); |
| | | // 处理实有人口信息 |
| | | Integer nub = 1; |
| | | |
| | | // 查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null); |
| | | HashMap<String, Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | // 查询所有房屋信息放入到HashMap中 |
| | | List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null); |
| | | HashMap<String, Object> houseMap = new HashMap<>(); |
| | | houseLists.forEach(house -> { |
| | | String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo() |
| | | + house.getHouseNo(); |
| | | houseMap.put(key, house); |
| | | }); |
| | | |
| | | List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null); |
| | | HashMap<String, Object> villageMap = new HashMap<>(); |
| | | villageList.forEach(village -> { |
| | | String key = village.getCommunityId() + village.getAlley() + village.getHouseNum(); |
| | | villageMap.put(key, village); |
| | | }); |
| | | |
| | | List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null); |
| | | HashMap<String, Object> houseUserMap = new HashMap<>(); |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key, houseUser); |
| | | }); |
| | | |
| | | List<ComMngPopulationCommunityTagsDO> populationCommunityLists = |
| | | comMngPopulationCommunityTagsDAO.selectList(null); |
| | | HashMap<String, Object> populationCommunityMap = new HashMap<>(); |
| | | populationCommunityLists.forEach(populationCommunity -> { |
| | | String key = populationCommunity.getPopulationId() + populationCommunity.getCommunityId() + ""; |
| | | populationCommunityMap.put(key, populationCommunity); |
| | | }); |
| | | |
| | | for (ComMngPopulationPensionExcelVO vo : list) { |
| | | if (vo.getDoorNo().contains("号")) { |
| | | vo.setDoorNo(vo.getDoorNo().replace("号", "")); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getFloor())) { |
| | | if (vo.getFloor().contains("栋")) { |
| | | vo.setFloor(vo.getFloor().replace("栋", "")); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getUnitNo())) { |
| | | if (vo.getUnitNo().contains("单元")) { |
| | | vo.setUnitNo(vo.getUnitNo().replace("单元", "")); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getHouseNo())) { |
| | | if (vo.getHouseNo().contains("号")) { |
| | | vo.setHouseNo(vo.getHouseNo().replace("号", "")); |
| | | } |
| | | } |
| | | log.info("开始查询小区街路巷是否存在"); |
| | | // 查询小区街路巷是否存在 |
| | | ComMngVillageDO comMngVillageDO = null; |
| | | String villageKey = communityId + vo.getRoad() + vo.getDoorNo(); |
| | | if (!isOnly(villageKey, villageMap)) { |
| | | comMngVillageDO = (ComMngVillageDO)villageMap.get(villageKey); |
| | | } else { |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setPensionMistake(mistake, vo); |
| | | mistake.setMistake("街路巷或小区号不存在,请先在“小区管理”中添加该小区:街路巷:" + vo.getRoad() + ",小区号:" + vo.getDoorNo()); |
| | | mistakes.add(mistake); |
| | | log.info("未查询到街路巷:" + vo.getRoad() + ",小区号:" + vo.getDoorNo()); |
| | | continue; |
| | | } |
| | | StringBuilder address = new StringBuilder(); |
| | | address.append(populationActVO.getProvinceName()).append(populationActVO.getCityName()) |
| | | .append(populationActVO.getDistrictName()).append(populationActVO.getStreetName()) |
| | | .append(comMngVillageDO.getAlley()).append(vo.getDoorNo()).append("号"); |
| | | if (StringUtils.isNotEmpty(vo.getFloor())) { |
| | | address.append(vo.getFloor()).append("栋"); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getUnitNo())) { |
| | | address.append(vo.getUnitNo()).append("单元"); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getHouseNo())) { |
| | | address.append(vo.getHouseNo()).append("号"); |
| | | } |
| | | vo.setAddress(address.toString()); |
| | | log.info("开始查询小区街路巷是否存在完成"); |
| | | |
| | | log.info("开始查询房屋是否存在"); |
| | | // 先判断房屋是否存在 |
| | | ComMngPopulationHouseDO populationHouseDO = null; |
| | | String houseKey = |
| | | communityId + comMngVillageDO.getVillageId() + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | if (isOnly(houseKey, houseMap)) { |
| | | if (!houseList.isEmpty()) { |
| | | for (ComMngPopulationHouseDO house : houseList) { |
| | | if (house.getVillageId().equals(comMngVillageDO.getVillageId()) |
| | | && house.getCommunityId().equals(communityId) && house.getFloor().equals(vo.getFloor()) |
| | | && house.getUnitNo().equals(vo.getUnitNo()) |
| | | && house.getHouseNo().equals(vo.getHouseNo())) { |
| | | populationHouseDO = house; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if (populationHouseDO == null) { |
| | | // 房屋信息不存在建立房屋信息 |
| | | populationHouseDO = savePensionPopulationHouse(vo, comMngVillageDO, communityId, areaPath, |
| | | populationActVO.getName()); |
| | | houseList.add(populationHouseDO); |
| | | } |
| | | } else { |
| | | populationHouseDO = (ComMngPopulationHouseDO)houseMap.get(houseKey); |
| | | } |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | log.info("开始查询房屋是否存在完成"); |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | | // 空户处理完房屋信息,直接返回 |
| | | continue; |
| | | } |
| | | String cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | String populationKey = vo.getCardNo(); |
| | | if (!isOnly(populationKey, populationMap)) { |
| | | // 存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = |
| | | updatePensionPopulationDO(vo, populationDO, communityId, userId); |
| | | updateList.add(updatePopulationDO); |
| | | } else { |
| | | // 不存在实有人口,则新增 |
| | | populationDO = savePensionPopulationDO(vo, populationActVO, comMngVillageDO, userId); |
| | | saveList.add(populationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | | log.info("开始查询实有人口房屋居住信息"); |
| | | // 处理实有人口房屋居住信息 |
| | | if (populationDO != null) { |
| | | ComMngPopulationHouseUserDO populationHouseUserDO = null; |
| | | String houseUserKey = populationDO.getId() + populationHouseDO.getId() + ""; |
| | | if (isOnly(houseUserKey, houseUserMap)) { |
| | | populationHouseUserDO = new ComMngPopulationHouseUserDO(); |
| | | populationHouseUserDO.setId(Snowflake.getId()); |
| | | populationHouseUserDO.setHouseId(populationHouseDO.getId()); |
| | | populationHouseUserDO.setPopulId(populationDO.getId()); |
| | | // populationHouseUserDO.setRelation(vo.getRelation()); |
| | | populationHouseUserDO.setRelationId(vo.getIsRent()); |
| | | // populationHouseUserDO.setResidence(vo.getResidence()); |
| | | houseUserList.add(populationHouseUserDO); |
| | | } |
| | | } |
| | | log.info("开始查询实有人口房屋居住信息完成"); |
| | | |
| | | log.info("开始查询实有人口存在社区信息"); |
| | | // 处理实有人口与社区关系以及对应特殊群体标签 |
| | | String populationCommunityKey = populationDO.getId() + populationActVO.getCommunityId() + ""; |
| | | if (populationDO != null) { |
| | | ComMngPopulationCommunityTagsDO cpopulationCommunityTagsDO = null; |
| | | if (isOnly(populationCommunityKey, populationCommunityMap)) { |
| | | // 实有人口不存在于当前社区 |
| | | cpopulationCommunityTagsDO = new ComMngPopulationCommunityTagsDO(); |
| | | cpopulationCommunityTagsDO.setId(Snowflake.getId()); |
| | | cpopulationCommunityTagsDO.setPopulationId(populationDO.getId()); |
| | | cpopulationCommunityTagsDO.setCommunityId(communityId); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]) |
| | | .collect(Collectors.toList()); |
| | | // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | cpopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | cpopulationCommunityTagsDO.setCreateBy(userId); |
| | | savePopulationCommunityList.add(cpopulationCommunityTagsDO); |
| | | } else { |
| | | // 实有人口存在于当前社区,则更新 |
| | | ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO = |
| | | (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey); |
| | | List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]) |
| | | .collect(Collectors.toList()); |
| | | // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | Iterator<String> iterator = userTag.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String s = iterator.next(); |
| | | if (!labelList.contains(s)) |
| | | iterator.remove(); |
| | | } |
| | | comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag)); |
| | | comMngPopulationCommunityTagsDO.setUpdateBy(userId); |
| | | updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO); |
| | | |
| | | ComMngPopulationPensionMistakeExcelVO mistake = new ComMngPopulationPensionMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setPensionMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在于该社区,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | |
| | | Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectOne(new QueryWrapper<ComDrugPopulationDO>() |
| | | .lambda().eq(ComDrugPopulationDO::getPopulationId, populationDO.getId())); |
| | | .lambda().eq(ComDrugPopulationDO::getPopulationId, populationDO.getId()).eq(ComDrugPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comDrugPopulationDO); |
| | | comDrugPopulationDO.setId(Snowflake.getId()); |
| | | comDrugPopulationDO.setPopulationId(populationDO.getId()); |
| | | comDrugPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comDrugPopulationDO.setCommunityId(communityId); |
| | | comDrugPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comDrugPopulationDAO.insert(comDrugPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = |
| | | comCorrectPopulationDAO.selectOne(new QueryWrapper<ComCorrectPopulationDO>().lambda() |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId()).eq(ComCorrectPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comCorrectPopulationDO); |
| | | comCorrectPopulationDO.setId(Snowflake.getId()); |
| | | comCorrectPopulationDO.setPopulationId(populationDO.getId()); |
| | | comCorrectPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comCorrectPopulationDO.setCommunityId(communityId); |
| | | comCorrectPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comCorrectPopulationDAO.insert(comCorrectPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComMajorPopulationDO comMajorPopulationDO = |
| | | comMajorPopulationDAO.selectOne(new QueryWrapper<ComMajorPopulationDO>().lambda() |
| | | .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId()).eq(ComMajorPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comMajorPopulationDO); |
| | | comMajorPopulationDO.setId(Snowflake.getId()); |
| | | comMajorPopulationDO.setPopulationId(populationDO.getId()); |
| | | comMajorPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comMajorPopulationDO.setCommunityId(communityId); |
| | | comMajorPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comMajorPopulationDAO.insert(comMajorPopulationDO); |
| | | } |
| | |
| | | Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectOne(new QueryWrapper<ComCultPopulationDO>() |
| | | .lambda().eq(ComCultPopulationDO::getPopulationId, populationDO.getId())); |
| | | .lambda().eq(ComCultPopulationDO::getPopulationId, populationDO.getId()).eq(ComCultPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comCultPopulationDO); |
| | | comCultPopulationDO.setId(Snowflake.getId()); |
| | | comCultPopulationDO.setPopulationId(populationDO.getId()); |
| | | comCultPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comCultPopulationDO.setCommunityId(communityId); |
| | | comCultPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comCultPopulationDAO.insert(comCultPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = |
| | | comRehabilitationPopulationDAO.selectOne(new QueryWrapper<ComRehabilitationPopulationDO>().lambda() |
| | | .eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId()).eq(ComRehabilitationPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comRehabilitationPopulationDO); |
| | | comRehabilitationPopulationDO.setId(Snowflake.getId()); |
| | | comRehabilitationPopulationDO.setPopulationId(populationDO.getId()); |
| | | comRehabilitationPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comRehabilitationPopulationDO.setCommunityId(communityId); |
| | | comRehabilitationPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comRehabilitationPopulationDAO.insert(comRehabilitationPopulationDO); |
| | | } |
| | |
| | | Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectOne(new QueryWrapper<ComKeyPopulationDO>() |
| | | .lambda().eq(ComKeyPopulationDO::getPopulationId, populationDO.getId())); |
| | | .lambda().eq(ComKeyPopulationDO::getPopulationId, populationDO.getId()).eq(ComKeyPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comKeyPopulationDO); |
| | | comKeyPopulationDO.setId(Snowflake.getId()); |
| | | comKeyPopulationDO.setPopulationId(populationDO.getId()); |
| | | comKeyPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comKeyPopulationDO.setCommunityId(communityId); |
| | | comKeyPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comKeyPopulationDAO.insert(comKeyPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComSentencePopulationDO comSentencePopulationDO = |
| | | comSentencePopulationDAO.selectOne(new QueryWrapper<ComSentencePopulationDO>().lambda() |
| | | .eq(ComSentencePopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComSentencePopulationDO::getPopulationId, populationDO.getId()).eq(ComSentencePopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comSentencePopulationDO); |
| | | comSentencePopulationDO.setId(Snowflake.getId()); |
| | | comSentencePopulationDO.setPopulationId(populationDO.getId()); |
| | | comSentencePopulationDO.setCommunityId(populationDO.getActId()); |
| | | comSentencePopulationDO.setCommunityId(communityId); |
| | | comSentencePopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comSentencePopulationDAO.insert(comSentencePopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = |
| | | comVeteransPopulationDAO.selectOne(new QueryWrapper<ComVeteransPopulationDO>().lambda() |
| | | .eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId()).eq(ComVeteransPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comVeteransPopulationDO); |
| | | comVeteransPopulationDO.setId(Snowflake.getId()); |
| | | comVeteransPopulationDO.setPopulationId(populationDO.getId()); |
| | | comVeteransPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comVeteransPopulationDO.setCommunityId(communityId); |
| | | comVeteransPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comVeteransPopulationDAO.insert(comVeteransPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = |
| | | comDisabilityPopulationDAO.selectOne(new QueryWrapper<ComDisabilityPopulationDO>().lambda() |
| | | .eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId()).eq(ComDisabilityPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comDisabilityPopulationDO); |
| | | comDisabilityPopulationDO.setId(Snowflake.getId()); |
| | | comDisabilityPopulationDO.setPopulationId(populationDO.getId()); |
| | | comDisabilityPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comDisabilityPopulationDO.setCommunityId(communityId); |
| | | comDisabilityPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comDisabilityPopulationDAO.insert(comDisabilityPopulationDO); |
| | | } |
| | |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = |
| | | comLowSecurityPopulationDAO.selectOne(new QueryWrapper<ComLowSecurityPopulationDO>().lambda() |
| | | .eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId())); |
| | | .eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId()).eq(ComLowSecurityPopulationDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | |
| | | BeanUtils.copyProperties(vo, comLowSecurityPopulationDO); |
| | | comLowSecurityPopulationDO.setId(Snowflake.getId()); |
| | | comLowSecurityPopulationDO.setPopulationId(populationDO.getId()); |
| | | comLowSecurityPopulationDO.setCommunityId(populationDO.getActId()); |
| | | comLowSecurityPopulationDO.setCommunityId(communityId); |
| | | comLowSecurityPopulationDO.setStreetId(populationDO.getStreetId()); |
| | | comLowSecurityPopulationDAO.insert(comLowSecurityPopulationDO); |
| | | } |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updateElderPopulationDO(ComMngPopulationElderExcelVO vo, |
| | | ComMngPopulationDO populationDO, Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = |
| | | comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>().lambda() |
| | | .eq(ComElderAuthElderliesDO::getPopulationId, populationDO.getId()).eq(ComElderAuthElderliesDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | } catch (Exception e) { |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comElderAuthElderliesDO != null) { |
| | | BeanUtils.copyProperties(vo, comElderAuthElderliesDO); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | | if (age >= 80 && age < 90) { |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under90); |
| | | }else if (age >= 90 && age < 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under100); |
| | | }else if (age >= 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | } |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } else { |
| | | comElderAuthElderliesDO = new ComElderAuthElderliesDO(); |
| | | BeanUtils.copyProperties(vo, comElderAuthElderliesDO); |
| | | comElderAuthElderliesDO.setId(Snowflake.getId()); |
| | | comElderAuthElderliesDO.setPopulationId(populationDO.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(communityId); |
| | | comElderAuthElderliesDO.setStreetId(populationDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | | if (age >= 80 && age < 90) { |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under90); |
| | | }else if (age >= 90 && age < 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under100); |
| | | }else if (age >= 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | // 获取当前月 |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | } |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO updatePensionPopulationDO(ComMngPopulationPensionExcelVO vo, |
| | | ComMngPopulationDO populationDO, Long communityId, Long userId) { |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = |
| | | comPensionAuthPensionerDAO.selectOne(new QueryWrapper<ComPensionAuthPensionerDO>().lambda() |
| | | .eq(ComPensionAuthPensionerDO::getPopulationId, populationDO.getId()) |
| | | .eq(ComPensionAuthPensionerDO::getCommunityId, communityId)); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | } catch (Exception e) { |
| | | log.error("身份证加密失败"); |
| | | } |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setActId(communityId); |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setUpdateBy(userId); |
| | | if (comPensionAuthPensionerDO != null) { |
| | | BeanUtils.copyProperties(vo, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | if (!comPensionAuthPensionerDO.getIsAlive().equals(1) || !comPensionAuthPensionerDO.getIsRegister().equals(1)) { |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | if(null == comPensionAuthStatisticsDO){ |
| | | comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | } |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | } |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } else { |
| | | comPensionAuthPensionerDO = new ComPensionAuthPensionerDO(); |
| | | BeanUtils.copyProperties(vo, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDO.setId(Snowflake.getId()); |
| | | comPensionAuthPensionerDO.setPopulationId(populationDO.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(populationDO.getActId()); |
| | | comPensionAuthPensionerDO.setStreetId(populationDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = (DateUtils.getYear(nowDate)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, communityId) |
| | | .eq(ComPensionAuthStatisticsDO::getYear, year)); |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthStatisticsDO.getSum() + 1); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO); |
| | | } |
| | | } |
| | | return populationDO; |
| | | } |
| | |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO saveElderPopulationDO(ComMngPopulationElderExcelVO vo, |
| | | ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO, Long userId, Long communityId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = new ComElderAuthElderliesDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | BeanUtils.copyProperties(vo, comElderAuthElderliesDO); |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comElderAuthElderliesDO.setPopulationId(populationId); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | } catch (Exception e) { |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | // 新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | | // populationDO.setHouseId(vo.getHouseId()); |
| | | // }else{ |
| | | // populationDO.setHouseId(null); |
| | | // } |
| | | |
| | | // this.baseMapper.insert(populationDO); |
| | | comElderAuthElderliesDO.setId(Snowflake.getId()); |
| | | comElderAuthElderliesDO.setCommunityId(comActDO.getCommunityId()); |
| | | comElderAuthElderliesDO.setStreetId(comActDO.getStreetId()); |
| | | comElderAuthElderliesDO.setIdCard(cardNoAES); |
| | | comElderAuthElderliesDO.setAddress(vo.getNowAddress()); |
| | | if (StringUtils.isNotEmpty(vo.getBirthday())) { |
| | | int age = AgeUtils.getAgeFromBirthTimes(vo.getBirthday()); |
| | | if (age >= 80 && age < 90) { |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under90); |
| | | }else if (age >= 90 && age < 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.under100); |
| | | }else if (age >= 100){ |
| | | comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100); |
| | | } |
| | | } |
| | | if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | // 获取当前年 |
| | | int year = calendar.get(Calendar.YEAR); |
| | | // 获取当前月 |
| | | int month = calendar.get(Calendar.MONTH) + 1; |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month)); |
| | | comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO); |
| | | } |
| | | comElderAuthElderliesDAO.insert(comElderAuthElderliesDO); |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationDO savePensionPopulationDO(ComMngPopulationPensionExcelVO vo, |
| | | ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO, Long userId) { |
| | | ComMngPopulationDO populationDO = new ComMngPopulationDO(); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = new ComPensionAuthPensionerDO(); |
| | | BeanUtils.copyProperties(vo, populationDO); |
| | | BeanUtils.copyProperties(vo, comPensionAuthPensionerDO); |
| | | Long populationId = Snowflake.getId(); |
| | | populationDO.setId(populationId); |
| | | comPensionAuthPensionerDO.setPopulationId(populationId); |
| | | // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> |
| | | // userTagStr.split("\\(")[0]).collect(Collectors.toList()); |
| | | // |
| | | // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 |
| | | // Iterator<String> iterator = userTag.iterator(); |
| | | // while (iterator.hasNext()) { |
| | | // String s = iterator.next(); |
| | | // if (!labelList.contains(s)) |
| | | // iterator.remove(); |
| | | // } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | // populationDO.setLabel(Joiner.on(",").join(userTag)); |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | | cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey); |
| | | } catch (Exception e) { |
| | | log.error("身份证加密失败"); |
| | | } |
| | | populationDO.setCardNo(cardNoAES); |
| | | populationDO.setCreateBy(userId); |
| | | // 新增的时候默认绑定房屋id |
| | | // if ((vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) || |
| | | // (vo.getIsResidence() != null && vo.getIsResidence().intValue() == 1)) { |
| | | // populationDO.setHouseId(vo.getHouseId()); |
| | | // }else{ |
| | | // populationDO.setHouseId(null); |
| | | // } |
| | | |
| | | // this.baseMapper.insert(populationDO); |
| | | comPensionAuthPensionerDO.setId(Snowflake.getId()); |
| | | comPensionAuthPensionerDO.setCommunityId(comActDO.getCommunityId()); |
| | | comPensionAuthPensionerDO.setStreetId(comActDO.getStreetId()); |
| | | comPensionAuthPensionerDO.setIdCard(cardNoAES); |
| | | comPensionAuthPensionerDO.setAddress(vo.getNowAddress()); |
| | | comPensionAuthPensionerDAO.insert(comPensionAuthPensionerDO); |
| | | return populationDO; |
| | | } |
| | | |
| | | private ComMngPopulationHouseDO savePopulationHouse(ComMngPopulationServeExcelVO vo, |
| | | ComMngVillageDO comMngVillageDO, Long communityId, StringBuilder areaPath, String actName) { |
| | | // 查询该房屋未建立,执行建立房屋信息 |
| | |
| | | return populationHouseDO; |
| | | } |
| | | |
| | | private ComMngPopulationHouseDO saveElderPopulationHouse(ComMngPopulationElderExcelVO vo, |
| | | ComMngVillageDO comMngVillageDO, Long communityId, StringBuilder areaPath, String actName) { |
| | | // 查询该房屋未建立,执行建立房屋信息 |
| | | ComMngPopulationHouseDO populationHouseDO = new ComMngPopulationHouseDO(); |
| | | populationHouseDO.setId(Snowflake.getId()); |
| | | populationHouseDO.setStreetId(comMngVillageDO.getStreetId()); |
| | | populationHouseDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationHouseDO.setAlley(vo.getRoad()); |
| | | populationHouseDO.setHouseNum(vo.getDoorNo()); |
| | | populationHouseDO.setStatus(vo.getIsRent()); |
| | | populationHouseDO.setCommunityId(communityId); |
| | | populationHouseDO.setFloor(vo.getFloor()); |
| | | populationHouseDO.setUnitNo(vo.getUnitNo()); |
| | | populationHouseDO.setHouseNo(vo.getHouseNo()); |
| | | populationHouseDO.setCode(vo.getHouseNo()); |
| | | populationHouseDO.setAddress(vo.getAddress()); |
| | | populationHouseDO.setUpdateAt(new Date()); |
| | | // populationHouseDO.setConstructPurpose(vo.getHousePurpose()); |
| | | StringBuilder housePath = new StringBuilder(); |
| | | housePath.append(populationHouseDO.getAlley()).append(">").append(actName).append(">") |
| | | .append(comMngVillageDO.getName()).append(">").append(vo.getAddress()); |
| | | populationHouseDO.setPath(areaPath.toString() + housePath.toString()); |
| | | // try { |
| | | // populationHouseDO.setConstructArea(new BigDecimal(vo.getBuildArea())); |
| | | // } catch (Exception e) { |
| | | // } |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | | populationHouseDO.setIsEmpty(PopulIsOksEnum.YES.getCode()); |
| | | } |
| | | if (vo.getHouseStatus() != null) { |
| | | populationHouseDO.setStatus(vo.getHouseStatus()); |
| | | } |
| | | if (vo.getHousePurpose() != null) { |
| | | populationHouseDO.setPurpose(vo.getHousePurpose()); |
| | | } |
| | | if (vo.getControlStatus() != null) { |
| | | populationHouseDO.setControlStatus(vo.getControlStatus()); |
| | | } |
| | | // comMngPopulationHouseDAO.insert(populationHouseDO); |
| | | return populationHouseDO; |
| | | } |
| | | |
| | | private ComMngPopulationHouseDO savePensionPopulationHouse(ComMngPopulationPensionExcelVO vo, |
| | | ComMngVillageDO comMngVillageDO, Long communityId, StringBuilder areaPath, String actName) { |
| | | // 查询该房屋未建立,执行建立房屋信息 |
| | | ComMngPopulationHouseDO populationHouseDO = new ComMngPopulationHouseDO(); |
| | | populationHouseDO.setId(Snowflake.getId()); |
| | | populationHouseDO.setStreetId(comMngVillageDO.getStreetId()); |
| | | populationHouseDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationHouseDO.setAlley(vo.getRoad()); |
| | | populationHouseDO.setHouseNum(vo.getDoorNo()); |
| | | populationHouseDO.setStatus(vo.getIsRent()); |
| | | populationHouseDO.setCommunityId(communityId); |
| | | populationHouseDO.setFloor(vo.getFloor()); |
| | | populationHouseDO.setUnitNo(vo.getUnitNo()); |
| | | populationHouseDO.setHouseNo(vo.getHouseNo()); |
| | | populationHouseDO.setCode(vo.getHouseNo()); |
| | | populationHouseDO.setAddress(vo.getAddress()); |
| | | populationHouseDO.setUpdateAt(new Date()); |
| | | // populationHouseDO.setConstructPurpose(vo.getHousePurpose()); |
| | | StringBuilder housePath = new StringBuilder(); |
| | | housePath.append(populationHouseDO.getAlley()).append(">").append(actName).append(">") |
| | | .append(comMngVillageDO.getName()).append(">").append(vo.getAddress()); |
| | | populationHouseDO.setPath(areaPath.toString() + housePath.toString()); |
| | | // try { |
| | | // populationHouseDO.setConstructArea(new BigDecimal(vo.getBuildArea())); |
| | | // } catch (Exception e) { |
| | | // } |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | | populationHouseDO.setIsEmpty(PopulIsOksEnum.YES.getCode()); |
| | | } |
| | | if (vo.getHouseStatus() != null) { |
| | | populationHouseDO.setStatus(vo.getHouseStatus()); |
| | | } |
| | | if (vo.getHousePurpose() != null) { |
| | | populationHouseDO.setPurpose(vo.getHousePurpose()); |
| | | } |
| | | if (vo.getControlStatus() != null) { |
| | | populationHouseDO.setControlStatus(vo.getControlStatus()); |
| | | } |
| | | // comMngPopulationHouseDAO.insert(populationHouseDO); |
| | | return populationHouseDO; |
| | | } |
| | | |
| | | private ComMngPopulationHouseUserDO savePopulationHouseUser(ComMngPopulationServeExcelVO vo, |
| | | ComMngPopulationDO comMngPopulationDO, ComMngPopulationHouseDO comMngPopulationHouseDO) { |
| | | // 查询该房屋未建立,执行建立房屋信息 |
| | |
| | | // comMngPopulationHouseUserDO.setCreateAt(new Date()); |
| | | // comMngPopulationHouseUserDAO.insert(comMngPopulationHouseUserDO); |
| | | // } |
| | | //修改吸毒人员信息 |
| | | if (null != vo.getComDrugPopulationVO()) { |
| | | ComDrugPopulationVO comDrugPopulationVO = vo.getComDrugPopulationVO(); |
| | | ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectById(comDrugPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comDrugPopulationVO, comDrugPopulationDO); |
| | | comDrugPopulationDAO.updateById(comDrugPopulationDO); |
| | | } |
| | | //修改社区矫正人员信息 |
| | | if (null != vo.getComCorrectPopulationVO()) { |
| | | ComCorrectPopulationVO comCorrectPopulationVO = vo.getComCorrectPopulationVO(); |
| | | ComCorrectPopulationDO comCorrectPopulationDO = comCorrectPopulationDAO.selectById(comCorrectPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comCorrectPopulationVO, comCorrectPopulationDO); |
| | | comCorrectPopulationDAO.updateById(comCorrectPopulationDO); |
| | | } |
| | | //修改精神障碍信息 |
| | | if (null != vo.getComMajorPopulationVO()) { |
| | | ComMajorPopulationVO comMajorPopulationVO = vo.getComMajorPopulationVO(); |
| | | ComMajorPopulationDO comCorrectPopulationDO = comMajorPopulationDAO.selectById(comMajorPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comMajorPopulationVO, comCorrectPopulationDO); |
| | | comMajorPopulationDAO.updateById(comCorrectPopulationDO); |
| | | } |
| | | //修改邪教信息 |
| | | if (null != vo.getComCultPopulationVO()) { |
| | | ComCultPopulationVO comCultPopulationVO = vo.getComCultPopulationVO(); |
| | | ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectById(comCultPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comCultPopulationVO, comCultPopulationDO); |
| | | comCultPopulationDAO.updateById(comCultPopulationDO); |
| | | } |
| | | //修改刑释信息 |
| | | if (null != vo.getComRehabilitationPopulationVO()) { |
| | | ComRehabilitationPopulationVO comRehabilitationPopulationVO = vo.getComRehabilitationPopulationVO(); |
| | | ComRehabilitationPopulationDO comRehabilitationPopulationDO = comRehabilitationPopulationDAO.selectById(comRehabilitationPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comRehabilitationPopulationVO, comRehabilitationPopulationDO); |
| | | comRehabilitationPopulationDAO.updateById(comRehabilitationPopulationDO); |
| | | } |
| | | //修改上访信息 |
| | | if (null != vo.getComKeyPopulationVO()) { |
| | | ComKeyPopulationVO comKeyPopulationVO = vo.getComKeyPopulationVO(); |
| | | ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectById(comKeyPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comKeyPopulationVO, comKeyPopulationDO); |
| | | comKeyPopulationDAO.updateById(comKeyPopulationDO); |
| | | } |
| | | //修改退役军人信息 |
| | | if (null != vo.getComVeteransPopulationVO()) { |
| | | ComVeteransPopulationVO comVeteransPopulationVO = vo.getComVeteransPopulationVO(); |
| | | ComVeteransPopulationDO comVeteransPopulationDO = comVeteransPopulationDAO.selectById(comVeteransPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comVeteransPopulationVO, comVeteransPopulationDO); |
| | | comVeteransPopulationDAO.updateById(comVeteransPopulationDO); |
| | | } |
| | | //修改残疾人信息 |
| | | if (null != vo.getComDisabilityPopulationVO()) { |
| | | ComDisabilityPopulationVO comDisabilityPopulationVO = vo.getComDisabilityPopulationVO(); |
| | | ComDisabilityPopulationDO comDisabilityPopulationDO = comDisabilityPopulationDAO.selectById(comDisabilityPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comDisabilityPopulationVO, comDisabilityPopulationDO); |
| | | comDisabilityPopulationDAO.updateById(comDisabilityPopulationDO); |
| | | } |
| | | //修改低保户信息 |
| | | if (null != vo.getComLowSecurityPopulationVO()) { |
| | | ComLowSecurityPopulationVO comLowSecurityPopulationVO = vo.getComLowSecurityPopulationVO(); |
| | | ComLowSecurityPopulationDO comLowSecurityPopulationDO = comLowSecurityPopulationDAO.selectById(comLowSecurityPopulationVO.getId()); |
| | | BeanUtils.copyProperties(comLowSecurityPopulationVO, comLowSecurityPopulationDO); |
| | | comLowSecurityPopulationDAO.updateById(comLowSecurityPopulationDO); |
| | | } |
| | | //修改高龄老人信息 |
| | | if (null != vo.getComElderAuthElderliesVO()) { |
| | | ComElderAuthElderliesVO comElderAuthElderliesVO = vo.getComElderAuthElderliesVO(); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO = comElderAuthElderliesDAO.selectById(comElderAuthElderliesVO.getId()); |
| | | BeanUtils.copyProperties(comElderAuthElderliesVO, comElderAuthElderliesDO); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } |
| | | //修改养老人员信息 |
| | | if (null != vo.getComPensionAuthPensionerVO()) { |
| | | ComPensionAuthPensionerVO comPensionAuthPensionerVO = vo.getComPensionAuthPensionerVO(); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = comPensionAuthPensionerDAO.selectById(comPensionAuthPensionerVO.getId()); |
| | | BeanUtils.copyProperties(comPensionAuthPensionerVO, comPensionAuthPensionerDO); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } |
| | | if (populationDAO.updateById(populationDO) > 0) { |
| | | return R.ok(); |
| | | } else { |
| | |
| | | } |
| | | ComMngUserTagDO checkCreditCode = comMngUserTagDAO.selectOne( |
| | | new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getTagName, comMngTagVO.getTagName())); |
| | | if (null != checkCreditCode && comMngUserTagDO.getId() != checkCreditCode.getId()) { |
| | | if (null != checkCreditCode && !comMngUserTagDO.getId().equals(checkCreditCode.getId())) { |
| | | return R.fail("该标签已存在,标签名称重复"); |
| | | } |
| | | |
| | |
| | | } else { |
| | | // 新增 |
| | | Integer count = comMngUserTagDAO.selectCount( |
| | | new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getTagName, comMngTagVO.getTagName()) |
| | | .eq(ComMngUserTagDO::getCommunityId, comMngTagVO.getCommunityId())); |
| | | new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getTagName, comMngTagVO.getTagName())); |
| | | if (count > 0) { |
| | | return R.fail("该标签已存在,标签名称重复"); |
| | | } |
| | |
| | | // mvo.setDeath(PopulOutOrLocalEnum.getCnDescByName(vo.getDeath())); |
| | | } |
| | | |
| | | private void setElderMistake(ComMngPopulationElderMistakeExcelVO mvo, |
| | | ComMngPopulationElderExcelVO vo) { |
| | | mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); |
| | | mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); |
| | | mvo.setHouseStatus(PopulHouseStatusEnum.getCnDescByName(vo.getHouseStatus())); |
| | | mvo.setHousePurpose(PopulHousePurposeEnum.getCnDescByName(vo.getHousePurpose())); |
| | | mvo.setControlStatus(PopulHouseControlStatusEnum.getCnDescByName(vo.getControlStatus())); |
| | | mvo.setCultureLevel(PopulCultureLevelEnum.getCnDescByName(vo.getCultureLevel())); |
| | | mvo.setMarriage(PopulMarriageEnum.getCnDescByName(vo.getMarriage())); |
| | | mvo.setOutOrLocal(PopulOutOrLocalEnum.getCnDescByName(vo.getOutOrLocal())); |
| | | mvo.setIsRegister(PopulHouseUseEnum.getCnDescByName(vo.getIsRegister())); |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | // mvo.setResidence(PopulRelationEnum.getCnDescByName(vo.getResidence())); |
| | | // mvo.setPersonType(PopulPersonTypeEnum.getCnDescByName(vo.getPersonType())); |
| | | // mvo.setDeath(PopulOutOrLocalEnum.getCnDescByName(vo.getDeath())); |
| | | } |
| | | |
| | | private void setPensionMistake(ComMngPopulationPensionMistakeExcelVO mvo, |
| | | ComMngPopulationPensionExcelVO vo) { |
| | | mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); |
| | | mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); |
| | | mvo.setHouseStatus(PopulHouseStatusEnum.getCnDescByName(vo.getHouseStatus())); |
| | | mvo.setHousePurpose(PopulHousePurposeEnum.getCnDescByName(vo.getHousePurpose())); |
| | | mvo.setControlStatus(PopulHouseControlStatusEnum.getCnDescByName(vo.getControlStatus())); |
| | | mvo.setCultureLevel(PopulCultureLevelEnum.getCnDescByName(vo.getCultureLevel())); |
| | | mvo.setMarriage(PopulMarriageEnum.getCnDescByName(vo.getMarriage())); |
| | | mvo.setOutOrLocal(PopulOutOrLocalEnum.getCnDescByName(vo.getOutOrLocal())); |
| | | mvo.setIsRegister(PopulHouseUseEnum.getCnDescByName(vo.getIsRegister())); |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | // mvo.setResidence(PopulRelationEnum.getCnDescByName(vo.getResidence())); |
| | | // mvo.setPersonType(PopulPersonTypeEnum.getCnDescByName(vo.getPersonType())); |
| | | // mvo.setDeath(PopulOutOrLocalEnum.getCnDescByName(vo.getDeath())); |
| | | } |
| | | |
| | | /** |
| | | * 判重方法 |
| | | * |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthPensionerService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | /** |
| | | * @title: ComPensionAuthPensionerServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老金人员服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:20 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPensionAuthPensionerServiceImpl extends ServiceImpl<ComPensionAuthPensionerDAO, ComPensionAuthPensionerDO> implements ComPensionAuthPensionerService { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.enums.PopulHouseUseEnum; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComPensionAuthPensionerService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.service.ComPensionAuthRecordService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthRecordServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证记录服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/09/01 17:35 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPensionAuthRecordServiceImpl extends ServiceImpl<ComPensionAuthRecordDAO, ComPensionAuthRecordDO> implements ComPensionAuthRecordService { |
| | | @Resource |
| | | private ComPensionAuthRecordDAO comPensionAuthRecordDAO; |
| | | @Resource |
| | | private ComMngPopulationDAO comMngPopulationDAO; |
| | | @Resource |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | @Resource |
| | | private ComPensionAuthRecordService comPensionAuthRecordService; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | | @Override |
| | | public R pagePensionAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | Page page = new Page<>(); |
| | | Long pageNum = pageElderAuthRecordsDTO.getPageNum(); |
| | | Long pageSize = pageElderAuthRecordsDTO.getPageSize(); |
| | | if (null == pageNum || 0 == pageNum) { |
| | | pageNum = 1L; |
| | | } |
| | | if (null == pageSize || 0 == pageSize) { |
| | | pageSize = 10L; |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComPensionAuthRecordVO> iPage = comPensionAuthRecordDAO.pagePensionAuthRecords(page, pageElderAuthRecordsDTO); |
| | | if (!iPage.getRecords().isEmpty()) { |
| | | iPage.getRecords().forEach(comPensionAuthRecordVO -> { |
| | | if (StringUtils.isNotEmpty(comPensionAuthRecordVO.getBirthday())) { |
| | | comPensionAuthRecordVO.setAge(AgeUtils.getAgeFromBirthTimes(comPensionAuthRecordVO.getBirthday())); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R detailPensionAuthRecords(Long authRecordId) { |
| | | ComPensionAuthRecordVO comPensionAuthRecordVO = comPensionAuthRecordDAO.detailPensionAuthRecords(authRecordId); |
| | | return R.ok(comPensionAuthRecordVO); |
| | | } |
| | | |
| | | @Override |
| | | public R examinePensionAuthRecords(ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = comPensionAuthRecordDAO.selectById(comPensionAuthRecordVO.getId()); |
| | | if (comPensionAuthRecordDO == null) { |
| | | return R.fail("未查询到养老认证记录"); |
| | | } |
| | | BeanUtils.copyProperties(comPensionAuthRecordVO, comPensionAuthRecordDO); |
| | | if (comPensionAuthRecordVO.getApprovalStatus().equals(3)) { |
| | | comPensionAuthRecordDO.setAuthStatus(1); |
| | | } |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | int nub = comPensionAuthRecordDAO.updateById(comPensionAuthRecordDO); |
| | | if (nub < 1) { |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R signPensionAuthRecords(ComPensionAuthRecordVO comPensionAuthRecordVO) { |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = comPensionAuthRecordDAO.selectById(comPensionAuthRecordVO.getId()); |
| | | if (comPensionAuthRecordDO == null) { |
| | | return R.fail("未查询到养老认证记录"); |
| | | } |
| | | BeanUtils.copyProperties(comPensionAuthRecordVO, comPensionAuthRecordDO); |
| | | int nub = comPensionAuthRecordDAO.updateById(comPensionAuthRecordDO); |
| | | if (nub < 1) { |
| | | return R.fail("标记失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R getPensionAuthRecordsByIds(List<Long> ids) { |
| | | List<ComPensionAuthRecordExcleVO> comPensionAuthRecordExcleVOS = comPensionAuthRecordDAO.getPensionAuthRecordsByIds(ids); |
| | | return R.ok(comPensionAuthRecordExcleVOS); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R listSavePensionAuthRecordExcelVO(List<ComPensionAuthRecordImportExcelVO> list, Long communityId, Long userId) { |
| | | // 需要新增的认证记录集合 |
| | | List<ComPensionAuthRecordDO> saveList = new ArrayList<>(); |
| | | // 需要修改的认证记录集合 |
| | | List<ComPensionAuthRecordDO> updateList = new ArrayList<>(); |
| | | log.info("开始处理导入数据"); |
| | | List<ComPensionAuthRecordImportMistakeExcelVO> mistakes = new ArrayList<>(); |
| | | try { |
| | | // 查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = comMngPopulationDAO.selectList(null); |
| | | HashMap<String, Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key, population); |
| | | }); |
| | | |
| | | for (ComPensionAuthRecordImportExcelVO vo : list) { |
| | | String cardNoAES = AESUtil.encrypt128(vo.getIdCard(), aesKey); |
| | | // 判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | String populationKey = vo.getIdCard(); |
| | | if (!isOnly(populationKey, populationMap)) { |
| | | // 存在实有人口信息,则查询养老信息(是否符合认证条件(健在且登记了养老认证)) |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO = comPensionAuthPensionerDAO.selectOne(new QueryWrapper<ComPensionAuthPensionerDO>() |
| | | .lambda().eq(ComPensionAuthPensionerDO::getPopulationId, populationDO.getId()).eq(ComPensionAuthPensionerDO::getCommunityId, communityId)); |
| | | //不存在养老信息,需要先导入养老信息 |
| | | if (null == comPensionAuthPensionerDO) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该实有人口已存在,但本社区不存在养老信息,请先导入养老人口"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在养老信息,判断是否满足认证条件 |
| | | if (!comPensionAuthPensionerDO.getIsRegister().equals(1) || !comPensionAuthPensionerDO.getIsAlive().equals(1)) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口不健在,或者未做养老登记"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //满足认证条件,判断是否存在当期认证记录 |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = null; |
| | | Date nowDate = new Date(); |
| | | // 获取当前年 |
| | | int year = DateUtils.getYear(nowDate); |
| | | String authPeriod = ""; |
| | | if (nowDate.before(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(String.valueOf(year) + "-03-01 00:00:00"))) { |
| | | authPeriod = String.valueOf(year - 1); |
| | | }else { |
| | | authPeriod = String.valueOf(year); |
| | | } |
| | | |
| | | comPensionAuthRecordDO = comPensionAuthRecordDAO.selectOne(new QueryWrapper<ComPensionAuthRecordDO>().lambda(). |
| | | eq(ComPensionAuthRecordDO::getPensionerId, comPensionAuthPensionerDO.getId()).eq(ComPensionAuthRecordDO::getAuthPeriod, authPeriod)); |
| | | if (null != comPensionAuthRecordDO) { |
| | | //存在记录且状态为已认证,不能修改 |
| | | if (comPensionAuthRecordDO.getAuthStatus().equals(1)) { |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该人口本期已认证,不能修改"); |
| | | mistakes.add(mistake); |
| | | }else { |
| | | //存在记录,执行修改 |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO1 = |
| | | updatePensionAuthRecordsDO(vo, comPensionAuthRecordDO, userId); |
| | | updateList.add(comPensionAuthRecordDO1); |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("该认证已存在,执行更新"); |
| | | mistakes.add(mistake); |
| | | } |
| | | }else { |
| | | // 不存在记录,则新增 |
| | | comPensionAuthRecordDO = savePensionAuthRecordsDO(vo, comPensionAuthPensionerDO, authPeriod, userId); |
| | | saveList.add(comPensionAuthRecordDO); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | // 不存在实有人口,则新增 |
| | | ComPensionAuthRecordImportMistakeExcelVO mistake = new ComPensionAuthRecordImportMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo, mistake); |
| | | setMistake(mistake, vo); |
| | | mistake.setMistake("不存在该实有人口,请先导入实有人口信息"); |
| | | mistakes.add(mistake); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("出现错误,错误原因:" + e.getMessage()); |
| | | } |
| | | log.info("处理完成导入数据"); |
| | | |
| | | log.info("开始执行数据库导入"); |
| | | if (!saveList.isEmpty()) { |
| | | log.info("执行数据库导入线下认证记录"); |
| | | comPensionAuthRecordService.saveBatch(saveList); |
| | | log.info("数据库导入线下认证记录完成"); |
| | | } |
| | | if (!updateList.isEmpty()) { |
| | | log.info("执行数据库更新线下认证记录"); |
| | | comPensionAuthRecordDAO.updateAll(updateList); |
| | | log.info("数据库更新线下认证记录完成"); |
| | | } |
| | | log.info("执行数据库导入完成"); |
| | | |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("返回错误数据"); |
| | | return R.fail(mistakes); |
| | | } |
| | | return R.ok(mistakes); |
| | | } |
| | | |
| | | @Override |
| | | public R exportPensionAuthRecordsStatistic(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | List<ComPensionAuthRecordStatisticExcleVO> comPensionAuthRecordStatisticExcleVOS = comPensionAuthRecordDAO.exportPensionAuthRecordsStatistic(pageElderAuthRecordsDTO); |
| | | return R.ok(comPensionAuthRecordStatisticExcleVOS); |
| | | } |
| | | |
| | | @Override |
| | | public R setPensionAuthType(Long communityId, Integer type) { |
| | | List<SysConfDO> authConf = |
| | | sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>().eq(SysConfDO::getCommunityId, communityId) |
| | | .eq(SysConfDO::getCode, "PENSION_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); |
| | | if (authConf != null && authConf.size() > 0) { |
| | | SysConfDO first = authConf.get(0); |
| | | first.setValue(type + ""); |
| | | int updated = sysConfDao.updateById(first); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R communityPensionAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"PENSION_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("PENSION_AUTH_TYPE"); |
| | | sysConfDO.setName("养老认证类型"); |
| | | sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) |
| | | sysConfDO.setDescription("养老认证默认添加的核验类型"); |
| | | sysConfDO.setCommunityId(communityId); |
| | | sysConfDO.setCreateBy(eldersAuthTypeQueryDTO.getUserId()); |
| | | 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(); |
| | | } |
| | | |
| | | @Override |
| | | public R timedTaskPensionAuthStatisticsJobHandler() { |
| | | Date nowDate = new Date(); |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | int year = DateUtils.getYear(nowDate); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | actList.forEach(act -> { |
| | | //养老认证统计 |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO = new ComPensionAuthStatisticsDO(); |
| | | comPensionAuthStatisticsDO.setCommunityId(act.getCommunityId()); |
| | | comPensionAuthStatisticsDO.setMonth(month); |
| | | comPensionAuthStatisticsDO.setYear(year); |
| | | comPensionAuthStatisticsDO.setCreateAt(nowDate); |
| | | //本期应认证人数 |
| | | List<ComPensionAuthPensionerDO> comPensionAuthPensionerDOS = comPensionAuthPensionerDAO.selectList(new QueryWrapper<ComPensionAuthPensionerDO>().lambda() |
| | | .eq(ComPensionAuthPensionerDO::getCommunityId, act.getCommunityId()) |
| | | .eq(ComPensionAuthPensionerDO::getIsAlive, 1) |
| | | .eq(ComPensionAuthPensionerDO::getIsRegister, 1)); |
| | | if (null != comPensionAuthPensionerDOS) { |
| | | comPensionAuthStatisticsDO.setSum(comPensionAuthPensionerDOS.size()); |
| | | } |
| | | comPensionAuthStatisticsDAO.insert(comPensionAuthStatisticsDO); |
| | | //上期已认证人数 |
| | | int authSum = comPensionAuthPensionerDAO.havePensionAuthPensionerAmount(act.getCommunityId(), String.valueOf(year - 1)); |
| | | ComPensionAuthStatisticsDO comPensionAuthStatisticsDO1 = comPensionAuthStatisticsDAO.selectOne(new QueryWrapper<ComPensionAuthStatisticsDO>() |
| | | .lambda().eq(ComPensionAuthStatisticsDO::getCommunityId, act.getCommunityId()).eq(ComPensionAuthStatisticsDO::getYear, year - 1)); |
| | | comPensionAuthStatisticsDO1.setAuthSum(authSum); |
| | | comPensionAuthStatisticsDO1.setNoAuthSum(comPensionAuthStatisticsDO1.getSum() - comPensionAuthStatisticsDO1.getAuthSum()); |
| | | comPensionAuthStatisticsDAO.updateById(comPensionAuthStatisticsDO1); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | private ComPensionAuthRecordDO updatePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo, ComPensionAuthRecordDO comPensionAuthRecordsDO, Long userId) { |
| | | BeanUtils.copyProperties(vo, comPensionAuthRecordsDO); |
| | | comPensionAuthRecordsDO.setSubmitUserId(userId); |
| | | comPensionAuthRecordsDO.setApproverId(userId); |
| | | comPensionAuthRecordsDO.setApprovalStatus(3); |
| | | comPensionAuthRecordsDO.setApprovalDate(new Date()); |
| | | comPensionAuthRecordsDO.setAuthStatus(1); |
| | | return comPensionAuthRecordsDO; |
| | | } |
| | | |
| | | private ComPensionAuthRecordDO savePensionAuthRecordsDO(ComPensionAuthRecordImportExcelVO vo, ComPensionAuthPensionerDO comPensionAuthPensionerDO, String authPeriod, Long userId) { |
| | | ComPensionAuthRecordDO comPensionAuthRecordDO = new ComPensionAuthRecordDO(); |
| | | BeanUtils.copyProperties(vo, comPensionAuthRecordDO); |
| | | comPensionAuthRecordDO.setId(Snowflake.getId()); |
| | | comPensionAuthRecordDO.setPensionerId(comPensionAuthPensionerDO.getId()); |
| | | comPensionAuthRecordDO.setAuthPeriod(authPeriod); |
| | | comPensionAuthRecordDO.setSubmitUserId(userId); |
| | | comPensionAuthRecordDO.setApproverId(userId); |
| | | comPensionAuthRecordDO.setApprovalStatus(3); |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | comPensionAuthRecordDO.setAuthStatus(1); |
| | | return comPensionAuthRecordDO; |
| | | } |
| | | |
| | | private void setMistake(ComPensionAuthRecordImportMistakeExcelVO mvo, |
| | | ComPensionAuthRecordImportExcelVO vo) { |
| | | mvo.setIsAlive(PopulHouseUseEnum.getCnDescByName(vo.getIsAlive())); |
| | | } |
| | | |
| | | /** |
| | | * 判重方法 |
| | | * |
| | | * @param key |
| | | * 主键 |
| | | * @param hashMap |
| | | * 数据集 |
| | | * @return 存在即为false 不存在则为true |
| | | */ |
| | | private boolean isOnly(String key, HashMap<String, Object> hashMap) { |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthStatisticsDAO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthStatisticsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @title: ComPensionAuthStatisticsServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 养老认证统计服务实现类 |
| | | * @author: txb |
| | | * @date: 2021/09/07 17:35 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComPensionAuthStatisticsServiceImpl extends ServiceImpl<ComPensionAuthStatisticsDAO, ComPensionAuthStatisticsDO> implements ComPensionAuthStatisticsService { |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; |
| | | import com.panzhihua.service_community.model.dos.ComSwSafetyWorkRecordDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R editDangerReport(ComSwDangerReportEditDTO comSwDangerReportEditDTO) { |
| | | ComSwDangerReportDO comSwDangerReportDO = comSwDangerReportDAO.selectById(comSwDangerReportEditDTO.getId()); |
| | | if (null == comSwDangerReportDO) { |
| | | return R.fail("该隐患报告不存在"); |
| | | } |
| | | BeanUtils.copyProperties(comSwDangerReportEditDTO, comSwDangerReportDO); |
| | | comSwDangerReportDO.setDangerType(comSwDangerReportEditDTO.getPatrolType()); |
| | | ComSwPatrolRecordReportDO comSwPatrolRecordReportDO = comSwPatrolRecordReportDAO.selectOne(new QueryWrapper<ComSwPatrolRecordReportDO>() |
| | | .lambda().eq(ComSwPatrolRecordReportDO::getReportId, comSwDangerReportEditDTO.getId())); |
| | | ComSwPatrolRecordDO comSwPatrolRecordDO = new ComSwPatrolRecordDO(); |
| | | if (null != comSwPatrolRecordReportDO) { |
| | | comSwPatrolRecordDO = comSwPatrolRecordDAO.selectOne(new QueryWrapper<ComSwPatrolRecordDO>() |
| | | .lambda().eq(ComSwPatrolRecordDO::getId, comSwPatrolRecordReportDO.getPatrolRecordId())); |
| | | Long id = comSwPatrolRecordDO.getId(); |
| | | BeanUtils.copyProperties(comSwDangerReportEditDTO, comSwPatrolRecordDO); |
| | | comSwPatrolRecordDO.setId(id); |
| | | try { |
| | | comSwPatrolRecordDO.setPatrolTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwDangerReportEditDTO.getPatrolTime())); |
| | | comSwPatrolRecordDO.setSuccessionTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwDangerReportEditDTO.getSuccessionTime())); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 根据传递的巡查人员id查询巡查人员的名字和电话 |
| | | StringBuilder nameString = new StringBuilder(); |
| | | StringBuilder phoneString = new StringBuilder(); |
| | | if (StringUtils.isNotEmpty(comSwDangerReportEditDTO.getPatrolPerson())) { |
| | | String[] personIds = comSwDangerReportEditDTO.getPatrolPerson().split(","); |
| | | for (int i = 0; i < personIds.length; i++) { |
| | | Map<String, String> person = comSwPatrolRecordDAO.getPbServiceTeamById(personIds[i]); |
| | | if (person != null) { |
| | | if (i != 0) { |
| | | nameString.append(","); |
| | | phoneString.append(","); |
| | | } |
| | | nameString.append(person.get("name")); |
| | | phoneString.append(person.get("phone")); |
| | | } |
| | | } |
| | | comSwPatrolRecordDO.setPersonName(nameString.toString()); |
| | | comSwPatrolRecordDO.setPersonPhone(phoneString.toString()); |
| | | } |
| | | } |
| | | comSwPatrolRecordDAO.updateById(comSwPatrolRecordDO); |
| | | comSwDangerReportDAO.updateById(comSwDangerReportDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R detailDangerReport(Long dangerReportId) { |
| | | ComSwDangerReportDO comSwDangerReportDO = comSwDangerReportDAO.selectById(dangerReportId); |
| | | if (null == comSwDangerReportDO) { |
| | |
| | | ComSwPatrolRecordDO comSwPatrolRecordDO = |
| | | comSwPatrolRecordDAO.selectById(comSwPatrolRecordReportDO.getPatrolRecordId()); |
| | | BeanUtils.copyProperties(comSwPatrolRecordDO, comSwDangerReportVO); |
| | | comSwDangerReportVO.setPatrolTime(new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordDO.getPatrolTime())); |
| | | } |
| | | BeanUtils.copyProperties(comSwDangerReportDO, comSwDangerReportVO); |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordEditDTO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R editPatrolRecord(ComSwPatrolRecordEditDTO comSwPatrolRecordEditDTO) { |
| | | ComSwPatrolRecordDO comSwPatrolRecordDO = comSwPatrolRecordDAO.selectById(comSwPatrolRecordEditDTO.getId()); |
| | | if (null == comSwPatrolRecordDO) { |
| | | return R.fail("改巡查记录不存在"); |
| | | } |
| | | BeanUtils.copyProperties(comSwPatrolRecordEditDTO, comSwPatrolRecordDO); |
| | | try { |
| | | comSwPatrolRecordDO.setPatrolTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwPatrolRecordEditDTO.getPatrolTime())); |
| | | comSwPatrolRecordDO.setSuccessionTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwPatrolRecordEditDTO.getSuccessionTime())); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 根据传递的巡查人员id查询巡查人员的名字和电话 |
| | | StringBuilder nameString = new StringBuilder(); |
| | | StringBuilder phoneString = new StringBuilder(); |
| | | if (StringUtils.isNotEmpty(comSwPatrolRecordEditDTO.getPatrolPerson())) { |
| | | String[] personIds = comSwPatrolRecordEditDTO.getPatrolPerson().split(","); |
| | | for (int i = 0; i < personIds.length; i++) { |
| | | Map<String, String> person = comSwPatrolRecordDAO.getPbServiceTeamById(personIds[i]); |
| | | if (person != null) { |
| | | if (i != 0) { |
| | | nameString.append(","); |
| | | phoneString.append(","); |
| | | } |
| | | nameString.append(person.get("name")); |
| | | phoneString.append(person.get("phone")); |
| | | } |
| | | } |
| | | comSwPatrolRecordDO.setPersonName(nameString.toString()); |
| | | comSwPatrolRecordDO.setPersonPhone(phoneString.toString()); |
| | | } |
| | | ComSwPatrolRecordReportDO comSwPatrolRecordReportDO = comSwPatrolRecordReportDAO.selectOne(new QueryWrapper<ComSwPatrolRecordReportDO>() |
| | | .lambda().eq(ComSwPatrolRecordReportDO::getPatrolRecordId, comSwPatrolRecordEditDTO.getId())); |
| | | ComSwSafetyWorkRecordDO comSwSafetyWorkRecordDO = comSwSafetyWorkRecordDAO.selectOne(new QueryWrapper<ComSwSafetyWorkRecordDO>() |
| | | .lambda().eq(ComSwSafetyWorkRecordDO::getId, comSwPatrolRecordReportDO.getReportId())); |
| | | if (null != comSwSafetyWorkRecordDO) { |
| | | Long id = comSwSafetyWorkRecordDO.getId(); |
| | | BeanUtils.copyProperties(comSwPatrolRecordEditDTO, comSwSafetyWorkRecordDO); |
| | | comSwSafetyWorkRecordDO.setId(id); |
| | | comSwSafetyWorkRecordDAO.updateById(comSwSafetyWorkRecordDO); |
| | | }else { |
| | | ComSwDangerReportDO comSwDangerReportDO = comSwDangerReportDAO.selectOne(new QueryWrapper<ComSwDangerReportDO>() |
| | | .lambda().eq(ComSwDangerReportDO::getId, comSwPatrolRecordReportDO.getReportId())); |
| | | Long id = comSwDangerReportDO.getId(); |
| | | BeanUtils.copyProperties(comSwPatrolRecordEditDTO, comSwDangerReportDO); |
| | | comSwDangerReportDO.setId(id); |
| | | comSwDangerReportDAO.updateById(comSwDangerReportDO); |
| | | } |
| | | int update = comSwPatrolRecordDAO.updateById(comSwPatrolRecordDO); |
| | | if (update > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("编辑失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R detailPatrolRecord(Long patrolRecordId) { |
| | | ComSwPatrolRecordDO comSwPatrolRecordDO = comSwPatrolRecordDAO.selectById(patrolRecordId); |
| | | if (null == comSwPatrolRecordDO) { |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwSafetyWorkEditDTO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R editSafetyWork(ComSwSafetyWorkEditDTO comSwSafetyWorkEditDTO) { |
| | | ComSwSafetyWorkRecordDO comSwSafetyWorkRecordDO = comSwSafetyWorkRecordDAO.selectById(comSwSafetyWorkEditDTO.getId()); |
| | | if (null == comSwSafetyWorkRecordDO) { |
| | | return R.fail("该安全工作记录不存在"); |
| | | } |
| | | comSwSafetyWorkRecordDO.setRemark(comSwSafetyWorkEditDTO.getRemark()); |
| | | comSwSafetyWorkRecordDO.setUpdateBy(comSwSafetyWorkEditDTO.getUpdateBy()); |
| | | ComSwPatrolRecordReportDO comSwPatrolRecordReportDO = comSwPatrolRecordReportDAO.selectOne(new QueryWrapper<ComSwPatrolRecordReportDO>() |
| | | .lambda().eq(ComSwPatrolRecordReportDO::getReportId, comSwSafetyWorkEditDTO.getId())); |
| | | ComSwPatrolRecordDO comSwPatrolRecordDO = new ComSwPatrolRecordDO(); |
| | | if (null != comSwPatrolRecordReportDO) { |
| | | comSwPatrolRecordDO = comSwPatrolRecordDAO.selectOne(new QueryWrapper<ComSwPatrolRecordDO>() |
| | | .lambda().eq(ComSwPatrolRecordDO::getId, comSwPatrolRecordReportDO.getPatrolRecordId())); |
| | | Long id = comSwPatrolRecordDO.getId(); |
| | | BeanUtils.copyProperties(comSwSafetyWorkEditDTO, comSwPatrolRecordDO); |
| | | comSwPatrolRecordDO.setId(id); |
| | | try { |
| | | comSwPatrolRecordDO.setPatrolTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwSafetyWorkEditDTO.getPatrolTime())); |
| | | comSwPatrolRecordDO.setSuccessionTime(new SimpleDateFormat("yyyy-MM-dd").parse(comSwSafetyWorkEditDTO.getSuccessionTime())); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 根据传递的巡查人员id查询巡查人员的名字和电话 |
| | | StringBuilder nameString = new StringBuilder(); |
| | | StringBuilder phoneString = new StringBuilder(); |
| | | if (StringUtils.isNotEmpty(comSwSafetyWorkEditDTO.getPatrolPerson())) { |
| | | String[] personIds = comSwSafetyWorkEditDTO.getPatrolPerson().split(","); |
| | | for (int i = 0; i < personIds.length; i++) { |
| | | Map<String, String> person = comSwPatrolRecordDAO.getPbServiceTeamById(personIds[i]); |
| | | if (person != null) { |
| | | if (i != 0) { |
| | | nameString.append(","); |
| | | phoneString.append(","); |
| | | } |
| | | nameString.append(person.get("name")); |
| | | phoneString.append(person.get("phone")); |
| | | } |
| | | } |
| | | comSwPatrolRecordDO.setPersonName(nameString.toString()); |
| | | comSwPatrolRecordDO.setPersonPhone(phoneString.toString()); |
| | | } |
| | | } |
| | | comSwPatrolRecordDAO.updateById(comSwPatrolRecordDO); |
| | | comSwSafetyWorkRecordDAO.updateById(comSwSafetyWorkRecordDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R detailSafetyWorkRecord(Long safetyWorkRecordId, Long communityId) { |
| | | ComSwSafetyWorkRecordDO swSafetyWorkRecordDO = comSwSafetyWorkRecordDAO.selectById(safetyWorkRecordId); |
| | | if (null == swSafetyWorkRecordDO) { |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComEldersAuthHistoryRecordMapper comEldersAuthHistoryRecordMapper; |
| | | @Resource |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | |
| | | public R communityAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE"); |
| | |
| | | pageEldersAuthElderlyDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R getAuthHistoryExport(PageEldersAuthHistoryDTO pageEldersAuthElderlyDTO) { |
| | | Date startTime = |
| | | DateUtils.getYearMonthStart(pageEldersAuthElderlyDTO.getYear(), pageEldersAuthElderlyDTO.getMonth()); |
| | |
| | | }); |
| | | return R.ok(authHistoryExcelVOS); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskEldersAuthJobHandler(){ |
| | | |
| | | Date nowDate = new Date(); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | |
| | | actList.forEach(act -> { |
| | | //查询社区老人认证统计信息,并存储到数据库中 |
| | | Map<String,Object> resultMap = this.baseMapper.getEldersAuthStatistics(act.getCommunityId()); |
| | | if(resultMap != null){ |
| | | ComEldersAuthStatisticsDO authStatisticsDO = new ComEldersAuthStatisticsDO(); |
| | | authStatisticsDO.setCommunityId(act.getCommunityId()); |
| | | authStatisticsDO.setMonth(DateUtils.getMonth(nowDate) + 1); |
| | | authStatisticsDO.setYear(DateUtils.getYear(nowDate)); |
| | | authStatisticsDO.setCreateAt(nowDate); |
| | | authStatisticsDO.setSum(Integer.parseInt(resultMap.get("oldCount").toString())); |
| | | authStatisticsDO.setNoAuthSum(Integer.parseInt(resultMap.get("noCount").toString())); |
| | | authStatisticsDO.setAuthSum(Integer.parseInt(resultMap.get("yesCount").toString())); |
| | | comEldersAuthStatisticsMapper.insert(authStatisticsDO); |
| | | } |
| | | }); |
| | | //重置所有人的认证状态 |
| | | comEldersAuthUserMapper.updateAuthStatus(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskEldersRecordAuthJobHandler(){ |
| | | Date nowDate = new Date(); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | |
| | | actList.forEach(act -> { |
| | | //查询社区上月所有视频认证 |
| | | List<ComEldersAuthHistoryVO> authList = eldersAuthDAO.getEldersAuthRecords(act.getCommunityId()); |
| | | authList.forEach(auth -> { |
| | | if(auth.getUserId() != null){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | authHistoryRecordDO.setCommunityId(auth.getCommunityId()); |
| | | authHistoryRecordDO.setCreateAt(auth.getCreateAt()); |
| | | authHistoryRecordDO.setAuthId(auth.getId()); |
| | | authHistoryRecordDO.setUserId(auth.getUserId()); |
| | | authHistoryRecordDO.setBrithday(auth.getBirthday()); |
| | | authHistoryRecordDO.setDomicile(auth.getDomicile()); |
| | | authHistoryRecordDO.setIdCard(auth.getIdCard()); |
| | | authHistoryRecordDO.setName(auth.getName()); |
| | | authHistoryRecordDO.setIsAuth(1); |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(auth.getIdCard()); |
| | | authHistoryRecordDO.setAge(age); |
| | | }catch (Exception e){ |
| | | log.error("年龄转换失败"); |
| | | } |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | }); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | WHEN caae.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | |
| | | FROM |
| | | com_act_act_evaluate caae |
| | | LEFT JOIN com_act_act_sign caas ON caae.activity_id = caas.activity_id |
| | | LEFT JOIN sys_user su ON caae.user_id = su.user_id |
| | | where caae.activity_id = #{comActActEvaluateVO.activityId} |
| | | <if test="comActActEvaluateVO.phone != null and comActActEvaluateVO.phone !=''"> |
| | |
| | | <if test="comActActEvaluateVO.name != null and comActActEvaluateVO.name !=''"> |
| | | AND su.`name` = #{comActActEvaluateVO.name} |
| | | </if> |
| | | <if test="comActActEvaluateVO.starLevel != null"> |
| | | <if test="comActActEvaluateVO.starLevel != null and comActActEvaluateVO.starLevel != 0"> |
| | | AND caae.star_level = #{comActActEvaluateVO.starLevel} |
| | | </if> |
| | | <if test="comActActEvaluateVO.createAt != null"> |
| | |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | WHEN caae.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | |
| | | FROM |
| | | com_act_act_evaluate caae |
| | | LEFT JOIN com_act_act_sign caas ON caae.activity_id = caas.activity_id |
| | | LEFT JOIN sys_user su ON caae.user_id = su.user_id |
| | | where caae.activity_id = #{comActActEvaluateVO.activityId} |
| | | <if test="comActActEvaluateVO.phone != null and comActActEvaluateVO.phone !=''"> |
| | |
| | | <if test="comActActEvaluateVO.name != null and comActActEvaluateVO.name !=''"> |
| | | AND su.`name` = #{comActActEvaluateVO.name} |
| | | </if> |
| | | <if test="comActActEvaluateVO.starLevel != null"> |
| | | <if test="comActActEvaluateVO.starLevel != null and comActActEvaluateVO.starLevel != 0"> |
| | | AND caae.star_level = #{comActActEvaluateVO.starLevel} |
| | | </if> |
| | | <if test="comActActEvaluateVO.createAt != null"> |
| | |
| | | </if> |
| | | order by caae.create_at desc |
| | | </select> |
| | | |
| | | <select id="getEvaluateListPage" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateVO"> |
| | | SELECT |
| | | caae.*,su.`name`,su.nick_name,su.image_url |
| | | FROM |
| | | com_act_act_evaluate AS caae |
| | | LEFT JOIN sys_user AS su ON su.user_id = caae.user_id |
| | | where caae.activity_id = #{activityId} |
| | | order by caae.create_at desc |
| | | </select> |
| | | |
| | | <select id="getEvaluateListByUserId" resultType="com.panzhihua.common.model.vos.community.ComActActEvaluateVO"> |
| | | SELECT |
| | | caae.*,su.`name`,su.nick_name,su.image_url |
| | | FROM |
| | | com_act_act_evaluate AS caae |
| | | LEFT JOIN sys_user AS su ON su.user_id = caae.user_id |
| | | where caae.activity_id = #{activityId} and caae.user_id = #{userId} |
| | | order by caae.create_at desc |
| | | limit 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | WHEN caar.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | |
| | | FROM |
| | | com_act_act_regist caar |
| | | LEFT JOIN com_act_act_sign caas ON caar.activity_id = caas.activity_id |
| | | LEFT JOIN sys_user su ON caar.user_id = su.user_id |
| | | where caar.activity_id = #{comActActRegistVO.activityId} |
| | | <if test="comActActRegistVO.phone != null and comActActRegistVO.phone !=''"> |
| | |
| | | AND su.`name` = #{comActActRegistVO.name} |
| | | </if> |
| | | <if test="comActActRegistVO.tags != null and comActActRegistVO.tags !=''"> |
| | | AND su.tags like ('%', #{comActActRegistVO.tags}, '%') |
| | | AND su.tags like concat ('%', #{comActActRegistVO.tags}, '%') |
| | | </if> |
| | | <if test="comActActRegistVO.createAt != null"> |
| | | AND caar.create_at = #{comActActRegistVO.createAt} |
| | |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | WHEN caar.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | |
| | | FROM |
| | | com_act_act_regist caar |
| | | LEFT JOIN com_act_act_sign caas ON caar.activity_id = caas.activity_id |
| | | LEFT JOIN sys_user su ON caar.user_id = su.user_id |
| | | where caar.activity_id = #{comActActRegistVO.activityId} |
| | | <if test="comActActRegistVO.phone != null and comActActRegistVO.phone !=''"> |
| | |
| | | SELECT |
| | | count( id ) AS examineNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = #{communityId} AND del_tag = 0 ) AS verificationNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 3 AND community_id = #{communityId} AND del_tag = 0 ) AS rejectNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` in (1,2,4) AND `is_publicity` = 1 AND community_id = #{communityId} AND del_tag = 0 ) AS rejectNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = #{communityId} AND del_tag = 0 ) AS completeNum, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1) as yzAllTotal, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as yzDayTotal, |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActMicroWishDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActMicroWishDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="sponsor_id" property="sponsorId" /> |
| | | <result column="sponsor_phone" property="sponsorPhone" /> |
| | | <result column="wish_name" property="wishName" /> |
| | | <result column="status" property="status" /> |
| | | <result column="form" property="form" /> |
| | | <result column="responsible_id" property="responsibleId" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="examine_at" property="examineAt" /> |
| | | <result column="distribution_at" property="distributionAt" /> |
| | | <result column="feedback_at" property="feedbackAt" /> |
| | | <result column="evaluate_at" property="evaluateAt" /> |
| | | <result column="score" property="score" /> |
| | | <result column="detail" property="detail" /> |
| | | <result column="photo_path_list" property="photoPathList" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="evaluate" property="evaluate" /> |
| | | <result column="finish_at" property="finishAt" /> |
| | | <result column="finish_photo_path_list" property="finishPhotoPathList" /> |
| | | <result column="finish" property="finish" /> |
| | | <result column="reject_reason" property="rejectReason" /> |
| | | <result column="feedback" property="feedback" /> |
| | | <result column="feedback_photo_path_list" property="feedbackPhotoPathList" /> |
| | | <result column="aim_num" property="aimNum" /> |
| | | <result column="img_width" property="imgWidth" /> |
| | | <result column="img_height" property="imgHeight" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, sponsor_id, sponsor_phone, wish_name, status, form, responsible_id, create_at, examine_at, distribution_at, feedback_at, evaluate_at, score, detail, photo_path_list, community_id, evaluate, finish_at, finish_photo_path_list, finish, reject_reason, feedback, feedback_photo_path_list, aim_num, img_width, img_height |
| | | </sql> |
| | | |
| | | <select id="pageMicroWishApplets" parameterType="com.panzhihua.common.model.vos.community.ComActMicroWishVO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO"> |
| | | 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.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 |
| | | left JOIN com_pb_service_team su ON w.responsible_id = su.id |
| | | <where> |
| | | <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'> |
| | | and w.community_id=#{comActMicroWishVO.communityId} |
| | | </if> |
| | | <if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'> |
| | | AND w.`status` in (2,3) |
| | | </if> |
| | | <if test='comActMicroWishVO.status == 6 and comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'> |
| | | AND w.`status` in (5,6) |
| | | </if> |
| | | <if test='comActMicroWishVO.status == 7 and comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'> |
| | | AND w.`status` = 7 |
| | | </if> |
| | | <if test='comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0 and comActMicroWishVO.status != null and comActMicroWishVO.status != 7 and comActMicroWishVO.status != 6 and comActMicroWishVO.status != 3'> |
| | | AND w.status in (3, 5, 6) |
| | | </if> |
| | | <if test='comActMicroWishVO.userId != null and comActMicroWishVO.userId != 0'> |
| | | AND w.sponsor_id =#{comActMicroWishVO.userId} |
| | | </if> |
| | | </where> |
| | | group by w.id |
| | | ORDER BY w.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="user_id" property="userId" /> |
| | | <result column="wish_id" property="wishId" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="img_url" property="imgUrl" /> |
| | | <result column="type" property="type"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, content, user_id, wish_id, create_time |
| | | id, content, user_id, wish_id, create_time, remark, img_url |
| | | </sql> |
| | | |
| | | <select id="getByWishId" resultType="com.panzhihua.common.model.vos.community.ComActMicroWishOperationRecordVO"> |
| | |
| | | <select id="selectId" resultType="Long"> |
| | | select id from com_act_micro_wish |
| | | <where> |
| | | 1=1 |
| | | 1=1 and community_id = #{communityId} |
| | | <if test="status !=null"> |
| | | and status=#{status} |
| | | </if> |
| | |
| | | su.nick_name like concat (#{neighborCircleAppDTO.keyWord},'%') or |
| | | canc.release_content like concat (#{neighborCircleAppDTO.keyWord},'%')) |
| | | </if> |
| | | <if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 1'> |
| | | order by canc.hot_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.is_boutique asc |
| | | </if> |
| | | order by canc.create_at desc |
| | | </select> |
| | | |
| | | <update id="addHotNum"> |
| | |
| | | LEFT JOIN sys_user u ON nc.release_id = u.user_id |
| | | LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id |
| | | <where> |
| | | nc.community_id = #{neighborCircleAdminDTO.communityId} |
| | | nc.community_id = #{neighborCircleAdminDTO.communityId} and is_del = 2 |
| | | <if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != ""'> |
| | | and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%') |
| | | </if> |
| | |
| | | canct.`name`, |
| | | canct.`status`, |
| | | canct.create_at, |
| | | ( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count`, |
| | | su.`name` as createBy |
| | | FROM |
| | | com_act_neighbor_circle_topic AS canct |
| | |
| | | </select> |
| | | |
| | | <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO"> |
| | | select id,`name`,hot_num,`count` from com_act_neighbor_circle_topic where `status` = 1 and community_id = #{communityId} |
| | | SELECT canct.id, canct.`name`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count` |
| | | from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = #{communityId} |
| | | <if test="isZero != null and isZero == 1"> |
| | | and `count` > 0 |
| | | </if> |
| | | order by hot_num desc |
| | | <if test="name != null and name != """> |
| | | and canct.`name` like concat('%',#{name},'%') |
| | | </if> |
| | | order by `count` desc |
| | | </select> |
| | | |
| | | <update id="addHotNum"> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActQuestnaireAnswerContentDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActQuestnaireAnswerContentDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="choice" property="choice" /> |
| | | <result column="answer_content" property="answerContent" /> |
| | | <result column="sub_id" property="subId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="selection_id" property="selectionId" /> |
| | | <result column="answer_id" property="answerId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_by, create_at, update_by, update_at, choice, answer_content, sub_id, user_id, type, selection_id, answer_id |
| | | </sql> |
| | | |
| | | <select id="selectListByQuestnaire" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO"> |
| | | SELECT |
| | | caqs.type AS optionType, |
| | | caqac.answer_id as reserveRecordId, |
| | | caqac.sub_id as reserveSubId, |
| | | caqac.answer_content, |
| | | caqac.type, |
| | | caqac.id, |
| | | su.nick_name, |
| | | caqua.create_at AS `time` |
| | | FROM |
| | | com_act_questnaire_answer_content caqac |
| | | LEFT JOIN com_act_questnaire_sub caqs ON caqac.selection_id = caqs.id |
| | | LEFT JOIN com_act_questnaire caq ON caqs.que_Id = caq.id |
| | | LEFT JOIN sys_user su ON caqac.user_id = su.user_id |
| | | LEFT JOIN com_act_questnaire_user_answer caqua ON caqua.id = caqac.answer_id |
| | | WHERE |
| | | caq.id = #{questId} |
| | | ORDER BY |
| | | caqac.id ASC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | start_time BETWEEN #{startTime} AND #{endTime} OR |
| | | end_time BETWEEN #{startTime} AND #{endTime} |
| | | ) |
| | | and is_hide = 0 and state != 3 |
| | | <if test="id != null"> |
| | | AND id != #{id} |
| | | </if> |
| | |
| | | |
| | | <select id="selectListByReserve" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO"> |
| | | SELECT |
| | | ac.*,su.nick_name,carr.create_at as `time` |
| | | qs.type as optionType,ac.*,su.nick_name,carr.create_at as `time` |
| | | FROM |
| | | com_act_reserve_answer_content ac |
| | | LEFT JOIN com_act_reserve_sub qs ON ac.reserve_sub_id = qs.id |
| | |
| | | LEFT JOIN com_act_reserve_record carr ON carr.id = ac.reserve_record_id |
| | | WHERE |
| | | qn.id = #{reserveId} |
| | | order by ac.id asc |
| | | </select> |
| | | |
| | | <select id="pageRegisterDetailedListAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO" |
| | |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | | SELECT |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId,car.`type` |
| | | FROM |
| | | com_act_reserve_answer_content AS carac |
| | | LEFT JOIN com_act_reserve_sub AS car ON car.id = carac.reserve_sub_id |
| | |
| | | <update id="addReserveCountById"> |
| | | update com_act_reserve set join_count = join_count - 1 where id = #{reserveId} |
| | | </update> |
| | | |
| | | <select id="getReserveIndexList" resultType="com.panzhihua.common.model.vos.community.ComActReserveIndexVo"> |
| | | select id,title,type,img_type,img_url,adver_position_top,adver_position_application from com_act_reserve where `status` = 2 and is_del = 2 |
| | | and community_id = #{communityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_at" property="updateAt"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="handle_id" property="handleId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, reserve_id, community_id, type, name, phone, status, content, remark, act_remark, reserve_time, json_object, create_at, create_by, update_at, update_by |
| | | id, user_id, reserve_id, community_id, type, name, phone, status, content, remark, act_remark, reserve_time, json_object, create_at, create_by, update_at, update_by, handle_id |
| | | </sql> |
| | | |
| | | <select id="pageReserveList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRecordListVO"> |
| | | <select id="pageReserveList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveAppletsVO"> |
| | | select t.*,t1.title from com_act_reserve_record t left join com_act_reserve t1 on t.reserve_id = t1.id |
| | | <where> |
| | | 1=1 |
| | |
| | | and t.user_id =#{pageUserReserveDTO.userId} |
| | | </if> |
| | | </where> |
| | | order by t.create_at desc |
| | | </select> |
| | | |
| | | <select id="pageMakeAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO" |
| | |
| | | |
| | | <select id="registerStatisticsExportAdmin" parameterType="com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterStatisticsAdminVO"> |
| | | SELECT |
| | | car.title, |
| | | count( carr.id ) AS count, |
| | | ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount |
| | | SELECT DISTINCT |
| | | car.id, |
| | | car.title, |
| | | ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 AND reserve_id = car.id |
| | | <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime} |
| | | </if> |
| | | <if test="registerStatisticsDTO.endTime != null and registerStatisticsDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{registerStatisticsDTO.endTime} |
| | | </if> |
| | | ) AS count, |
| | | ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id |
| | | com_act_reserve AS car |
| | | WHERE |
| | | carr.type = 2 |
| | | AND carr.community_id = #{registerStatisticsDTO.communityId} |
| | | AND carr.`status` = 2 |
| | | <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime} |
| | | </if> |
| | | <if test="registerStatisticsDTO.endTime != null and registerStatisticsDTO.endTime != """> |
| | | AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{registerStatisticsDTO.endTime} |
| | | </if> |
| | | car.type = 2 |
| | | AND car.community_id = #{registerStatisticsDTO.communityId} |
| | | |
| | | GROUP BY |
| | | car.id |
| | | </select> |
| | |
| | | carr.phone, |
| | | carr.reserve_time, |
| | | carr.`content`, |
| | | carr.remark, |
| | | su1.`name` as remark, |
| | | carr.act_remark, |
| | | carr.`status`, |
| | | car.`title`, |
| | |
| | | FROM |
| | | com_act_reserve_record AS carr |
| | | LEFT JOIN sys_user AS su ON su.user_id = carr.user_id |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = carr.handle_id |
| | | LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id |
| | | WHERE |
| | | carr.`type` = 1 |
| | |
| | | <where> |
| | | <if test="reserveRecordId!=null"> |
| | | and reserve_record_id =#{reserveRecordId} |
| | | </if> |
| | | <if test="userId!=null"> |
| | | and user_id =#{userId} |
| | | </if> |
| | | <if test="type!=null"> |
| | | and type =#{type} |
| | |
| | | </sql> |
| | | |
| | | <select id="getReserveSubjectList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO"> |
| | | select id,content from com_act_reserve_sub where reserve_id = #{reserveId} order by id asc |
| | | select id,content,`type` from com_act_reserve_sub where reserve_id = #{reserveId} order by id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="url" property="url" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, reserve_id, reserve_sub_id, key, type, sort, option_name, content, create_at, create_by, update_at, update_by |
| | | id, reserve_id, reserve_sub_id, key, type, sort, option_name, content, create_at, create_by, update_at, update_by, url |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="classify_name" property="classifyName" /> |
| | | <result column="picture_url" property="pictureUrl" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="sys_flag" property="sysFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, classify_name, picture_url, create_at, sys_flag |
| | | </sql> |
| | | |
| | | <select id="pageWorkGuideClassify" resultType="com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO"> |
| | | select |
| | | id, |
| | | classify_name, |
| | | picture_url, |
| | | create_at, |
| | | sys_flag |
| | | from com_act_work_guide_classify |
| | | <where> |
| | | <if test="comActWorkGuideClassifyVO.classifyName != null and comActWorkGuideClassifyVO.classifyName !=''"> |
| | | AND classify_name like concat ('%', #{comActWorkGuideClassifyVO.classifyName}, '%') |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="listWorkGuideClassify" resultType="com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO"> |
| | | SELECT cawgc.id, cawgc.classify_name, cawgc.picture_url,( SELECT count( id ) FROM com_act_work_guide WHERE classify = cawgc.id ) AS `count` |
| | | FROM |
| | | com_act_work_guide_classify AS cawgc |
| | | order by `count` asc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActWorkGuideDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActWorkGuideDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="title" property="title" /> |
| | | <result column="content" property="content" /> |
| | | <result column="classify" property="classify" /> |
| | | <result column="time_at" property="timeAt" /> |
| | | <result column="address" property="address" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="lon" property="lon" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, title, content, classify, time_at, address, phone, lon, lat, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | <select id="getWorkGuideListByClassifyId" resultType="com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO"> |
| | | select id ,title,content,classify,time_at,address,phone,create_at from com_act_work_guide where classify = #{classifyId} |
| | | order by create_at desc |
| | | <if test="pageSize != null"> |
| | | limit #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComElderAuthElderliesDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="population_id" property="populationId" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="name" property="name" /> |
| | | <result column="id_card" property="idCard" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="age" property="age" /> |
| | | <result column="birthday" property="birthday" /> |
| | | <result column="personnel_category" property="personnelCategory" /> |
| | | <result column="is_register" property="isRegister" /> |
| | | <result column="is_alive" property="isAlive" /> |
| | | <result column="address" property="address" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="receive_allowance_begin" property="receiveAllowanceBegin" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, population_id, street_id, community_id, phone, name, id_card, sex, age, birthday, personnel_category, is_register, is_alive, address, remark, receive_allowance_begin, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | <select id="haveElderAuthElderliesAmount" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count( ceae.id ) |
| | | FROM |
| | | com_elder_auth_elderlies ceae |
| | | WHERE |
| | | community_id = #{communityId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | com_elder_auth_records cear |
| | | WHERE |
| | | ceae.id = cear.elderlies_id |
| | | AND cear.auth_status = 1 |
| | | AND cear.auth_period = #{authPeriod}) |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComElderAuthRecordsDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="elderlies_id" property="elderliesId" /> |
| | | <result column="auth_period" property="authPeriod" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="auth_video" property="authVideo" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="mark" property="mark" /> |
| | | <result column="reject_reason" property="rejectReason" /> |
| | | <result column="auth_status" property="authStatus" /> |
| | | <result column="auth_date" property="authDate" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, elderlies_id, auth_method, auth_period, submit_user_id, auth_video, approver, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="pageElderAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date after #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cear.auth_date before #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="detailElderAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.auth_video, |
| | | cear.approval_status, |
| | | su1.`name` as approverName, |
| | | cear.approval_date |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | cear.id = #{authRecordId} |
| | | </select> |
| | | |
| | | <select id="getElderAuthRecordsByIds" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | CASE |
| | | ceae.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | END sex, |
| | | ceae.birthday, |
| | | CASE |
| | | ceae.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | ceae.address, |
| | | CASE |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END isAlive, |
| | | CASE |
| | | cear.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | CASE |
| | | cear.approval_status |
| | | WHEN 1 THEN |
| | | '待审核' |
| | | WHEN 2 THEN |
| | | '驳回' |
| | | WHEN 3 THEN |
| | | '通过' |
| | | END approvalStatus |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | WHERE |
| | | cear.id in |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")" > |
| | | #{id} |
| | | </foreach> |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <update id="updateAll" parameterType="java.util.List"> |
| | | <foreach collection="comElderAuthRecordsDOS" item="item" index="index" separator=";"> |
| | | update com_elder_auth_records |
| | | <set> |
| | | <if test="item.id != null"> |
| | | `id` = #{item.id}, |
| | | </if> |
| | | <if test="item.elderliesId != null"> |
| | | `elderlies_id` = #{item.elderliesId}, |
| | | </if> |
| | | <if test="item.authMethod != null and item.authMethod != 0"> |
| | | `auth_method` = #{item.authMethod}, |
| | | </if> |
| | | <if test="item.authPeriod != null and item.authPeriod != ''"> |
| | | `auth_period` = #{item.authPeriod}, |
| | | </if> |
| | | <if test="item.submitUserId != null"> |
| | | `submit_user_id` = #{item.submitUserId}, |
| | | </if> |
| | | <if test="item.authVideo != null and item.authVideo != ''"> |
| | | `auth_video` = #{item.authVideo}, |
| | | </if> |
| | | <if test="item.address != null and item.address != ''"> |
| | | `address` = #{item.address}, |
| | | </if> |
| | | <if test="item.approverId != null"> |
| | | `approver_id` = #{item.approverId}, |
| | | </if> |
| | | <if test="item.approvalStatus != null"> |
| | | `approval_status` = #{item.approvalStatus}, |
| | | </if> |
| | | <if test="item.approvalDate != null"> |
| | | `approval_date` = #{item.approvalDate}, |
| | | </if> |
| | | <if test="item.mark != null and item.mark != ''"> |
| | | `mark` = #{item.mark}, |
| | | </if> |
| | | <if test="item.rejectReason != null and item.rejectReason != ''"> |
| | | `reject_reason` = #{item.rejectReason}, |
| | | </if> |
| | | <if test="item.authStatus != null"> |
| | | `auth_status` = #{item.authStatus}, |
| | | </if> |
| | | <if test="item.authDate != null"> |
| | | `auth_date` = #{item.authDate}, |
| | | </if> |
| | | `update_at` = NOW() |
| | | </set> |
| | | WHERE `id` = #{item.id} |
| | | </foreach> |
| | | ; |
| | | </update> |
| | | |
| | | <select id="exportElderAuthRecordsStatistic" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | CASE |
| | | ceae.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | END sex, |
| | | ceae.birthday, |
| | | CASE |
| | | ceae.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | ceae.address, |
| | | CASE |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | CASE |
| | | cear.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cear.mark, |
| | | CASE |
| | | cear.auth_status |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 0 THEN |
| | | '未认证' |
| | | END authStatus |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.EldersAuthDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.EldersAuthDO"> |
| | | <id column="ID" property="id" /> |
| | | <result column="CREATE_BY" property="createBy" /> |
| | | <result column="CREATE_AT" property="createAt" /> |
| | | <result column="UPDATE_BY" property="updateBy" /> |
| | | <result column="UPDATE_AT" property="updateAt" /> |
| | | <result column="ID_CARD" property="idCard" /> |
| | | <result column="AUTH_USER_NAME" property="authUserName" /> |
| | | <result column="VIDEO_URL" property="videoUrl" /> |
| | | <result column="SUMIT_USER_ID" property="sumitUserId" /> |
| | | <result column="DOMICILE" property="domicile" /> |
| | | <result column="STATUS" property="status" /> |
| | | <result column="BIRTH_DAY" property="birthDay" /> |
| | | <result column="FAMILY_USER_ID" property="familyUserId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="verification_result" property="verificationResult" /> |
| | | <result column="age" property="age" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | ID, CREATE_BY, CREATE_AT, UPDATE_BY, UPDATE_AT, ID_CARD, AUTH_USER_NAME, VIDEO_URL, SUMIT_USER_ID, DOMICILE, STATUS, BIRTH_DAY, FAMILY_USER_ID, type, verification_result, age |
| | | </sql> |
| | | |
| | | <select id="getEldersAuthStatistics" resultType="Map"> |
| | | SELECT |
| | | community_id, |
| | | ( SELECT count( id ) FROM com_elders_auth_elderly WHERE community_id = ca.community_id AND is_exist = 1 AND is_big_age = 1 ) AS oldCount, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | com_elders_auth_history_record |
| | | WHERE |
| | | community_id = ca.community_id |
| | | AND is_auth = 1 |
| | | AND create_at BETWEEN DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 00:00:00' ), INTERVAL extract( DAY FROM now())- 1 DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | AND DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 23:59:59' ), INTERVAL extract( DAY FROM now()) DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | ) AS yesCount, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | com_elders_auth_history_record |
| | | WHERE |
| | | community_id = ca.community_id |
| | | AND is_auth = 2 |
| | | AND create_at BETWEEN DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 00:00:00' ), INTERVAL extract( DAY FROM now())- 1 DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | AND DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 23:59:59' ), INTERVAL extract( DAY FROM now()) DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | ) AS noCount |
| | | FROM |
| | | com_act AS ca |
| | | WHERE |
| | | community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getEldersAuthRecords" resultType="com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO"> |
| | | SELECT |
| | | distinct |
| | | cea.id, |
| | | ceau.id as userId, |
| | | ceau.`name`, |
| | | ceae.id_card, |
| | | ceae.birthday, |
| | | ceae.domicile, |
| | | cea.CREATE_AT |
| | | FROM |
| | | com_elders_auth AS cea |
| | | LEFT JOIN com_elders_auth_user AS ceau ON ceau.id = cea.FAMILY_USER_ID |
| | | LEFT JOIN com_elders_auth_elderly AS ceae ON ceae.id = ceau.big_age_id |
| | | WHERE |
| | | type = 1 and ceau.community_id = #{communityId} |
| | | AND cea.CREATE_AT BETWEEN DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 00:00:00' ), INTERVAL extract( DAY FROM now())- 1 DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | AND DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 23:59:59' ), INTERVAL extract( DAY FROM now()) DAY ), '%Y-%m-%d %H:%i:%s' ) |
| | | order by cea.CREATE_AT desc |
| | | </select> |
| | | |
| | | <select id="selectCommunityEldersRecordByPage" parameterType="com.panzhihua.common.model.dtos.community.PageEldersAuthRecordDTO" |
| | | resultType="com.panzhihua.common.model.vos.community.ComEldersAuthRecordForCommunityVO"> |
| | | SELECT e.ID,e.CREATE_BY,e.CREATE_AT, e.UPDATE_BY, e.UPDATE_AT, e.ID_CARD, e.AUTH_USER_NAME, e.VIDEO_URL, |
| | | e.SUMIT_USER_ID, e.DOMICILE, e.STATUS, e.BIRTH_DAY, e.type, e.age, e.verification_result, u.name as sumitUserName, u.phone as sumitUserAccount |
| | | FROM ( SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth |
| | | FROM com_elders_auth GROUP BY id_card, yearMonth ) t |
| | | 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'> |
| | | AND e.AUTH_USER_NAME like concat('%', #{pageEldersAuthRecordDTO.name}, '%') |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=""'> |
| | | AND e.ID_CARD = #{pageEldersAuthRecordDTO.idCard} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.type!=null'> |
| | | AND e.type = #{pageEldersAuthRecordDTO.type} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.month!=null'> |
| | | AND month(e.CREATE_AT) = #{pageEldersAuthRecordDTO.month} |
| | | </if> |
| | | <if test='pageEldersAuthRecordDTO.year!=null'> |
| | | AND year(e.CREATE_AT) = #{pageEldersAuthRecordDTO.year} |
| | | </if> |
| | | </where> |
| | | <if test='pageEldersAuthRecordDTO.sortColumns!=null'> |
| | | ORDER BY e.${pageEldersAuthRecordDTO.sortColumns} ${pageEldersAuthRecordDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="isBigAge !=null"> |
| | | is_big_age = #{isBigAge}, |
| | | </if> |
| | | <if test="idCard !=null"> |
| | | id_card = #{idCard}, |
| | | </if> |
| | | update_at = now(), |
| | | </set> |
| | | |
| | | where id = #{id} |
| | | |
| | | </update> |
| | | |
| | | <delete id="deleteEldersAuthUserById"> |
| | |
| | | WHERE FAMILY_USER_ID = #{elderId} AND DATE_FORMAT(create_at, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m') AND (`type` = 2 OR ( type=1 AND `STATUS` IS NULL) ) |
| | | </select> |
| | | |
| | | <update id="updateAuthStatus"> |
| | | update com_elders_auth_user set is_auth = 2 |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPensionAuthPensionerDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="population_id" property="populationId" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="community_id" property="communityId" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="name" property="name" /> |
| | | <result column="id_card" property="idCard" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="age" property="age" /> |
| | | <result column="birthday" property="birthday" /> |
| | | <result column="personnel_category" property="personnelCategory" /> |
| | | <result column="is_register" property="isRegister" /> |
| | | <result column="is_alive" property="isAlive" /> |
| | | <result column="address" property="address" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="receive_allowance_begin" property="receiveAllowanceBegin" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, population_id, street_id, community_id, phone, name, id_card, sex, age, birthday, personnel_category, is_register, is_alive, address, remark, receive_allowance_begin, create_at, create_by, update_at, update_by |
| | | </sql> |
| | | |
| | | <select id="havePensionAuthPensionerAmount" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count( cpap.id ) |
| | | FROM |
| | | com_pension_auth_pensioners cpap |
| | | WHERE |
| | | community_id = #{communityId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | WHERE |
| | | cpap.id = cpar.pensioner_id |
| | | AND cpar.auth_status = 1 |
| | | AND cpar.auth_period = #{authPeriod}) |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPensionAuthRecordDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="pensioner_id" property="pensionerId" /> |
| | | <result column="auth_period" property="authPeriod" /> |
| | | <result column="submit_user_id" property="submitUserId" /> |
| | | <result column="auth_video" property="authVideo" /> |
| | | <result column="approver_id" property="approverId" /> |
| | | <result column="approval_status" property="approvalStatus" /> |
| | | <result column="approval_date" property="approvalDate" /> |
| | | <result column="mark" property="mark" /> |
| | | <result column="reject_reason" property="rejectReason" /> |
| | | <result column="auth_status" property="authStatus" /> |
| | | <result column="auth_date" property="authDate" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, pensioner_id, auth_method, auth_period, submit_user_id, auth_video, approver, approval_status, approval_date, mark, reject_reason, auth_status, auth_date, create_at, update_at |
| | | </sql> |
| | | |
| | | <select id="pagePensionAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | cpap.phone, |
| | | cpap.`name`, |
| | | cpap.id_card, |
| | | cpap.sex, |
| | | cpap.birthday, |
| | | cpap.personnel_category, |
| | | cpap.address, |
| | | cpap.is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.auth_method, |
| | | cpar.mark, |
| | | cpar.approval_status, |
| | | cpar.auth_status |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | WHERE |
| | | cpap.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cpar.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cpar.auth_date after #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cpar.auth_date before #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cpar.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cpar.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and cpap.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and cpap.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (cpap.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cpar.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cpar.create_at desc |
| | | </select> |
| | | |
| | | <select id="detailPensionAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | cpap.phone, |
| | | cpap.`name`, |
| | | cpap.id_card, |
| | | cpap.sex, |
| | | cpap.birthday, |
| | | cpap.personnel_category, |
| | | cpap.address, |
| | | cpap.is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | cpar.mark, |
| | | cpar.auth_method, |
| | | cpar.auth_video, |
| | | cpar.approval_status, |
| | | su1.`name` as approverName, |
| | | cpar.approval_date |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON ccparear.approver_id = su1.user_id |
| | | WHERE |
| | | cpar.id = #{authRecordId} |
| | | </select> |
| | | |
| | | <select id="getPensionAuthRecordsByIds" resultType="com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | cpap.phone, |
| | | cpap.`name`, |
| | | cpap.id_card, |
| | | CASE |
| | | cpap.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | END sex, |
| | | cpap.birthday, |
| | | CASE |
| | | cpap.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | cpap.address, |
| | | CASE |
| | | cpap.isAlive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | CASE |
| | | cpar.approval_status |
| | | WHEN 1 THEN |
| | | '待审核' |
| | | WHEN 2 THEN |
| | | '驳回' |
| | | WHEN 3 THEN |
| | | '通过' |
| | | END approvalStatus |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | WHERE |
| | | cpar.id in |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")" > |
| | | #{id} |
| | | </foreach> |
| | | order by cpar.create_at desc |
| | | </select> |
| | | |
| | | <update id="updateAll" parameterType="java.util.List"> |
| | | <foreach collection="comPensionAuthRecordDOS" item="item" index="index" separator=";"> |
| | | update com_pension_auth_records |
| | | <set> |
| | | <if test="item.id != null"> |
| | | `id` = #{item.id}, |
| | | </if> |
| | | <if test="item.pensionerId != null"> |
| | | `pensioner_id` = #{item.pensionerId}, |
| | | </if> |
| | | <if test="item.authMethod != null and item.authMethod != 0"> |
| | | `auth_method` = #{item.authMethod}, |
| | | </if> |
| | | <if test="item.authPeriod != null and item.authPeriod != ''"> |
| | | `auth_period` = #{item.authPeriod}, |
| | | </if> |
| | | <if test="item.submitUserId != null"> |
| | | `submit_user_id` = #{item.submitUserId}, |
| | | </if> |
| | | <if test="item.authVideo != null and item.authVideo != ''"> |
| | | `auth_video` = #{item.authVideo}, |
| | | </if> |
| | | <if test="item.address != null and item.address != ''"> |
| | | `address` = #{item.address}, |
| | | </if> |
| | | <if test="item.approverId != null"> |
| | | `approver_id` = #{item.approverId}, |
| | | </if> |
| | | <if test="item.approvalStatus != null"> |
| | | `approval_status` = #{item.approvalStatus}, |
| | | </if> |
| | | <if test="item.approvalDate != null"> |
| | | `approval_date` = #{item.approvalDate}, |
| | | </if> |
| | | <if test="item.mark != null and item.mark != ''"> |
| | | `mark` = #{item.mark}, |
| | | </if> |
| | | <if test="item.rejectReason != null and item.rejectReason != ''"> |
| | | `reject_reason` = #{item.rejectReason}, |
| | | </if> |
| | | <if test="item.authStatus != null"> |
| | | `auth_status` = #{item.authStatus}, |
| | | </if> |
| | | <if test="item.authDate != null"> |
| | | `auth_date` = #{item.authDate}, |
| | | </if> |
| | | `update_at` = NOW() |
| | | </set> |
| | | WHERE `id` = #{item.id} |
| | | </foreach> |
| | | ; |
| | | </update> |
| | | |
| | | <select id="exportPensionAuthRecordsStatistic" resultType="com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO"> |
| | | SELECT |
| | | su.`name` submitUserName, |
| | | cpap.phone, |
| | | cpap.`name`, |
| | | cpap.id_card, |
| | | CASE |
| | | cpap.sex |
| | | WHEN 1 THEN |
| | | '男' |
| | | WHEN 2 THEN |
| | | '女' |
| | | WHEN 3 THEN |
| | | '其他' |
| | | END sex, |
| | | cpap.birthday, |
| | | CASE |
| | | cpap.personnel_category |
| | | WHEN 1 THEN |
| | | '80-89周岁' |
| | | WHEN 2 THEN |
| | | '90-99周岁' |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | cpap.address, |
| | | CASE |
| | | cpap.isAlive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | CASE |
| | | cpar.auth_status |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 0 THEN |
| | | '未认证' |
| | | END authStatus |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | WHERE |
| | | cpap.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cpar.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and cpap.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and cpap.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (cpap.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cpar.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cpar.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPensionAuthStatisticsDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComPensionAuthStatisticsDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="year" property="year" /> |
| | | <result column="month" property="month" /> |
| | | <result column="sum" property="sum" /> |
| | | <result column="auth_sum" property="authSum" /> |
| | | <result column="no_auth_sum" property="noAuthSum" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="community_id" property="communityId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, year, month, sum, auth_sum, no_auth_sum, create_at, community_id |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | <foreach collection="dangerReportIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | order by csdr.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.panzhihua.service_community; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @SpringBootTest |
| | |
| | | log.info("test"); |
| | | } |
| | | |
| | | @Test |
| | | void test() { |
| | | log.info(String.valueOf(DateUtils.getYear(new Date()))); |
| | | log.info(String.valueOf(DateUtils.getMonth(new Date()))); |
| | | log.info(String.valueOf(DateUtils.getYear(new Date())) + 0 + DateUtils.getMonth(new Date())); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <parent> |
| | | <groupId>com.panzhihua</groupId> |
| | | <artifactId>zhihuishequ</artifactId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | </parent> |
| | | <groupId>com.panzhihua</groupId> |
| | | <artifactId>service_property</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | <name>service_property</name> |
| | | <description>物业</description> |
| | | |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-config</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-openfeign</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-test</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>mysql</groupId> |
| | | <artifactId>mysql-connector-java</artifactId> |
| | | <scope>runtime</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.netflix.hystrix</groupId> |
| | | <artifactId>hystrix-javanica</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-integration</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-logging</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.netty</groupId> |
| | | <artifactId>netty-all</artifactId> |
| | | <version>4.1.36.Final</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.panzhihua</groupId> |
| | | <artifactId>common</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.data</groupId> |
| | | <artifactId>spring-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-lang</groupId> |
| | | <artifactId>commons-lang</artifactId> |
| | | <version>2.6</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | </dependency> |
| | | <!--添加监控依赖包--> |
| | | <dependency> |
| | | <groupId>io.micrometer</groupId> |
| | | <artifactId>micrometer-registry-prometheus</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <configuration> |
| | | <mainClass>com.panzhihua.service_property.ServicePropertyApplication</mainClass> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | |
| | | <plugin> |
| | | <groupId>com.spotify</groupId> |
| | | <artifactId>docker-maven-plugin</artifactId> |
| | | <version>1.2.0</version> |
| | | <configuration> |
| | | <imageName>registry.cn-chengdu.aliyuncs.com/panzhihua/service_property:v1</imageName> |
| | | <serverId></serverId> |
| | | <baseImage>java</baseImage> |
| | | <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> |
| | | <resources> |
| | | <resource> |
| | | <targetPath>/</targetPath> |
| | | <directory>${project.build.directory}</directory> |
| | | <include>${project.build.finalName}.jar</include> |
| | | </resource> |
| | | </resources> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | <repositories> |
| | | <repository> |
| | | <id>spring-milestones</id> |
| | | <name>Spring Milestones</name> |
| | | <url>https://repo.spring.io/milestone</url> |
| | | </repository> |
| | | </repositories> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.panzhihua.service_property; |
| | | |
| | | import com.panzhihua.service_property.netty.NettyServer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.SpringCloudApplication; |
| | | import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.net.InetSocketAddress; |
| | | |
| | | @SpringCloudApplication |
| | | @EnableFeignClients(basePackages = {"com.panzhihua.common.service"}) |
| | | @EnableEurekaClient |
| | | @EnableCircuitBreaker |
| | | @ComponentScan({"com.panzhihua.service_property", "com.panzhihua.common"}) |
| | | @SpringBootApplication |
| | | public class ServicePropertyApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(ServicePropertyApplication.class, args); |
| | | new NettyServer().start(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | | import com.panzhihua.service_property.service.ComPropertyAlarmService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComPropertyAlarm)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:50 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyAlarm") |
| | | public class ComPropertyAlarmApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyAlarmService comPropertyAlarmService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comPropertyAlarmService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.comPropertyAlarmService.selectDetail(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarmVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) { |
| | | ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | BeanUtils.copyProperties(comPropertyAlarmVO,comPropertyAlarm); |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | return R.ok(this.comPropertyAlarmService.save(comPropertyAlarm)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyAlarmVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyAlarmVO comPropertyAlarmVO) { |
| | | ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | BeanUtils.copyProperties(comPropertyAlarmVO,comPropertyAlarm); |
| | | return R.ok(this.comPropertyAlarmService.updateById(comPropertyAlarm)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comPropertyAlarmService.removeById(id)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmSettingVO; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarmSetting; |
| | | import com.panzhihua.service_property.service.ComPropertyAlarmSettingService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComPropertyAlarmSetting)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-09 09:46:51 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyAlarmSetting") |
| | | public class ComPropertyAlarmSettingApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyAlarmSettingService comPropertyAlarmSettingService; |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param communityId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping |
| | | public R selectOne(@RequestParam("communityId") Long communityId) { |
| | | return this.comPropertyAlarmSettingService.getByCommunityId(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyAlarmSettingVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyAlarmSettingVO comPropertyAlarmSettingVO) { |
| | | ComPropertyAlarmSetting comPropertyAlarmSetting=new ComPropertyAlarmSetting(); |
| | | BeanUtils.copyProperties(comPropertyAlarmSettingVO,comPropertyAlarmSetting); |
| | | comPropertyAlarmSetting.setCreateTime(DateUtil.date()); |
| | | return R.ok(this.comPropertyAlarmSettingService.insert(comPropertyAlarmSetting)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyEquipmentVO; |
| | | import com.panzhihua.service_property.entity.ComPropertyEquipment; |
| | | import com.panzhihua.service_property.service.ComPropertyEquipmentService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComPropertyEquipment)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:33 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyEquipment") |
| | | public class ComPropertyEquipmentApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyEquipmentService comPropertyEquipmentService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comPropertyEquipmentService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return R.ok(this.comPropertyEquipmentService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyEquipmentVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) { |
| | | ComPropertyEquipment comPropertyEquipment=new ComPropertyEquipment(); |
| | | BeanUtils.copyProperties(comPropertyEquipmentVO,comPropertyEquipment); |
| | | return this.comPropertyEquipmentService.insert(comPropertyEquipment); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyEquipmentVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyEquipmentVO comPropertyEquipmentVO) { |
| | | ComPropertyEquipment comPropertyEquipment=new ComPropertyEquipment(); |
| | | BeanUtils.copyProperties(comPropertyEquipmentVO,comPropertyEquipment); |
| | | return R.ok(this.comPropertyEquipmentService.updateById(comPropertyEquipment)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comPropertyEquipmentService.removeById(id)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import com.panzhihua.service_property.entity.ComPropertyRepair; |
| | | import com.panzhihua.service_property.service.ComPropertyRepairService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (ComPropertyRepair)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-02 10:12:12 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comPropertyRepair") |
| | | public class ComPropertyRepairApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComPropertyRepairService comPropertyRepairService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comPropertyRepairService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.comPropertyRepairService.selectDetail(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comPropertyRepairVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | ComPropertyRepair comPropertyRepair=new ComPropertyRepair(); |
| | | if(comPropertyRepairVO!=null){ |
| | | BeanUtils.copyProperties(comPropertyRepairVO,comPropertyRepair); |
| | | } |
| | | return R.ok(this.comPropertyRepairService.save(comPropertyRepair)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comPropertyRepairVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComPropertyRepairVO comPropertyRepairVO) { |
| | | ComPropertyRepair comPropertyRepair=new ComPropertyRepair(); |
| | | if(comPropertyRepairVO!=null){ |
| | | BeanUtils.copyProperties(comPropertyRepairVO,comPropertyRepair); |
| | | } |
| | | return R.ok(this.comPropertyRepairService.updateById(comPropertyRepair)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comPropertyRepairService.removeById(id)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.config; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 分页 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 16:26 |
| | | **/ |
| | | @Configuration |
| | | public class MybatisPlusConfig { |
| | | |
| | | /** |
| | | * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除) |
| | | */ |
| | | @Bean |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor() { |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | |
| | | @Bean |
| | | public ConfigurationCustomizer configurationCustomizer() { |
| | | return configuration -> configuration.setUseDeprecatedExecutor(false); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.config; |
| | | |
| | | import org.springframework.amqp.core.*; |
| | | import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; |
| | | import org.springframework.amqp.support.converter.MessageConverter; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Configuration |
| | | public class RabbitmqConfig { |
| | | |
| | | |
| | | public static final String DELAYED_QUEUE="delayed.queue"; |
| | | public static final String DELAYED_ROUTING_KEY="delayed.key"; |
| | | public static final String DELAYED_EXCHANGE="delayed.exchange"; |
| | | |
| | | |
| | | |
| | | @Bean |
| | | public Queue delayedQueue(){ |
| | | return new Queue(DELAYED_QUEUE,true,false,false,null); |
| | | } |
| | | |
| | | @Bean |
| | | public Exchange delayedExchange(){ |
| | | Map<String, Object> arguments = new HashMap<>(); |
| | | arguments.put("x-delayed-type", ExchangeTypes.DIRECT); |
| | | return new CustomExchange(DELAYED_EXCHANGE,"x-delayed-message",true,false,arguments); |
| | | } |
| | | |
| | | @Bean |
| | | public Binding delayedBinding(){ |
| | | return BindingBuilder.bind(delayedQueue()).to(delayedExchange()).with(DELAYED_ROUTING_KEY).noargs(); |
| | | } |
| | | |
| | | public Queue directQueue() { |
| | | // durable:是否持久化,默认是false,持久化队列:会被存储在磁盘上,当消息代理重启时仍然存在,暂存队列:当前连接有效 |
| | | // exclusive:默认也是false,只能被当前创建的连接使用,而且当连接关闭后队列即被删除。此参考优先级高于durable |
| | | // autoDelete:是否自动删除,当没有生产者或者消费者使用此队列,该队列会自动删除。 |
| | | // return new Queue("TestDirectQueue",true,true,false); |
| | | |
| | | //一般设置一下队列的持久化就好,其余两个就是默认false |
| | | return new Queue("directQueue",true); |
| | | } |
| | | |
| | | //Direct交换机 起名:TestDirectExchange |
| | | @Bean |
| | | DirectExchange directExchange() { |
| | | // return new DirectExchange("TestDirectExchange",true,true); |
| | | return new DirectExchange("directExchange",true,false); |
| | | } |
| | | |
| | | //绑定 将队列和交换机绑定, 并设置用于匹配键:TestDirectRouting |
| | | @Bean |
| | | Binding bindingDirect() { |
| | | return BindingBuilder.bind(directQueue()).to(directExchange()).with("directRouting"); |
| | | } |
| | | |
| | | |
| | | public Queue pushQueue() { |
| | | // durable:是否持久化,默认是false,持久化队列:会被存储在磁盘上,当消息代理重启时仍然存在,暂存队列:当前连接有效 |
| | | // exclusive:默认也是false,只能被当前创建的连接使用,而且当连接关闭后队列即被删除。此参考优先级高于durable |
| | | // autoDelete:是否自动删除,当没有生产者或者消费者使用此队列,该队列会自动删除。 |
| | | // return new Queue("TestDirectQueue",true,true,false); |
| | | |
| | | //一般设置一下队列的持久化就好,其余两个就是默认false |
| | | return new Queue("pushQueue",true); |
| | | } |
| | | |
| | | //Direct交换机 起名:TestDirectExchange |
| | | @Bean |
| | | DirectExchange pushExchange() { |
| | | // return new DirectExchange("TestDirectExchange",true,true); |
| | | return new DirectExchange("PUSH_Exchange",true,false); |
| | | } |
| | | |
| | | //绑定 将队列和交换机绑定, 并设置用于匹配键:TestDirectRouting |
| | | @Bean |
| | | Binding bindingPush() { |
| | | return BindingBuilder.bind(directQueue()).to(directExchange()).with("PUSH_ROUTING"); |
| | | } |
| | | |
| | | |
| | | |
| | | @Bean |
| | | DirectExchange lonelyDirectExchange() { |
| | | return new DirectExchange("lonelyDirectExchange"); |
| | | } |
| | | |
| | | @Bean |
| | | public MessageConverter messageConverter(){ |
| | | return new Jackson2JsonMessageConverter(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.service_property.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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyAlarmVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComPropertyAlarm)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:49 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyAlarmDao extends BaseMapper<ComPropertyAlarm> { |
| | | IPage<ComPropertyAlarmVO> selectList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | ComPropertyAlarmVO selectById(Integer id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarmSetting; |
| | | |
| | | /** |
| | | * (ComPropertyAlarmSetting)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-09 09:46:50 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyAlarmSettingDao extends BaseMapper<ComPropertyAlarmSetting> { |
| | | ComPropertyAlarmSetting getByCommunityId(Long communityId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.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.property.CommonPage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_property.entity.ComPropertyEquipment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (ComPropertyEquipment)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:32 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyEquipmentDao extends BaseMapper<ComPropertyEquipment> { |
| | | IPage<ComPropertyEquipment> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.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.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.property.ComPropertyRepairVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_property.entity.ComPropertyRepair; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComPropertyRepair)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-02 10:12:09 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyRepairDao extends BaseMapper<ComPropertyRepair> { |
| | | IPage<ComPropertyRepairVO> pageList(Page page, @Param("commonPage") CommonPage commonPage); |
| | | ComPropertyRepairVO selectDetail(Integer id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComPropertyAlarm)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:49 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComPropertyAlarm implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -79284364749441136L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备号 |
| | | */ |
| | | @ApiModelProperty(value = "设备号") |
| | | private String serialNo; |
| | | |
| | | /** |
| | | * 报警类型 1一键报警 2长时间无应答报警 |
| | | */ |
| | | @ApiModelProperty(value = "报警类型 1一键报警 2长时间无应答报警") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | @ApiModelProperty("手机号") |
| | | private String phone; |
| | | |
| | | /** |
| | | *居民姓名 |
| | | */ |
| | | @ApiModelProperty("居民姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 报警处理状态 0待处理 1已办结 |
| | | */ |
| | | @ApiModelProperty("处理状态") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 处理人id |
| | | */ |
| | | @ApiModelProperty("处理人id") |
| | | private Long solveId; |
| | | |
| | | /** |
| | | * 处理时间 |
| | | */ |
| | | @ApiModelProperty(value = "处理时间") |
| | | private Date solveTime; |
| | | |
| | | /** |
| | | * 处理内容 |
| | | */ |
| | | @ApiModelProperty(value = "处理内容") |
| | | private String solveContent; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 处理图片 |
| | | */ |
| | | @ApiModelProperty("处理图片") |
| | | private String solveUrl; |
| | | /** |
| | | * 报警类型 1一键报警 2长时间无应答报警 |
| | | */ |
| | | public interface type{ |
| | | int one=1; |
| | | int time=2; |
| | | } |
| | | /** |
| | | * 报警处理状态 0待处理 1已办结 |
| | | */ |
| | | public interface status{ |
| | | int dcl=0; |
| | | int ybj=1; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComPropertyAlarmSetting)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-09 09:46:49 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComPropertyAlarmSetting implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 793830057265779177L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 触发间隔 |
| | | */ |
| | | @ApiModelProperty(value = "触发间隔") |
| | | private Integer triggerTime; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComPropertyEquipment)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-07 13:29:31 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComPropertyEquipment implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -71395005704296906L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | @ApiModelProperty(value = "设备编号") |
| | | private String serialNo; |
| | | |
| | | /** |
| | | * 报警位置 |
| | | */ |
| | | @ApiModelProperty(value = "报警位置") |
| | | private String position; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @ApiModelProperty(value = "经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @ApiModelProperty(value = "纬度") |
| | | private String latitude; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @ApiModelProperty(value = "设备名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 居民名称 |
| | | */ |
| | | @ApiModelProperty(value = "居民名称") |
| | | private String username; |
| | | |
| | | /** |
| | | * 设备类型 设备类型 1红外报警 2一键报警 |
| | | */ |
| | | @ApiModelProperty("设备类型 设备类型 1红外报警 2一键报警") |
| | | private Integer type; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * (ComPropertyRepair)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-09-02 10:12:07 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("") |
| | | public class ComPropertyRepair implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 360932817327433044L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 报修内容 |
| | | */ |
| | | @ApiModelProperty(value = "报修内容") |
| | | private String repairContent; |
| | | |
| | | /** |
| | | * 报修人 |
| | | */ |
| | | @ApiModelProperty(value = "报修人") |
| | | private String repairName; |
| | | |
| | | /** |
| | | * 报修手机 |
| | | */ |
| | | @ApiModelProperty(value = "报修手机") |
| | | private String repairPhone; |
| | | |
| | | /** |
| | | * 报修位置 |
| | | */ |
| | | @ApiModelProperty(value = "报修位置") |
| | | private String repairPosition; |
| | | |
| | | /** |
| | | * 状态 0 待处理 1待评价 2已结束 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0 待处理 1待评价 2已结束") |
| | | private Integer repairStatus; |
| | | |
| | | /** |
| | | * 报修时间 |
| | | */ |
| | | @ApiModelProperty(value = "报修时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 报修图片url |
| | | */ |
| | | @ApiModelProperty(value = "报修图片url") |
| | | private String repairUrl; |
| | | |
| | | /** |
| | | * 评价内容 |
| | | */ |
| | | @ApiModelProperty(value = "评价内容") |
| | | private String replyContent; |
| | | |
| | | /** |
| | | * 评价图片url |
| | | */ |
| | | @ApiModelProperty(value = "评价图片url") |
| | | private String replyUrl; |
| | | |
| | | /** |
| | | * 评价时间 |
| | | */ |
| | | @ApiModelProperty(value = "评价时间") |
| | | private Date replyTime; |
| | | |
| | | /** |
| | | * 报修人id |
| | | */ |
| | | @ApiModelProperty(value = "报修人id") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 反馈人id |
| | | */ |
| | | @ApiModelProperty(value = "反馈人id") |
| | | private Long feedbackBy; |
| | | |
| | | /** |
| | | * 反馈内容 |
| | | */ |
| | | @ApiModelProperty(value = "反馈内容") |
| | | private String feedbackContent; |
| | | |
| | | /** |
| | | * 反馈图片 |
| | | */ |
| | | @ApiModelProperty(value = "反馈图片") |
| | | private String feedbackUrl; |
| | | |
| | | /** |
| | | * 反馈时间 |
| | | */ |
| | | @ApiModelProperty(value = "反馈时间") |
| | | private Date feedbackTime; |
| | | |
| | | /** |
| | | * 评价星级 |
| | | */ |
| | | @ApiModelProperty(value = "评价星级") |
| | | private Integer replyScore; |
| | | |
| | | /** |
| | | * 物业id |
| | | */ |
| | | @ApiModelProperty(value = "物业id") |
| | | private Integer propertyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.message; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.service_property.dao.ComPropertyAlarmDao; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | | import com.panzhihua.service_property.entity.ComPropertyEquipment; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class AlarmMessage { |
| | | |
| | | private final static String DELAY_QUEUE="delayed.queue"; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private ComPropertyAlarmDao comPropertyAlarmDao; |
| | | |
| | | @RabbitListener(queues=DELAY_QUEUE) |
| | | public void delayAlarm(ComPropertyEquipment comPropertyEquipment){ |
| | | log.info("消息队列开始消费"); |
| | | if(!stringRedisTemplate.hasKey(comPropertyEquipment.getSerialNo())){ |
| | | ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | comPropertyAlarm.setSerialNo(comPropertyEquipment.getSerialNo()); |
| | | comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | comPropertyAlarm.setCommunityId(comPropertyEquipment.getCommunityId()); |
| | | comPropertyAlarm.setName(comPropertyEquipment.getUsername()); |
| | | comPropertyAlarm.setStatus(ComPropertyAlarm.status.dcl); |
| | | comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.netty; |
| | | |
| | | import io.netty.buffer.ByteBuf; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.handler.codec.ByteToMessageDecoder; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class MyDecoder extends ByteToMessageDecoder { |
| | | |
| | | @Override |
| | | protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception { |
| | | String HEXES = "0123456789ABCDEF"; |
| | | byte[] req = new byte[msg.readableBytes()]; |
| | | msg.readBytes(req); |
| | | final StringBuilder hex = new StringBuilder(2 * req.length); |
| | | |
| | | for (int i = 0; i < req.length; i++) { |
| | | byte b = req[i]; |
| | | hex.append(HEXES.charAt((b & 0xF0) >> 4)) |
| | | .append(HEXES.charAt((b & 0x0F))); |
| | | } |
| | | out.add(hex.toString()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.netty; |
| | | |
| | | import io.netty.bootstrap.ServerBootstrap; |
| | | import io.netty.channel.ChannelFuture; |
| | | import io.netty.channel.ChannelOption; |
| | | import io.netty.channel.EventLoopGroup; |
| | | import io.netty.channel.nio.NioEventLoopGroup; |
| | | import io.netty.channel.socket.nio.NioServerSocketChannel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.net.InetSocketAddress; |
| | | |
| | | @Slf4j |
| | | public class NettyServer { |
| | | private static final Integer port=20012; |
| | | public void start() { |
| | | //new 一个主线程组 |
| | | EventLoopGroup bossGroup = new NioEventLoopGroup(1); |
| | | //new 一个工作线程组 |
| | | EventLoopGroup workGroup = new NioEventLoopGroup(200); |
| | | ServerBootstrap bootstrap = new ServerBootstrap() |
| | | .group(bossGroup, workGroup) |
| | | .channel(NioServerSocketChannel.class) |
| | | .childHandler(new ServerChannelInitializer()) |
| | | //设置队列大小 |
| | | .option(ChannelOption.SO_BACKLOG, 1024) |
| | | // 两小时内没有数据的通信时,TCP会自动发送一个活动探测数据报文 |
| | | .childOption(ChannelOption.SO_KEEPALIVE, true); |
| | | //绑定端口,开始接收进来的连接 |
| | | try { |
| | | ChannelFuture future = bootstrap.bind(port).sync(); |
| | | log.info("服务器启动开始监听端口: {}", port); |
| | | future.channel().closeFuture().sync(); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | //关闭主线程组 |
| | | bossGroup.shutdownGracefully(); |
| | | //关闭工作线程组 |
| | | workGroup.shutdownGracefully(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_property.netty; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_property.dao.ComPropertyAlarmDao; |
| | | import com.panzhihua.service_property.dao.ComPropertyAlarmSettingDao; |
| | | import com.panzhihua.service_property.dao.ComPropertyEquipmentDao; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarmSetting; |
| | | import com.panzhihua.service_property.entity.ComPropertyEquipment; |
| | | import com.panzhihua.service_property.util.MyTools; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.ChannelInboundHandlerAdapter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.time.Duration; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class NettyServerHandler extends ChannelInboundHandlerAdapter { |
| | | @Resource |
| | | private ComPropertyAlarmDao comPropertyAlarmDao; |
| | | @Resource |
| | | private ComPropertyAlarmSettingDao comPropertyAlarmSettingDao; |
| | | @Resource |
| | | private ComPropertyEquipmentDao comPropertyEquipmentDao; |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | private static NettyServerHandler nettyServerHandler; |
| | | |
| | | /** |
| | | * 客户端连接会触发 |
| | | */ |
| | | @Override |
| | | public void channelActive(ChannelHandlerContext ctx) throws Exception { |
| | | log.info("Channel active......"); |
| | | } |
| | | |
| | | /** |
| | | * 客户端发消息会触发 |
| | | */ |
| | | @Override |
| | | public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { |
| | | MyTools myTools = new MyTools(); |
| | | log.info("服务器收到消息: {}", msg.toString()); |
| | | if (msg.toString().startsWith("4A1802")) { |
| | | myTools.writeToClient("404A021823", ctx, "状态包"); |
| | | } |
| | | if (msg.toString().startsWith("4A0C0134")) { |
| | | myTools.writeToClient("404A01" + DateUtils.getDateFormatString(new Date(), "HHmmss") + "23", ctx, "心跳包"); |
| | | } |
| | | if (msg.toString().startsWith("4A1803")) { |
| | | String serial = msg.toString().substring(14, 24); |
| | | myTools.writeToClient("404A03" + msg.toString().substring(msg.toString().length() - 2) + "23", ctx, "事件包"); |
| | | // ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm(); |
| | | // comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | // comPropertyAlarm.setSerialNo(serial); |
| | | // comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | // nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | if (msg.toString().startsWith("4A18031")) { |
| | | //正式处理 |
| | | // delayAlarm(serial); |
| | | //展会处理 |
| | | ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm(); |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | comPropertyAlarm.setSerialNo(serial); |
| | | comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | nettyServerHandler.comPropertyAlarmDao.insert(comPropertyAlarm); |
| | | } |
| | | |
| | | } |
| | | ctx.flush(); |
| | | } |
| | | |
| | | /** |
| | | * 发生异常触发 |
| | | */ |
| | | @Override |
| | | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { |
| | | cause.printStackTrace(); |
| | | ctx.close(); |
| | | } |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | | nettyServerHandler = this; |
| | | nettyServerHandler.comPropertyAlarmDao = this.comPropertyAlarmDao; |
| | | nettyServerHandler.stringRedisTemplate = this.stringRedisTemplate; |
| | | nettyServerHandler.rabbitTemplate = this.rabbitTemplate; |
| | | } |
| | | |
| | | //报警事件包延迟处理方法 |
| | | private void delayAlarm(String serial) { |
| | | int duration = 0; |
| | | if (StringUtils.isNotEmpty(serial)) { |
| | | |
| | | ComPropertyEquipment comPropertyEquipment = new ComPropertyEquipment(); |
| | | if (nettyServerHandler.stringRedisTemplate.hasKey(serial)) { |
| | | comPropertyEquipment = JSONObject.parseObject(nettyServerHandler.stringRedisTemplate.boundValueOps(serial).get(), ComPropertyEquipment.class); |
| | | duration = getDuration(Objects.requireNonNull(comPropertyEquipment)); |
| | | nettyServerHandler.stringRedisTemplate.boundValueOps(serial).set(JSONObject.toJSONString(comPropertyEquipment), Duration.ofHours(duration)); |
| | | } else { |
| | | comPropertyEquipment = nettyServerHandler.comPropertyEquipmentDao.selectOne(new QueryWrapper<ComPropertyEquipment>().eq("serial_no", serial)); |
| | | duration = getDuration(comPropertyEquipment); |
| | | nettyServerHandler.stringRedisTemplate.boundValueOps(serial).set(JSONObject.toJSONString(comPropertyEquipment)); |
| | | } |
| | | int finalDuration = duration; |
| | | nettyServerHandler.rabbitTemplate.convertAndSend("delayed.exchange", "delayed.key", comPropertyEquipment, message -> { |
| | | message.getMessageProperties().setHeader("x-delay", finalDuration * 1000 * 3601); |
| | | return message; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private int getDuration(ComPropertyEquipment comPropertyEquipment) { |
| | | int duration; |
| | | if (nettyServerHandler.stringRedisTemplate.hasKey(comPropertyEquipment.getCommunityId().toString())) { |
| | | duration = Integer.parseInt(nettyServerHandler.stringRedisTemplate.boundValueOps(comPropertyEquipment.getCommunityId().toString()).get()); |
| | | } else { |
| | | ComPropertyAlarmSetting comPropertyAlarmSetting = nettyServerHandler.comPropertyAlarmSettingDao.getByCommunityId(comPropertyEquipment.getCommunityId()); |
| | | duration = comPropertyAlarmSetting.getTriggerTime(); |
| | | nettyServerHandler.stringRedisTemplate.boundValueOps(comPropertyEquipment.getCommunityId().toString()).set(comPropertyAlarmSetting.getTriggerTime().toString()); |
| | | } |
| | | return duration; |
| | | } |
| | | } |
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/netty/ServerChannelInitializer.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmService.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyAlarmSettingService.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyEquipmentService.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/ComPropertyRepairService.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyAlarmSettingServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyEquipmentServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/service/impl/ComPropertyRepairServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/util/MyTools.java
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/bootstrap.yml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/logback-spring.xml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmSettingMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyEquipmentMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
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/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java |