Merge remote-tracking branch 'origin/zzj' into zzj
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
| | |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | @EnableSwagger2 |
| | |
| | | @EnableCircuitBreaker |
| | | @EnableEurekaClient |
| | | @EnableFeignClients(basePackages = {"com.panzhihua.common.service"}) |
| | | @ComponentScan({"com.panzhihua.applets","com.panzhihua.common"}) |
| | | @ComponentScan({"com.panzhihua.applets", "com.panzhihua.common"}) |
| | | public class AppletsApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.integral.ComActIntegralCommunityRankVO; |
| | | import com.panzhihua.common.model.vos.community.integral.ComActIntegralCommunityTradeVO; |
| | | import com.panzhihua.common.model.vos.community.integral.ComActIntegralUserRuleVO; |
| | | import com.panzhihua.common.model.vos.community.integral.ComActIntegralUserVO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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 |
| | |
| | | return communityService.getIntegralExplainApplets(); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区领取积分列表",response = ComActIntegralUserRuleVO.class) |
| | | @ApiOperation(value = "查询社区领取积分列表", response = ComActIntegralUserRuleVO.class) |
| | | @PostMapping("/receive") |
| | | public R getIntegralReceive() { |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | if (userInfoVO == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.getIntegralReceiveApplets(userInfoVO.getUserId(),userInfoVO.getCommunityId()); |
| | | return communityService.getIntegralReceiveApplets(userInfoVO.getUserId(), userInfoVO.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询我的积分列表",response = ComActIntegralUserVO.class) |
| | | @ApiOperation(value = "查询我的积分列表", response = ComActIntegralUserVO.class) |
| | | @PostMapping("/user/list") |
| | | public R getIntegralUserList() { |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | if (userInfoVO == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.getIntegralUserListApplets(userInfoVO.getUserId(),userInfoVO.getCommunityId()); |
| | | return communityService.getIntegralUserListApplets(userInfoVO.getUserId(), userInfoVO.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区积分排行榜",response = ComActIntegralCommunityRankVO.class) |
| | | @ApiOperation(value = "查询社区积分排行榜", response = ComActIntegralCommunityRankVO.class) |
| | | @PostMapping("/community/rank") |
| | | public R getIntegralCommunityRank(@RequestBody ComActIntegralCommunityRankDTO communityRankDTO) { |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | if (userInfoVO == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(communityRankDTO.getCommunityId() == null){ |
| | | if (communityRankDTO.getCommunityId() == null) { |
| | | communityRankDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | } |
| | | return communityService.getIntegralCommunityRankApplets(communityRankDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询用户积分明细",response = ComActIntegralCommunityTradeVO.class) |
| | | @ApiOperation(value = "查询用户积分明细", response = ComActIntegralCommunityTradeVO.class) |
| | | @PostMapping("/community/trade") |
| | | public R getIntegralCommunityTrade(@RequestBody ComActIntegralCommunityRankDTO communityTradeDTO) { |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | if (userInfoVO == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | communityTradeDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | |
| | | |
| | | @ApiOperation("详情") |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId); |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId,@RequestParam("isBack") Integer isBack){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId,isBack); |
| | | } |
| | | |
| | | @ApiOperation("用户提交数据") |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordAddDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComSwSafetyWorkRecordVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @auther txb |
| | |
| | | |
| | | /** |
| | | * 分页查询巡查记录 |
| | | * @param comSwPatrolRecordPageDTO 查询参数 |
| | | * |
| | | * @param comSwPatrolRecordPageDTO |
| | | * 查询参数 |
| | | * @return 分页集合 |
| | | */ |
| | | @ApiOperation(value = "分页查询巡查记录", response = ComSwPatrolRecordVO.class) |
| | | @PostMapping("/app/pagePatrolRecord") |
| | | public R pagePatrolRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO){ |
| | | public R pagePatrolRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | if (!comSwPatrolRecordPageDTO.getSelectPerson().equals(1)) { |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(String.valueOf(this.getLoginUserInfo().getPhone())); |
| | |
| | | |
| | | /** |
| | | * 新增巡查记录 |
| | | * @param comSwPatrolRecordAddDTO 新增参数 |
| | | * |
| | | * @param comSwPatrolRecordAddDTO |
| | | * 新增参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation(value = "新增巡查记录") |
| | | @PostMapping("/app/addPatrolRecord") |
| | | public R addPatrolRecord(@RequestBody ComSwPatrolRecordAddDTO comSwPatrolRecordAddDTO){ |
| | | public R addPatrolRecord(@RequestBody ComSwPatrolRecordAddDTO comSwPatrolRecordAddDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordAddDTO.setCommunityId(communityId); |
| | | comSwPatrolRecordAddDTO.setCreateBy(this.getUserId()); |
| | |
| | | /** |
| | | * 根据巡查记录id查询详情 |
| | | * |
| | | * @param patrolRecordId 巡查记录id |
| | | * @param patrolRecordId |
| | | * 巡查记录id |
| | | * @return 巡查记录详情查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据巡查记录id查询详情", response = ComSwPatrolRecordVO.class) |
| | |
| | | |
| | | /** |
| | | * 分页查询安全工作记录 |
| | | * @param comSwPatrolRecordPageDTO 查询参数 |
| | | * |
| | | * @param comSwPatrolRecordPageDTO |
| | | * 查询参数 |
| | | * @return 安全工作记录分页集合 |
| | | */ |
| | | @ApiOperation(value = "分页查询安全工作记录", response = ComSwSafetyWorkRecordVO.class) |
| | | @PostMapping("/app/pageSafetyWorkRecord") |
| | | public R pageSafetyWorkRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO){ |
| | | public R pageSafetyWorkRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | return communityService.pageSafetyWorkRecord(comSwPatrolRecordPageDTO); |
| | |
| | | /** |
| | | * 根据安全工作记录id查询详情 |
| | | * |
| | | * @param safetyWorkRecordId 安全工作记录 |
| | | * @param safetyWorkRecordId |
| | | * 安全工作记录 |
| | | * @return 安全工作记录详情查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据安全工作记录id查询详情", response = ComSwSafetyWorkRecordVO.class) |
| | |
| | | |
| | | /** |
| | | * 分页查询隐患报告 |
| | | * @param comSwPatrolRecordPageDTO 查询参数 |
| | | * |
| | | * @param comSwPatrolRecordPageDTO |
| | | * 查询参数 |
| | | * @return 隐患报告分页集合 |
| | | */ |
| | | @ApiOperation(value = "分页查询隐患报告", response = ComSwDangerReportVO.class) |
| | | @PostMapping("/app/pageDangerReport") |
| | | public R pageDangerReport(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO){ |
| | | public R pageDangerReport(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | return communityService.pageDangerReport(comSwPatrolRecordPageDTO); |
| | |
| | | /** |
| | | * 根据隐患报告id查询详情 |
| | | * |
| | | * @param dangerReportId 隐患报告id |
| | | * @param dangerReportId |
| | | * 隐患报告id |
| | | * @return 隐患报告详情查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据隐患报告id查询详情", response = ComSwDangerReportVO.class) |
| | |
| | | /** |
| | | * 根据巡查记录id查询隐患报告详情 |
| | | * |
| | | * @param patrolRecordId 巡查记录id |
| | | * @param patrolRecordId |
| | | * 巡查记录id |
| | | * @return 隐患报告详情查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据巡查记录id查询隐患报告详情", response = ComSwDangerReportVO.class) |
| | |
| | | /** |
| | | * 整改隐患报告 |
| | | * |
| | | * @param comSwDangerReportRectifyDTO 隐患报告整改参数 |
| | | * @param comSwDangerReportRectifyDTO |
| | | * 隐患报告整改参数 |
| | | * @return 整改结果 |
| | | */ |
| | | @ApiOperation(value = "整改隐患报告") |
| | | @PostMapping("/app/rectifyDangerReport") |
| | | public R rectifyDangerReport(@RequestBody ComSwDangerReportRectifyDTO comSwDangerReportRectifyDTO){ |
| | | public R rectifyDangerReport(@RequestBody ComSwDangerReportRectifyDTO comSwDangerReportRectifyDTO) { |
| | | return communityService.rectifyDangerReport(comSwDangerReportRectifyDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据日期查询值班人员 |
| | | * |
| | | * @return 查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据日期查询值班人员") |
| | | @GetMapping("/app/getRotaPersonByDate") |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate){ |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaPersonByDate(rotaDate); |
| | | } |
| | | |
| | | /** |
| | | * 根据日期查询值班领导 |
| | | * |
| | | * @return 查询结果 |
| | | */ |
| | | @ApiOperation(value = "根据日期查询值班领导") |
| | | @GetMapping("/app/getRotaLeaderByDate") |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate){ |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaLeaderByDate(rotaDate); |
| | | } |
| | | |
| | | /** |
| | | * 选择人员 |
| | | * @param param 查询条件 |
| | | * |
| | | * @param param |
| | | * 查询条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @ApiOperation(value = "选择人员") |
| | | @PostMapping("/app/getTotlePerson") |
| | | public R getTotlePerson(@RequestParam(value = "param", required = false) String param){ |
| | | public R getTotlePerson(@RequestParam(value = "param", required = false) String param) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | return partyBuildingService.getTotlePerson(param,communityId); |
| | | return partyBuildingService.getTotlePerson(param, communityId); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Arrays; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | import com.panzhihua.common.constants.Constants; |
| | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.HttpUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Arrays; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @RequestMapping("/common/") |
| | | @Api(tags = {"公共接口"}) |
| | | public class CommonApi { |
| | | /** |
| | | * 允许的图片文件后缀 |
| | | */ |
| | | private static List<String> fileExtensionAllow = Arrays.asList("gif", "jpg", "png", "jpeg"); |
| | | /** |
| | | * 允许的视频文件后缀 |
| | | */ |
| | | private static List<String> videoExtensionAllow = Arrays.asList("mp4", "mov"); |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | // FTP 登录用户名 |
| | |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | /** |
| | | * 允许的图片文件后缀 |
| | | */ |
| | | private static List<String> fileExtensionAllow = Arrays.asList("gif", "jpg", "png", "jpeg"); |
| | | /** |
| | | * 允许的视频文件后缀 |
| | | */ |
| | | private static List<String> videoExtensionAllow = Arrays.asList("mp4", "mov"); |
| | | |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | public static void main(String[] args) { |
| | | // int nextInt = RandomUtils.nextInt(99999, 1000000); |
| | | // System.out.println(nextInt); |
| | | String basicStr = |
| | | "2092261934651932672" + ":" + "de1c0dbb-9197-4724-9cc2-aa94e30a072f" + ":" + System.currentTimeMillis(); |
| | | String s = Base64.getEncoder().encodeToString(basicStr.getBytes()); |
| | | System.out.println(s); |
| | | |
| | | } |
| | | |
| | | @ApiOperation(value = "上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) throws IOException { |
| | | // 微信图片内容校验 |
| | | // 微信图片内容校验 |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | String property = System.getProperty("user.dir"); |
| | | |
| | |
| | | |
| | | String originName = file.getOriginalFilename(); |
| | | AtomicBoolean isVideo = new AtomicBoolean(false); |
| | | videoExtensionAllow.forEach(ext ->{ |
| | | videoExtensionAllow.forEach(ext -> { |
| | | String originNameLowerCase = originName.toLowerCase(); |
| | | if(originNameLowerCase.endsWith("." +ext)){ |
| | | if (originNameLowerCase.endsWith("." + ext)) { |
| | | isVideo.set(true); |
| | | } |
| | | }); |
| | | if(isVideo.get()){ |
| | | if (isVideo.get()) { |
| | | fileExtension = ".mp4"; |
| | | } |
| | | |
| | | |
| | | String fileName = property + File.separator + UUID.randomUUID().toString().replace("-", "") + fileExtension; |
| | | File file1 = new File(fileName); |
| | |
| | | InputStream is = file.getInputStream(); |
| | | file.transferTo(file1); |
| | | try { |
| | | // boolean b = wxMaSecCheckService.checkImage(file1); |
| | | // boolean b = wxMaSecCheckService.checkImage(file1); |
| | | boolean delete = file1.delete(); |
| | | log.info("临时文件删除【{}】", delete); |
| | | // if (!b) { |
| | | // return R.fail("图片内容违规"); |
| | | // } |
| | | // if (!b) { |
| | | // return R.fail("图片内容违规"); |
| | | // } |
| | | } catch (Exception e) { |
| | | log.error("微信审核图片出错【{}】", e.getMessage()); |
| | | return R.fail("图片上传失败"); |
| | | // e.printStackTrace(); |
| | | // e.printStackTrace(); |
| | | } |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | sftp.logout(); |
| | |
| | | if (ObjectUtils.isEmpty(newPhone)) { |
| | | return R.fail("新手机号不能为空"); |
| | | } |
| | | //todo 发送验证码接第三方 |
| | | // todo 发送验证码接第三方 |
| | | int nextInt = RandomUtils.nextInt(99999, 1000000); |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | valueOperations.set(UserConstants.PHONE_PUT + newPhone, nextInt + "", 3, TimeUnit.MINUTES); |
| | | return R.ok(nextInt); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取天气",response = WeatherVO.class) |
| | | @ApiOperation(value = "获取天气", response = WeatherVO.class) |
| | | @GetMapping(value = "/getWeather/noToken") |
| | | public R getWeather(){ |
| | | //获取请求url |
| | | public R getWeather() { |
| | | // 获取请求url |
| | | String url = Constants.G_D_WEATHER_URL; |
| | | //获取请求参数 |
| | | // 获取请求参数 |
| | | String param = "key=" + Constants.G_D_WEATHER_KEY + "&city=510400"; |
| | | String result = HttpUtils.sendGet(url,param); |
| | | String result = HttpUtils.sendGet(url, param); |
| | | return R.ok(JSON.parseObject(result)); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // int nextInt = RandomUtils.nextInt(99999, 1000000); |
| | | // System.out.println(nextInt); |
| | | String basicStr = "2092261934651932672" + ":" + "de1c0dbb-9197-4724-9cc2-aa94e30a072f" + ":" + System.currentTimeMillis(); |
| | | String s = Base64.getEncoder().encodeToString(basicStr.getBytes()); |
| | | System.out.println(s); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarAppletDTO; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "分页查询小区",response =ComMngStructAreaVO.class ) |
| | | @ApiOperation(value = "分页查询小区", response = ComMngStructAreaVO.class) |
| | | @PostMapping("pagearea") |
| | | public R pageArea(@RequestBody ComMngStructAreaVO comMngStructAreaVO){ |
| | | public R pageArea(@RequestBody ComMngStructAreaVO comMngStructAreaVO) { |
| | | return communityService.pageArea(comMngStructAreaVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页获取社区动态",response = ComActDynVO.class) |
| | | @ApiOperation(value = "分页获取社区动态", response = ComActDynVO.class) |
| | | @PostMapping("pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO){ |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comActDynVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | comActDynVO.setIsTopping(null); |
| | |
| | | return communityService.pageDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区动态详情",response = ComActDynVO.class) |
| | | @ApiOperation(value = "社区动态详情", response = ComActDynVO.class) |
| | | @GetMapping("detaildynamic") |
| | | @ApiImplicitParam(name ="id",value = "社区动态主键",required = true) |
| | | public R detailDynamic(@RequestParam("id") Long id){ |
| | | @ApiImplicitParam(name = "id", value = "社区动态主键", required = true) |
| | | public R detailDynamic(@RequestParam("id") Long id) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Long userId = null; |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | R r = communityService.detailDynamic(id); |
| | | if (R.isOk(r)) { |
| | | Object data = r.getData(); |
| | | ComActDynVO comActDynVO=JSONObject.parseObject(JSONObject.toJSONString(data),ComActDynVO.class); |
| | | if(userId != null){ |
| | | //增加浏览记录 |
| | | ComActDynVO comActDynVO = JSONObject.parseObject(JSONObject.toJSONString(data), ComActDynVO.class); |
| | | if (userId != null) { |
| | | // 增加浏览记录 |
| | | R r1 = communityService.addDynamicUser(id, userId); |
| | | if (R.isOk(r1)) { |
| | | comActDynVO.setIsAdd(1); |
| | | }else{ |
| | | } else { |
| | | comActDynVO.setIsAdd(0); |
| | | } |
| | | } |
| | |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询社区活动",response = ComActActivityVO.class) |
| | | @ApiOperation(value = "分页查询社区活动", response = ComActActivityVO.class) |
| | | @PostMapping("pageactivity") |
| | | public R pageActivity(@RequestBody ComActActivityVO comActActivityVO){ |
| | | public R pageActivity(@RequestBody ComActActivityVO comActActivityVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comActActivityVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | comActActivityVO.setIsApplets(1); |
| | | Integer status = comActActivityVO.getStatus(); |
| | | if (null!=status&&status.intValue()==4) { |
| | | if (null != status && status.intValue() == 4) { |
| | | comActActivityVO.setIsIng(1); |
| | | } |
| | | return communityService.pageActivity(comActActivityVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动/志愿者活动详情",response = ComActActivityVO.class) |
| | | @ApiOperation(value = "社区活动/志愿者活动详情", response = ComActActivityVO.class) |
| | | @GetMapping("detailactivity") |
| | | @ApiImplicitParam(name ="id",value = "社区活动主键",required = true) |
| | | public R detailActivity(@RequestParam("id") Long id){ |
| | | @ApiImplicitParam(name = "id", value = "社区活动主键", required = true) |
| | | public R detailActivity(@RequestParam("id") Long id) { |
| | | Long userId = null; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailActivity(id,userId); |
| | | return communityService.detailActivity(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动/志愿者活动签到") |
| | | @PostMapping("activity/sign-in") |
| | | public R activitySignIn(@RequestBody ComActActRegistVO comActActRegistVO) { |
| | | comActActRegistVO.setUserId(this.getUserId()); |
| | | return communityService.activitySignIn(comActActRegistVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动/志愿者活动评价") |
| | | @PostMapping("activity/evaluate") |
| | | public R activityEvaluate(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { |
| | | comActActEvaluateVO.setUserId(this.getUserId()); |
| | | return communityService.activityEvaluate(comActActEvaluateVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "报名/取消报名社区活动") |
| | | @PutMapping("signactivity") |
| | | public R signActivity(@RequestBody @Validated(AddGroup.class) SignactivityVO signactivityVO){ |
| | | public R signActivity(@RequestBody @Validated(AddGroup.class) SignactivityVO signactivityVO) { |
| | | Long userId = this.getUserId(); |
| | | Long activityId = signactivityVO.getActivityId(); |
| | | Integer isVolunteer = signactivityVO.getIsVolunteer(); |
| | | signactivityVO.setUserId(userId); |
| | | R r = communityService.signActivity(signactivityVO); |
| | | if (R.isOk(r)&&signactivityVO.getType().intValue()==1) { |
| | | if (R.isOk(r) && signactivityVO.getType().intValue() == 1) { |
| | | R r2 = communityService.detailActivity(activityId, userId); |
| | | ComActActivityVO comActActivityVO= JSONObject.parseObject(JSONObject.toJSONString(r2.getData()),ComActActivityVO.class); |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | ComActActivityVO comActActivityVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r2.getData()), ComActActivityVO.class); |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(1); |
| | | sysUserNoticeVO.setTitle("报名成功"); |
| | | sysUserNoticeVO.setBusinessType(1); |
| | | sysUserNoticeVO.setBusinessTitle(comActActivityVO.getActivityName()); |
| | | Date beginAt = comActActivityVO.getBeginAt(); |
| | | sysUserNoticeVO.setBusinessContent(String.format("活动将于%tF %tT 开始,请按时参加", beginAt,beginAt)); |
| | | sysUserNoticeVO.setBusinessContent(String.format("活动将于%tF %tT 开始,请按时参加", beginAt, beginAt)); |
| | | sysUserNoticeVO.setBusinessId(activityId); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setActivityType(isVolunteer.intValue()==1?1:2); |
| | | sysUserNoticeVO.setActivityType(isVolunteer.intValue() == 1 ? 1 : 2); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r1 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r1)) { |
| | |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "活动人员列表",response = ActivitySignVO.class) |
| | | @ApiImplicitParams ({@ApiImplicitParam(name ="type",value = "人员类型 1 普通居民 2 志愿者",required = true), |
| | | @ApiImplicitParam(name ="id",value = "社区活动主键",required = true)}) |
| | | @ApiOperation(value = "活动人员列表", response = ActivitySignVO.class) |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "type", value = "人员类型 1 普通居民 2 志愿者", required = true), |
| | | @ApiImplicitParam(name = "id", value = "社区活动主键", required = true)}) |
| | | @GetMapping("listactivitysign") |
| | | public R listActivitySign(@RequestParam("id") Long id,@RequestParam("type") Integer type){ |
| | | ActivitySignVO activitySignVO=new ActivitySignVO(); |
| | | public R listActivitySign(@RequestParam("id") Long id, @RequestParam("type") Integer type) { |
| | | ActivitySignVO activitySignVO = new ActivitySignVO(); |
| | | activitySignVO.setActivityId(id); |
| | | if (null==type||0==type||type>2) { |
| | | if (null == type || 0 == type || type > 2) { |
| | | return R.fail("人员类型错误"); |
| | | } |
| | | activitySignVO.setType(type); |
| | | return communityService.listActivitySigns(activitySignVO); |
| | | } |
| | | |
| | | // @ApiOperation(value = "新增社区动态浏览记录") |
| | | // @PostMapping("dynamicuser") |
| | | // public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ |
| | | // Long id = comActDynVO.getId(); |
| | | // if (null==id||id==0) { |
| | | // return R.fail("社区动态不存在"); |
| | | // } |
| | | // Long userId = this.getUserId(); |
| | | // return communityService.addDynamicUser(id,userId); |
| | | // } |
| | | // @ApiOperation(value = "新增社区动态浏览记录") |
| | | // @PostMapping("dynamicuser") |
| | | // public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ |
| | | // Long id = comActDynVO.getId(); |
| | | // if (null==id||id==0) { |
| | | // return R.fail("社区动态不存在"); |
| | | // } |
| | | // Long userId = this.getUserId(); |
| | | // return communityService.addDynamicUser(id,userId); |
| | | // } |
| | | |
| | | @ApiOperation(value = "志愿者申请") |
| | | @PostMapping("volunteer") |
| | | public R addVolunteer(@RequestBody @Validated(AddGroup.class) ComMngVolunteerMngVO comMngVolunteerMngVO){ |
| | | public R addVolunteer(@RequestBody @Validated(AddGroup.class) ComMngVolunteerMngVO comMngVolunteerMngVO) { |
| | | comMngVolunteerMngVO.setState(1); |
| | | comMngVolunteerMngVO.setCommunityId(this.getCommunityId()); |
| | | comMngVolunteerMngVO.setSubmitUserId(this.getUserId()); |
| | | return communityService.addVolunteer(comMngVolunteerMngVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询志愿者团队",response = ComMngVolunteerMngVO.class) |
| | | @ApiOperation(value = "分页查询志愿者团队", response = ComMngVolunteerMngVO.class) |
| | | @PostMapping("pagevolunteer") |
| | | public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO){ |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO) { |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO = new ComMngVolunteerMngVO(); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comMngVolunteerMngVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | // Long communityId = this.getCommunityId(); |
| | | |
| | | // comMngVolunteerMngVO.setCommunityId(communityId); |
| | | // comMngVolunteerMngVO.setCommunityId(communityId); |
| | | comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum()); |
| | | comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize()); |
| | | return communityService.pageVolunteer(comMngVolunteerMngVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "志愿者详情",response = ComMngVolunteerMngAppletsVO.class) |
| | | @ApiOperation(value = "志愿者详情", response = ComMngVolunteerMngAppletsVO.class) |
| | | @GetMapping("volunteer") |
| | | public R detailVolunteer(@RequestParam("id") Long id){ |
| | | public R detailVolunteer(@RequestParam("id") Long id) { |
| | | return communityService.detailVolunteer(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "车辆登记") |
| | | @PostMapping("car/register") |
| | | public R addComMngCar(@Validated(AddGroup.class) @RequestBody ComMngCarAppletDTO comMngCarAppletDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null!=communityId && 0!=communityId) { |
| | | if (null != communityId && 0 != communityId) { |
| | | comMngCarAppletDTO.setCommunityId(communityId); |
| | | comMngCarAppletDTO.setAreaId(loginUserInfo.getAreaId()); |
| | | comMngCarAppletDTO.setUserName(loginUserInfo.getName()); |
| | |
| | | return communityService.addComMngCarApplet(comMngCarAppletDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "登记车辆列表",response = ComMngCarVO.class) |
| | | @ApiOperation(value = "登记车辆列表", response = ComMngCarVO.class) |
| | | @GetMapping("car/list") |
| | | public R comMngCarList() { |
| | | return communityService.userComMngCarList(this.getUserId()); |
| | |
| | | |
| | | @ApiOperation(value = "获取树结构区域信息") |
| | | @GetMapping(value = "arealist") |
| | | public R getAllArea(@ApiParam(name = "城市编码:四川510000", required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | public R getAllArea(@ApiParam(name = "城市编码:四川510000", |
| | | required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | return communityService.getCityTreeByProvinceCode(provinceAdcode); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessDetailVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @description: 社区便民服务商家接口 |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/area/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comCvtBusinessAppletsDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return communityService.pageComCvtBusinessByServiceArea(comCvtBusinessAppletsDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情",response = ComCvtBusinessDetailVO.class) |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ComCvtBusinessDetailVO.class) |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusinessServeDetail(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusinessServeDetail(id); |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageComCvtBusinessAppletsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageCommunityQuestnaireDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageQuestnaireSubDetailsDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.*; |
| | | |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireListVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerQuestnaireVO; |
| | | import com.panzhihua.common.model.vos.community.questnaire.UsersAnswerVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @description: 社区通/调查问卷接口 |
| | |
| | | @PostMapping("/pageUser") |
| | | public R pageUser(@RequestBody PageQuestnaireDTO pageQuestnaireDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail(401,"请先登录"); |
| | | if (loginUserInfo == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | pageQuestnaireDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | pageQuestnaireDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | @GetMapping("/detail") |
| | | public R viewQuestnaire(@RequestParam("questId") Long questId) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail(401,"请先登录"); |
| | | if (loginUserInfo == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | return communityService.viewDetail(loginUserInfo.getUserId(), questId); |
| | | } |
| | |
| | | @PostMapping("/stat/answer") |
| | | public R usersAnswerQuestnaire(@RequestBody UsersAnswerQuestnaireVO usersAnswerQuestnaireVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | usersAnswerQuestnaireVO.setUserId(loginUserInfo.getUserId()); |
| | | //填写调查问卷发放积分 |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO(usersAnswerQuestnaireVO.getQuestId() |
| | | ,AddComActIntegralUserDTO.integralType.cydcwj,loginUserInfo.getCommunityId(),loginUserInfo.getUserId())); |
| | | // 填写调查问卷发放积分 |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO(usersAnswerQuestnaireVO.getQuestId(), |
| | | AddComActIntegralUserDTO.integralType.cydcwj, loginUserInfo.getCommunityId(), loginUserInfo.getUserId())); |
| | | return communityService.usersAnsweQuestnaire(usersAnswerQuestnaireVO); |
| | | |
| | | } |
| | |
| | | @GetMapping("/add/noNotice") |
| | | public R addNoNotice(@RequestParam("questId") Long questId) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.addNoNotice(questId,loginUserInfo.getUserId()); |
| | | return communityService.addNoNotice(questId, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; |
| | | import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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 |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "查询所有社区",response = StreetAllAppletsVO.class ) |
| | | @ApiOperation(value = "查询所有社区", response = StreetAllAppletsVO.class) |
| | | @GetMapping("/list/noToken") |
| | | public R list(){ |
| | | public R list() { |
| | | return communityService.communitySwitchList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据名字搜索社区",response = CommunitySwitchAllAppletsVO.class ) |
| | | @ApiOperation(value = "根据名字搜索社区", response = CommunitySwitchAllAppletsVO.class) |
| | | @GetMapping("/search/noToken") |
| | | public R search(@RequestParam(value = "name") String name){ |
| | | public R search(@RequestParam(value = "name") String name) { |
| | | return communityService.communitySwitchSearchList(name); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据距离搜索社区",response = CommunitySwitchAllAppletsVO.class ) |
| | | @ApiOperation(value = "根据距离搜索社区", response = CommunitySwitchAllAppletsVO.class) |
| | | @PostMapping("/distance/noToken") |
| | | public R searchDistance(@RequestBody SearchCommunityDTO communityDTO){ |
| | | public R searchDistance(@RequestBody SearchCommunityDTO communityDTO) { |
| | | return communityService.communitySwitchSearchDistanceList(communityDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | |
| | | @ApiOperation(value = "一起议-新增") |
| | | @PostMapping("discuss") |
| | | public R addDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) { |
| | | // 微信内容审核 |
| | | // 微信内容审核 |
| | | String discussSubject = comActDiscussDTO.getDiscussSubject(); |
| | | if (!checkService.checkMessage(discussSubject)) { |
| | | return R.fail("内容违规"); |
| | |
| | | String voteTitle = comActDiscussDTO.getVoteTitle(); |
| | | List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions(); |
| | | if (type.equals(2)) { |
| | | if(ObjectUtils.isEmpty(voteTitle)){ |
| | | if (ObjectUtils.isEmpty(voteTitle)) { |
| | | return R.fail("投票标题不能为空"); |
| | | } |
| | | if(ObjectUtils.isEmpty(discussOptions)){ |
| | | if (ObjectUtils.isEmpty(discussOptions)) { |
| | | return R.fail("选项不能为空"); |
| | | } |
| | | } |
| | | String address = comActDiscussDTO.getAddress(); |
| | | if (ObjectUtils.isEmpty(address)) { |
| | | return R.fail("地址不能为空"); |
| | | }else if(address.contains("null")){ |
| | | } else if (address.contains("null")) { |
| | | comActDiscussDTO.setAddress(null); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | return communityService.addDiscuss(comActDiscussDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "一起议-分页查询",response = ComActDiscussVO.class) |
| | | @ApiOperation(value = "一起议-分页查询", response = ComActDiscussVO.class) |
| | | @PostMapping("pagediscuss") |
| | | public R pageDiscuss(@RequestBody PageComActDiscussDTO pageComActDiscussDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | pageComActDiscussDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | pageComActDiscussDTO.setLoginUserId(loginUserInfo.getUserId()); |
| | | |
| | | Integer isMy = pageComActDiscussDTO.getIsMy(); |
| | | if (null!=isMy&&isMy.intValue()==1) { |
| | | if (null != isMy && isMy.intValue() == 1) { |
| | | pageComActDiscussDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | } |
| | |
| | | return R.fail("回复不能为空"); |
| | | } |
| | | Long discussId = comActDiscussCommentDTO.getDiscussId(); |
| | | if (null==discussId||0==discussId) { |
| | | if (null == discussId || 0 == discussId) { |
| | | return R.fail("一起议主键不能为空"); |
| | | } |
| | | comActDiscussCommentDTO.setUserId(this.getUserId()); |
| | | //议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(discussId,AddComActIntegralUserDTO.integralType.cyystp,this.getCommunityId(),this.getUserId()); |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(discussId, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(1); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | return communityService.addDiscussComment(comActDiscussCommentDTO); |
| | |
| | | return communityService.putDiscussCommentUser(comActDiscussUserDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-详情",response = ComActDiscussVO.class) |
| | | @ApiOperation(value = "一起议-详情", response = ComActDiscussVO.class) |
| | | @GetMapping("discuss") |
| | | @ApiImplicitParam(name = "id",value = "一起议主键",required = true) |
| | | @ApiImplicitParam(name = "id", value = "一起议主键", required = true) |
| | | public R detailDiscuss(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailDiscussApplets(id,userId); |
| | | return communityService.detailDiscussApplets(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "一起议-评论-分页查询",response = ComActDiscussCommentVO.class) |
| | | @ApiOperation(value = "一起议-评论-分页查询", response = ComActDiscussCommentVO.class) |
| | | @PostMapping("pagediscusscomment") |
| | | public R pageDiscussComment(@RequestBody PageComActDiscussCommentDTO pageComActDiscussCommentDTO) { |
| | | Long id = pageComActDiscussCommentDTO.getId(); |
| | | if (null==id||0==id) { |
| | | if (null == id || 0 == id) { |
| | | return R.fail("一起议主键不能为空"); |
| | | } |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActDiscussCommentDTO.setLoginUserId(userId); |
| | |
| | | return R.fail("回复不能为空"); |
| | | } |
| | | Long id = comActDiscussCommentDTO.getId(); |
| | | if (null==id||0==id) { |
| | | if (null == id || 0 == id) { |
| | | return R.fail("评论主键不能为空"); |
| | | } |
| | | comActDiscussCommentDTO.setUserId(this.getUserId()); |
| | |
| | | |
| | | @ApiOperation(value = "一起议-投票") |
| | | @GetMapping("discussoptionuser") |
| | | @ApiImplicitParam(name = "id",value = "一起议选项主键",required = true) |
| | | @ApiImplicitParam(name = "id", value = "一起议选项主键", required = true) |
| | | public R addDiscussOptionUser(@RequestParam("id") Long id) { |
| | | if (null==id||0==id) { |
| | | if (null == id || 0 == id) { |
| | | return R.fail("选项主键不能为空"); |
| | | } |
| | | ComActDiscussOptionUserDTO comActDiscussOptionUserDTO=new ComActDiscussOptionUserDTO(); |
| | | ComActDiscussOptionUserDTO comActDiscussOptionUserDTO = new ComActDiscussOptionUserDTO(); |
| | | comActDiscussOptionUserDTO.setDiscussOptionId(id); |
| | | comActDiscussOptionUserDTO.setUserId(this.getUserId()); |
| | | //议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(id,AddComActIntegralUserDTO.integralType.cyystp,this.getCommunityId(),this.getUserId()); |
| | | // 议事投票计算积分 |
| | | AddComActIntegralUserDTO integralUserDTO = new AddComActIntegralUserDTO(id, |
| | | AddComActIntegralUserDTO.integralType.cyystp, this.getCommunityId(), this.getUserId()); |
| | | integralUserDTO.setIsComment(2); |
| | | communityService.addIntegralTradeAdmin(integralUserDTO); |
| | | return communityService.addDiscussOptionUser(comActDiscussOptionUserDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthAddByFamilyDTO; |
| | | import com.panzhihua.common.model.dtos.community.EldersAuthTypeQueryDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | 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.IPageVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthElderlyDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.common.model.vos.elders.ComElderAuthUserAppVO; |
| | | import com.panzhihua.common.model.vos.elders.ComElderAuthUserDetailVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.TencentUtils; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.vos.IPageVO; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * */ |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eldersauth") |
| | |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageEldersAuthDTO 查找高龄认证传递对象 |
| | | * |
| | | * @param pageEldersAuthDTO |
| | | * 查找高龄认证传递对象 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "查询高龄认证@已过期", response = EldersAuthVO.class) |
| | | R query(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO){ |
| | | R query(@Validated @RequestBody PageEldersAuthDTO pageEldersAuthDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(pageEldersAuthDTO); |
| | | pageEldersAuthDTO.setSumitUserId(this.getUserId()); |
| | | return eldersAuthService.query(pageEldersAuthDTO); |
| | |
| | | |
| | | /** |
| | | * 查询高龄认证详细信息 |
| | | * @param id 高龄认证 id |
| | | * |
| | | * @param id |
| | | * 高龄认证 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询高龄认证详细信息@已过期", response = EldersAuthDetailsVO.class) |
| | | R<EldersAuthDetailsVO> details(@PathVariable("id") Long id){ |
| | | R<EldersAuthDetailsVO> details(@PathVariable("id") Long id) { |
| | | return eldersAuthService.eldersAuthDetails(id); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/family") |
| | | @ApiOperation(value = "我的家庭成员@已过期", response = R.class) |
| | | R<IPageVO<ComMngFamilyInfoVO>> family(){ |
| | | R<IPageVO<ComMngFamilyInfoVO>> family() { |
| | | return eldersAuthService.getMyfamilyElders(getUserId()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增高龄认证 |
| | | * @param eldersAuthAddByFamilyDTO 添加高龄认证传递对象 |
| | | * |
| | | * @param eldersAuthAddByFamilyDTO |
| | | * 添加高龄认证传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/addByFamily") |
| | | @ApiOperation(value = "新增高龄认证", response = R.class) |
| | | R addByFamily(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO){ |
| | | R addByFamily(@RequestBody EldersAuthAddByFamilyDTO eldersAuthAddByFamilyDTO) { |
| | | eldersAuthAddByFamilyDTO.setSumitUserId(getUserId()); |
| | | eldersAuthAddByFamilyDTO.setUserId(getUserId()); |
| | | return eldersAuthService.addByFamilyUser(eldersAuthAddByFamilyDTO); |
| | |
| | | |
| | | @GetMapping("/authtype") |
| | | @ApiOperation(value = "查询社区认证方式", response = R.class) |
| | | R communityAuthtype(){ |
| | | R communityAuthtype() { |
| | | Long communityId = this.getCommunityId(); |
| | | EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO = new EldersAuthTypeQueryDTO(); |
| | | eldersAuthTypeQueryDTO.setCommunityId(communityId); |
| | | return eldersAuthService.communityElderAuthType(eldersAuthTypeQueryDTO); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getEidToken") |
| | | @ApiOperation(value = "高龄认证获取EidToken接口") |
| | | public R getEidToken(@RequestParam("authUserId") Long authUserId){ |
| | | if(authUserId == null){ |
| | | public R getEidToken(@RequestParam("authUserId") Long authUserId) { |
| | | if (authUserId == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | |
| | | R isOk = eldersAuthService.getEldersAuthUserByApp(authUserId); |
| | | if(R.isOk(isOk)){ |
| | | ComElderAuthUserDetailVO authUserDetailVO = JSONObject.parseObject(JSONObject.toJSONString(isOk.getData()), ComElderAuthUserDetailVO.class); |
| | | //获取EidToken接口 |
| | | String result = TencentUtils.getEidToken(authUserDetailVO.getName(),authUserDetailVO.getIdCard()); |
| | | if (R.isOk(isOk)) { |
| | | ComElderAuthUserDetailVO authUserDetailVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(isOk.getData()), ComElderAuthUserDetailVO.class); |
| | | // 获取EidToken接口 |
| | | String result = TencentUtils.getEidToken(authUserDetailVO.getName(), authUserDetailVO.getIdCard()); |
| | | return R.ok(result); |
| | | }else{ |
| | | } else { |
| | | log.error("查询老人信息失败,错误信息:" + isOk.getMsg()); |
| | | return isOk; |
| | | } |
| | |
| | | |
| | | @PostMapping("/getEidResult") |
| | | @ApiOperation(value = "高龄认证获取核验结果接口") |
| | | public R getEidResult(@Validated @RequestBody ComEldersAuthGetResultDTO authGetResultDTO){ |
| | | public R getEidResult(@Validated @RequestBody ComEldersAuthGetResultDTO authGetResultDTO) { |
| | | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | authGetResultDTO.setUserId(loginUserInfo.getUserId()); |
| | | |
| | | String result = TencentUtils.getEidResult(authGetResultDTO.getEidToken()); |
| | | JSONObject object = JSON.parseObject(result); |
| | | if(object == null){ |
| | | if (object == null) { |
| | | return R.fail("核验失败"); |
| | | } |
| | | |
| | | JSONObject textObject = object.getJSONObject("Text"); |
| | | |
| | | String code = textObject.getString("ErrCode"); |
| | | if(!code.equals("0")){ |
| | | if (!code.equals("0")) { |
| | | log.error("人脸核验失败,错误原因:" + textObject.toJSONString()); |
| | | return R.fail("核验失败"); |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping("/page/old") |
| | | @ApiOperation(value = "高龄认证分页接口",response = ComElderAuthUserAppVO.class) |
| | | public R pageElders(@RequestBody ComEldersAuthPageDTO authPageDTO){ |
| | | @ApiOperation(value = "高龄认证分页接口", response = ComElderAuthUserAppVO.class) |
| | | public R pageElders(@RequestBody ComEldersAuthPageDTO authPageDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | authPageDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "高龄认证添加老人接口") |
| | | public R addElders(@RequestBody ComEldersAuthUserAddAppDTO authUserAddAppDTO){ |
| | | public R addElders(@RequestBody ComEldersAuthUserAddAppDTO authUserAddAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | authUserAddAppDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | |
| | | @PostMapping("/edit") |
| | | @ApiOperation(value = "高龄认证修改老人接口") |
| | | public R editElders(@RequestBody ComEldersAuthUserAddAppDTO authUserAddAppDTO){ |
| | | public R editElders(@RequestBody ComEldersAuthUserAddAppDTO authUserAddAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | authUserAddAppDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageComEldersRecordsDTO 查找高龄认证记录 |
| | | * |
| | | * @param pageComEldersRecordsDTO |
| | | * 查找高龄认证记录 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping("/records") |
| | | @ApiOperation(value = "生存认证记录", response = EldersAuthVO.class) |
| | | R query(@Validated @RequestBody PageComEldersRecordsDTO pageComEldersRecordsDTO){ |
| | | R query(@Validated @RequestBody PageComEldersRecordsDTO pageComEldersRecordsDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(pageComEldersRecordsDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageComEldersRecordsDTO.setOperUserId(loginUserInfoVO.getUserId()); |
| | |
| | | |
| | | /** |
| | | * 查询高龄老人库详细信息 |
| | | * @param id 高龄老人库 id |
| | | * |
| | | * @param id |
| | | * 高龄老人库 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/records/{id}") |
| | | @ApiOperation(value = "认证详情详细信息") |
| | | R<ComEldersAuthElderlyDetailsVO> detail(@PathVariable("id") Long id){ |
| | | R<ComEldersAuthElderlyDetailsVO> detail(@PathVariable("id") Long id) { |
| | | return eldersAuthService.comEldersAuthElderlyDetails(id); |
| | | } |
| | | |
| | | @GetMapping("/no/tips") |
| | | @ApiOperation(value = "高龄认证不再显示提示") |
| | | public R noTips(){ |
| | | public R noTips() { |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | if(loginUserInfoVO == null){ |
| | | if (loginUserInfoVO == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return userService.noTips(loginUserInfoVO.getUserId()); |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | |
| | | @ApiOperation(value = "房屋租售-新增") |
| | | @PostMapping("house") |
| | | public R addHouse(@RequestBody @Validated(AddGroup.class) ComOpsHouseDTO comOpsHouseDTO) { |
| | | // 微信内容审核 |
| | | // 微信内容审核 |
| | | String introduction = comOpsHouseDTO.getIntroduction(); |
| | | if (!checkService.checkMessage(introduction)) { |
| | | return R.fail("内容违规"); |
| | |
| | | return communityService.addOpsHouse(comOpsHouseDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "房屋租售-分页查询",response = ComOpsHouseVO.class) |
| | | @ApiOperation(value = "房屋租售-分页查询", response = ComOpsHouseVO.class) |
| | | @PostMapping("pagehouse") |
| | | public R pageHouse(@RequestBody PageComOpsHouseDTO pageComOpsHouseDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Integer isMy = pageComOpsHouseDTO.getIsMy(); |
| | | if (null!=isMy&&isMy.equals(1)) { |
| | | if (null != isMy && isMy.equals(1)) { |
| | | pageComOpsHouseDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | return communityService.pageOpsHouse(pageComOpsHouseDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "房屋租售-详情",response = ComOpsHouseVO.class) |
| | | @ApiOperation(value = "房屋租售-详情", response = ComOpsHouseVO.class) |
| | | @GetMapping("house") |
| | | @ApiImplicitParam(name = "id",value = "房屋租售主键",required = true) |
| | | @ApiImplicitParam(name = "id", value = "房屋租售主键", required = true) |
| | | public R detailHouse(@RequestParam("id") Long id) { |
| | | return communityService.detailOpsHouse(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "房屋租售-修改") |
| | | @PostMapping("putHouse") |
| | |
| | | |
| | | @ApiOperation(value = "房屋租售-删除") |
| | | @GetMapping("delHouse") |
| | | @ApiImplicitParam(name = "id",value = "房屋租售主键",required = true) |
| | | @ApiImplicitParam(name = "id", value = "房屋租售主键", required = true) |
| | | public R delHouse(@RequestParam("id") Long id) { |
| | | return communityService.deleteOpsHouse(id); |
| | | } |
| | |
| | | public R undercarriageHouse(@RequestBody @Validated(PutGroup.class) ComOpsHouseUndercarriageVO comOpsHouseVO) { |
| | | return communityService.undercarriageHouse(comOpsHouseVO); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.CommonDTO; |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | @ApiOperation(value = "分页展示社区随手拍",response = ComActEasyPhotoVO.class) |
| | | @ApiOperation(value = "分页展示社区随手拍", response = ComActEasyPhotoVO.class) |
| | | @PostMapping("pageeasyphoto") |
| | | public R pageEasyPhoto (@RequestBody ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | public R pageEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | } |
| | |
| | | |
| | | @ApiOperation("上传随手拍") |
| | | @PostMapping("easyphoto") |
| | | public R addEasyPhoto (@RequestBody @Validated(AddGroup.class) ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | // 微信内容审核 |
| | | public R addEasyPhoto(@RequestBody @Validated(AddGroup.class) ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | // 微信内容审核 |
| | | String msg = comActEasyPhotoVO.getDetail(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | |
| | | return communityService.addEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询随手拍是否有活动",response = ComActEasyPhotoActivityVO.class) |
| | | @ApiOperation(value = "查询随手拍是否有活动", response = ComActEasyPhotoActivityVO.class) |
| | | @PostMapping("getEasyPhotoActivity") |
| | | public R getEasyPhotoActivity (@RequestBody CommonDTO commonDTO){ |
| | | public R getEasyPhotoActivity(@RequestBody CommonDTO commonDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | Long communityId = commonDTO.getCommunityId(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getEasyPhotoActivity(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情",response =ComActEasyPhotoVO.class ) |
| | | @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) |
| | | @GetMapping("detaileasyphoto") |
| | | @ApiImplicitParam(name = "id",value = "随手拍主键") |
| | | public R detailEasyPhoto (@RequestParam("id") Long id){ |
| | | @ApiImplicitParam(name = "id", value = "随手拍主键") |
| | | public R detailEasyPhoto(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailEasyPhoto(id,userId); |
| | | return communityService.detailEasyPhoto(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--分页查询",response = ComActEasyPhotoCommentVO.class ) |
| | | @ApiOperation(value = "随手拍--评论--分页查询", response = ComActEasyPhotoCommentVO.class) |
| | | @PostMapping("pagecomacteasyphotocomment") |
| | | public R pageComActEasyPhotoComment (@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO){ |
| | | public R pageComActEasyPhotoComment(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | pageComActEasyPhotoCommentDTO.setUserId(userId); |
| | |
| | | |
| | | @ApiOperation(value = "随手拍--评论--新增评论") |
| | | @PostMapping("comacteasyphotocomment") |
| | | public R addComActEasyPhotoComment (@RequestBody ComActEasyPhotoCommentDTO comActEasyPhotoCommentDTO){ |
| | | public R addComActEasyPhotoComment(@RequestBody ComActEasyPhotoCommentDTO comActEasyPhotoCommentDTO) { |
| | | comActEasyPhotoCommentDTO.setUserId(this.getUserId()); |
| | | return communityService.addComActEasyPhotoComment(comActEasyPhotoCommentDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍--评论--点赞/取消点赞" ) |
| | | @ApiOperation(value = "随手拍--评论--点赞/取消点赞") |
| | | @PostMapping("commentsign") |
| | | public R commentSign (@RequestBody ComActEasyPhotoCommentUserDTO comActEasyPhotoCommentUserDTO){ |
| | | public R commentSign(@RequestBody ComActEasyPhotoCommentUserDTO comActEasyPhotoCommentUserDTO) { |
| | | comActEasyPhotoCommentUserDTO.setUserId(this.getUserId()); |
| | | return communityService.commentSign(comActEasyPhotoCommentUserDTO); |
| | | } |
| | | |
| | | @ApiOperation("点赞/取消点赞随手拍") |
| | | @PutMapping("easyphoto") |
| | | public R putEasyPhoto (@RequestBody ComActEasyPhotoVO comActEasyPhotoVO){ |
| | | public R putEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | Long id = comActEasyPhotoVO.getId(); |
| | | if (null==id||id==0) { |
| | | if (null == id || id == 0) { |
| | | return R.fail("随手拍主键不能为空"); |
| | | } |
| | | Integer haveGiveThumbsUp = comActEasyPhotoVO.getHaveGiveThumbsUp(); |
| | | if (null==haveGiveThumbsUp) { |
| | | if (null == haveGiveThumbsUp) { |
| | | return R.fail("操作类型不能为空"); |
| | | } |
| | | Long userId = this.getUserId(); |
| | |
| | | return communityService.putEasyPhoto(comActEasyPhotoVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页展示社区微心愿",response = ComActMicroWishVO.class) |
| | | @ApiOperation(value = "分页展示社区微心愿", response = ComActMicroWishVO.class) |
| | | @PostMapping("pagemicrowish") |
| | | public R pageMicroWish (@RequestBody ComActMicroWishVO comActMicroWishVO){ |
| | | public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());//责任人暂时放登录用户id |
| | | comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id |
| | | } |
| | | comActMicroWishVO.setIsApplets(1); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | |
| | | |
| | | @ApiOperation("发布微心愿") |
| | | @PostMapping("microwish") |
| | | public R addMicroWish (@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO){ |
| | | // 微信内容审核 |
| | | public R addMicroWish(@RequestBody @Validated(AddGroup.class) ComActMicroWishVO comActMicroWishVO) { |
| | | // 微信内容审核 |
| | | String msg = comActMicroWishVO.getDetail(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | String phone = loginUserInfo.getPhone(); |
| | | if (ObjectUtils.isEmpty(phone)) { |
| | | // return R.fail("用户绑定手机号后才能发布微心愿"); |
| | | phone="18228784579"; |
| | | // return R.fail("用户绑定手机号后才能发布微心愿"); |
| | | phone = "18228784579"; |
| | | } |
| | | comActMicroWishVO.setSponsorPhone(phone); |
| | | comActMicroWishVO.setCommunityId(communityId); |
| | |
| | | return communityService.addMicroWish(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "心愿详情",response = ComActMicroWishVO.class) |
| | | @ApiOperation(value = "心愿详情", response = ComActMicroWishVO.class) |
| | | @GetMapping("microwish") |
| | | @ApiImplicitParam(name = "id",value = "微心愿主键") |
| | | public R detailMicroWish (@RequestParam("id")Long id){ |
| | | @ApiImplicitParam(name = "id", value = "微心愿主键") |
| | | public R detailMicroWish(@RequestParam("id") Long id) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | return communityService.detailMicroWish(id,userId); |
| | | return communityService.detailMicroWish(id, userId); |
| | | } |
| | | |
| | | @ApiOperation("点赞/取消点赞微心愿") |
| | | @PutMapping("microwish") |
| | | public R putMicroWish (@RequestBody ComActMicroWishVO comActMicroWishVO){ |
| | | public R putMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { |
| | | Long id = comActMicroWishVO.getId(); |
| | | if (null==id||id==0) { |
| | | if (null == id || id == 0) { |
| | | return R.fail("微心愿主键不能为空"); |
| | | } |
| | | Long userId = this.getUserId(); |
| | | comActMicroWishVO.setSponsorId(userId);//发起人字段暂时存放userId |
| | | comActMicroWishVO.setSponsorId(userId);// 发起人字段暂时存放userId |
| | | return communityService.putMicroWish(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页广告banner",response = ComOpsAdvVO.class) |
| | | @ApiOperation(value = "首页广告banner", response = ComOpsAdvVO.class) |
| | | @GetMapping("listadvertisement/noToken") |
| | | public R listAdvertisement (){ |
| | | public R listAdvertisement() { |
| | | return communityService.listAdvertisement(); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页通知列表",response = SysUserNoticeVO.class) |
| | | @ApiOperation(value = "分页通知列表", response = SysUserNoticeVO.class) |
| | | @PostMapping("pagenotice") |
| | | public R pageNotice (@RequestBody @Validated(PageGroup.class) PageDTO pageDTO){ |
| | | public R pageNotice(@RequestBody @Validated(PageGroup.class) PageDTO pageDTO) { |
| | | Long userId = this.getUserId(); |
| | | pageDTO.setUserId(userId); |
| | | return userService.pageNotice(pageDTO); |
| | |
| | | |
| | | @ApiOperation(value = "通知已读") |
| | | @PutMapping("notice") |
| | | public R putNotice (@RequestBody NoticeReadDTO noticeReadDTO){ |
| | | public R putNotice(@RequestBody NoticeReadDTO noticeReadDTO) { |
| | | Long userId = this.getUserId(); |
| | | noticeReadDTO.setUserId(userId); |
| | | return userService.putNotice(noticeReadDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "未读消息汇总",response = NoticeUnReadVO.class) |
| | | @ApiOperation(value = "未读消息汇总", response = NoticeUnReadVO.class) |
| | | @GetMapping("noticeunreadnum") |
| | | public R noticeUnreadNum (){ |
| | | public R noticeUnreadNum() { |
| | | Long userId = this.getUserId(); |
| | | return userService.noticeUnreadNum(userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取各种协议",response = SysUserAgreementVO.class) |
| | | @ApiOperation(value = "获取各种协议", response = SysUserAgreementVO.class) |
| | | @GetMapping("agreement") |
| | | @ApiImplicitParam(name = "type",value = "1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策") |
| | | public R agreement (@RequestParam("type")Integer type){ |
| | | @ApiImplicitParam(name = "type", value = "1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策") |
| | | public R agreement(@RequestParam("type") Integer type) { |
| | | return userService.agreement(type); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("发布留言") |
| | | @PostMapping("addmessage") |
| | | public R addMessage(@RequestBody @Validated(AddGroup.class) ComActMessageVO comActMessageVO){ |
| | | // 微信内容审核 |
| | | public R addMessage(@RequestBody @Validated(AddGroup.class) ComActMessageVO comActMessageVO) { |
| | | // 微信内容审核 |
| | | String msg = comActMessageVO.getMsgContent(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Integer type = loginUserInfo.getType(); |
| | | if(null==type||(type!=1&&type!=2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | if (null == type || (type != 1 && type != 2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMessageVO.setCommunityId(communityId); |
| | |
| | | comActMessageVO.setStatus(1); |
| | | return communityService.addMessage(comActMessageVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("发布留言回复") |
| | | @PostMapping("addmessageback") |
| | | public R addMessageBack(@RequestBody @Validated(AddGroup.class) ComActMessageBackVO comActMessageBackVO){ |
| | | // 微信内容审核 |
| | | public R addMessageBack(@RequestBody @Validated(AddGroup.class) ComActMessageBackVO comActMessageBackVO) { |
| | | // 微信内容审核 |
| | | String msg = comActMessageBackVO.getMsgContent(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | Integer type = loginUserInfo.getType(); |
| | | if(null==type||(type!=1&&type!=2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | if (null == type || (type != 1 && type != 2)) { |
| | | return R.fail("留言对象类型错误!"); |
| | | } |
| | | Long userId = loginUserInfo.getUserId(); |
| | | comActMessageBackVO.setCommunityId(communityId); |
| | |
| | | comActMessageBackVO.setStatus(1); |
| | | return communityService.addMessageBack(comActMessageBackVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页显示我的留言",response = ComActMessageVO.class) |
| | | |
| | | @ApiOperation(value = "分页显示我的留言", response = ComActMessageVO.class) |
| | | @PostMapping("pagemymessage") |
| | | public R pageMyMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | public R pageMyMessage(@RequestBody ComActMessageVO comActMessageVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | comActMessageVO.setCommunityId(communityId); |
| | | comActMessageVO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageMyMessageApplets(comActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页显示居民给我的留言",response = ComActMessageVO.class) |
| | | |
| | | @ApiOperation(value = "分页显示居民给我的留言", response = ComActMessageVO.class) |
| | | @PostMapping("pagesendtomemessage") |
| | | public R pageSendToMessage (@RequestBody ComActMessageVO comActMessageVO){ |
| | | public R pageSendToMessage(@RequestBody ComActMessageVO comActMessageVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | if (null == communityId || 0 == communityId) { |
| | | return R.fail("用户未绑定社区"); |
| | | } |
| | | comActMessageVO.setCommunityId(communityId); |
| | |
| | | comActMessageVO.setPhone(loginUserInfo.getPhone()); |
| | | return communityService.pageSendToMessageApplets(comActMessageVO); |
| | | } |
| | | @ApiOperation(value = "分页显示指定用户的留言",response =ComActMessageVO.class ) |
| | | |
| | | @ApiOperation(value = "分页显示指定用户的留言", response = ComActMessageVO.class) |
| | | @PostMapping("pagemessagebyuser") |
| | | public R pageMessageByUser (@RequestBody ComActMessageVO comActMessageVO){ |
| | | public R pageMessageByUser(@RequestBody ComActMessageVO comActMessageVO) { |
| | | return communityService.pageMessageByUser(comActMessageVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "留言详情",response =ComActMessageVO.class ) |
| | | |
| | | @ApiOperation(value = "留言详情", response = ComActMessageVO.class) |
| | | @GetMapping("detailmessage") |
| | | @ApiImplicitParam(name = "id",value = "随手拍主键") |
| | | public R detailMessage(@RequestParam("id") Long id){ |
| | | @ApiImplicitParam(name = "id", value = "随手拍主键") |
| | | public R detailMessage(@RequestParam("id") Long id) { |
| | | return communityService.detailMessage(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页商城开关接口") |
| | | @GetMapping("isShop") |
| | | public R isShop(){ |
| | | public R isShop() { |
| | | return R.ok(Constants.IS_SHOP_OPEN); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取最新活动和用户最新收益",response =ComActEasyPhotoRewardVO.class ) |
| | | @ApiOperation(value = "获取最新活动和用户最新收益", response = ComActEasyPhotoRewardVO.class) |
| | | @GetMapping("getUserReward") |
| | | public R getUserReward(@RequestParam("communityId") Long communityId){ |
| | | public R getUserReward(@RequestParam("communityId") Long communityId) { |
| | | Long userId = 0L; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.getUserReward(userId,communityId); |
| | | return communityService.getUserReward(userId, communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "读取用户随手拍奖励") |
| | | @PostMapping("readUserReward") |
| | | public R readUserReward(){ |
| | | return communityService.readUserReward(this.getUserId(),this.getCommunityId()); |
| | | public R readUserReward() { |
| | | return communityService.readUserReward(this.getUserId(), this.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class) |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | import com.panzhihua.applets.model.vos.LoginRequest; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserAgreementVO; |
| | | import com.panzhihua.common.service.auth.TokenService; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.exceptions.WeiXinException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "登录" ,response =LoginReturnVO.class ) |
| | | @ApiOperation(value = "登录", response = LoginReturnVO.class) |
| | | @PostMapping("login") |
| | | public R login(@RequestBody LoginRequest loginRequest) { |
| | | String code = loginRequest.getCode(); |
| | |
| | | } |
| | | log.info(code); |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | WxMaJscode2SessionResult sessionInfo=null; |
| | | WxMaJscode2SessionResult sessionInfo = null; |
| | | try { |
| | | sessionInfo = maService.getUserService().getSessionInfo(code); |
| | | } catch (Exception e) { |
| | | log.error("微信登录失败【{}】", e.getMessage()); |
| | | if (code.equals("22")) { |
| | | sessionInfo=new WxMaJscode2SessionResult(); |
| | | sessionInfo = new WxMaJscode2SessionResult(); |
| | | sessionInfo.setOpenid("88888888"); |
| | | sessionInfo.setSessionKey("9999999"); |
| | | }else{ |
| | | } else { |
| | | return R.fail("微信登录失败"); |
| | | } |
| | | } |
| | |
| | | String sessionKey = sessionInfo.getSessionKey(); |
| | | String unionid = sessionInfo.getUnionid(); |
| | | if (ObjectUtils.isEmpty(unionid)) { |
| | | unionid="无"; |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid,sessionKey,unionid); |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | return tokenService.loginApplets(openid); |
| | | } |
| | | |
| | | @ApiOperation(value = "维护用户基本信息(昵称、性别、头像)") |
| | | @PostMapping("updateUserWeiXinInfo") |
| | | public R updateUserWeiXinInfo(@RequestBody LoginRequest loginRequest){ |
| | | public R updateUserWeiXinInfo(@RequestBody LoginRequest loginRequest) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | return R.fail(401,"请先登录"); |
| | | if (userId == null) { |
| | | return R.fail(401, "请先登录"); |
| | | } |
| | | boolean empty2 = ObjectUtils.isEmpty(userId); |
| | | if (empty2) { |
| | |
| | | String avatarUrl = wxUserInfo.getAvatarUrl(); |
| | | String gender = wxUserInfo.getGender(); |
| | | String nickName = wxUserInfo.getNickName(); |
| | | return userService.updateUserWeiXinInfo(userId,nickName,Integer.parseInt(gender),avatarUrl); |
| | | return userService.updateUserWeiXinInfo(userId, nickName, Integer.parseInt(gender), avatarUrl); |
| | | } |
| | | |
| | | @ApiOperation(value = "维护微信用户手机号") |
| | | @PostMapping("updateUserWeiXinPhone") |
| | | public R updateUserWeiXinPhone(@RequestBody LoginRequest loginRequest){ |
| | | public R updateUserWeiXinPhone(@RequestBody LoginRequest loginRequest) { |
| | | String encryptedData = loginRequest.getEncryptedData(); |
| | | String iv = loginRequest.getIv(); |
| | | boolean empty = ObjectUtils.isEmpty(iv); |
| | | boolean empty1 = ObjectUtils.isEmpty(encryptedData); |
| | | if (empty||empty1) { |
| | | if (empty || empty1) { |
| | | return R.fail("微信用户参数不全"); |
| | | } |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | Long userId = this.getUserId(); |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | LoginUserInfoVO loginUserInfoVO = r.getData(); |
| | | WxMaPhoneNumberInfo wxMaPhoneNumberInfo = maService.getUserService().getPhoneNoInfo(loginUserInfoVO.getSessionKey(), |
| | | encryptedData, iv); |
| | | WxMaPhoneNumberInfo wxMaPhoneNumberInfo = |
| | | maService.getUserService().getPhoneNoInfo(loginUserInfoVO.getSessionKey(), encryptedData, iv); |
| | | if (ObjectUtils.isEmpty(wxMaPhoneNumberInfo) || ObjectUtils.isEmpty(wxMaPhoneNumberInfo.getPhoneNumber())) { |
| | | return R.fail("微信解析手机号失败"); |
| | | } |
| | | String purePhoneNumber = wxMaPhoneNumberInfo.getPurePhoneNumber(); |
| | | return userService.updateUserWeiXinPhone(userId,purePhoneNumber); |
| | | return userService.updateUserWeiXinPhone(userId, purePhoneNumber); |
| | | } |
| | | |
| | | @ApiOperation(value = "维护微信用户手机号") |
| | | @PostMapping("updateUserWeiXinPhone2") |
| | | public R updateUserWeiXinPhone2(@RequestBody LoginRequest loginRequest){ |
| | | public R updateUserWeiXinPhone2(@RequestBody LoginRequest loginRequest) { |
| | | String code = loginRequest.getCode(); |
| | | if (ObjectUtils.isEmpty(code)) { |
| | | return R.fail("缺少登录参数"); |
| | | } |
| | | log.info(code); |
| | | WxMaService maService = wxMaConfiguration.getMaService(); |
| | | WxMaJscode2SessionResult sessionInfo=null; |
| | | WxMaJscode2SessionResult sessionInfo = null; |
| | | try { |
| | | sessionInfo = maService.getUserService().getSessionInfo(code); |
| | | } catch (Exception e) { |
| | | log.error("微信登录失败【{}】", e.getMessage()); |
| | | if (code.equals("22")) { |
| | | sessionInfo=new WxMaJscode2SessionResult(); |
| | | sessionInfo = new WxMaJscode2SessionResult(); |
| | | sessionInfo.setOpenid("88888888"); |
| | | sessionInfo.setSessionKey("9999999"); |
| | | }else{ |
| | | } else { |
| | | return R.fail("微信登录失败"); |
| | | } |
| | | } |
| | |
| | | String iv = loginRequest.getIv(); |
| | | boolean empty = ObjectUtils.isEmpty(iv); |
| | | boolean empty1 = ObjectUtils.isEmpty(encryptedData); |
| | | if (empty||empty1) { |
| | | if (empty || empty1) { |
| | | return R.fail("微信用户参数不全"); |
| | | } |
| | | // WxMaService maService = wxMaConfiguration.getMaService(); |
| | | // WxMaService maService = wxMaConfiguration.getMaService(); |
| | | Long userId = this.getUserId(); |
| | | // R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | // LoginUserInfoVO loginUserInfoVO = r.getData(); |
| | | WxMaPhoneNumberInfo wxMaPhoneNumberInfo = maService.getUserService().getPhoneNoInfo(sessionInfo.getSessionKey(), |
| | | encryptedData, iv); |
| | | // R<LoginUserInfoVO> r = userService.getUserInfoByUserId(userId + ""); |
| | | // LoginUserInfoVO loginUserInfoVO = r.getData(); |
| | | WxMaPhoneNumberInfo wxMaPhoneNumberInfo = |
| | | maService.getUserService().getPhoneNoInfo(sessionInfo.getSessionKey(), encryptedData, iv); |
| | | if (ObjectUtils.isEmpty(wxMaPhoneNumberInfo) || ObjectUtils.isEmpty(wxMaPhoneNumberInfo.getPhoneNumber())) { |
| | | return R.fail("微信解析手机号失败"); |
| | | } |
| | | String purePhoneNumber = wxMaPhoneNumberInfo.getPurePhoneNumber(); |
| | | return userService.updateUserWeiXinPhone(userId,purePhoneNumber); |
| | | return userService.updateUserWeiXinPhone(userId, purePhoneNumber); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户登出") |
| | | @PostMapping("logout") |
| | | public R updateUserWeiXinPhone(){ |
| | | public R updateUserWeiXinPhone() { |
| | | String token = this.getToken(); |
| | | boolean empty2 = ObjectUtils.isEmpty(token); |
| | | if (empty2) { |
| | |
| | | return tokenService.logout(token); |
| | | } |
| | | |
| | | @ApiOperation(value = "刷新token",response = LoginReturnVO.class) |
| | | @ApiOperation(value = "刷新token", response = LoginReturnVO.class) |
| | | @GetMapping("refreshToken") |
| | | @ApiImplicitParam(name ="refreshToken",value = "登录返回的刷新token") |
| | | public R refreshToken(@RequestParam("refreshToken")String refreshToken){ |
| | | @ApiImplicitParam(name = "refreshToken", value = "登录返回的刷新token") |
| | | public R refreshToken(@RequestParam("refreshToken") String refreshToken) { |
| | | return tokenService.refreshToken(refreshToken); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区") |
| | | @PostMapping("listcommunity") |
| | | public R listCommunity(@RequestBody ComActVO comActVO){ |
| | | public R listCommunity(@RequestBody ComActVO comActVO) { |
| | | return communityService.listCommunity(comActVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询小区",response = ComMngStructAreaVO.class) |
| | | @ApiOperation(value = "查询小区", response = ComMngStructAreaVO.class) |
| | | @GetMapping("listarea") |
| | | @ApiImplicitParam(name ="communityId",value = "社区id",required = true) |
| | | public R listArea(@RequestParam("communityId") Long communityId){ |
| | | @ApiImplicitParam(name = "communityId", value = "社区id", required = true) |
| | | public R listArea(@RequestParam("communityId") Long communityId) { |
| | | return communityService.listArea(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户绑定社区、小区") |
| | | @PutMapping("putusercommunityarea") |
| | | public R putUserCommunityArea(@RequestBody @Validated(PutGroup.class) LoginUserInfoVO loginUserInfoVO){ |
| | | public R putUserCommunityArea(@RequestBody @Validated(PutGroup.class) LoginUserInfoVO loginUserInfoVO) { |
| | | Long userId = this.getUserId(); |
| | | loginUserInfoVO.setUserId(userId); |
| | | return userService.putUserCommunityArea(loginUserInfoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户协议和隐私政策",response = SysUserAgreementVO.class) |
| | | @ApiOperation(value = "用户协议和隐私政策", response = SysUserAgreementVO.class) |
| | | @GetMapping("useragreement") |
| | | public R userAgreement(){ |
| | | int type=1; |
| | | public R userAgreement() { |
| | | int type = 1; |
| | | return userService.userAgreement(type); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyAppVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | 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; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | @ApiOperation(value = "分页查询邻里圈列表" , response = ComActNeighborCircleAppVO.class) |
| | | @ApiOperation(value = "分页查询邻里圈列表", response = ComActNeighborCircleAppVO.class) |
| | | @PostMapping("pageApp") |
| | | public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | |
| | | return R.fail("请重新登录"); |
| | | } |
| | | addNeighborCircleAppDTO.setUserId(userId); |
| | | if(StringUtils.isNotEmpty(loginUser.getPhone())){ |
| | | if (StringUtils.isNotEmpty(loginUser.getPhone())) { |
| | | addNeighborCircleAppDTO.setPhone(this.getLoginUserInfo().getPhone()); |
| | | } |
| | | if(communityId != null){ |
| | |
| | | return communityService.addNeighborByApp(addNeighborCircleAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询邻里圈详情" , response = ComActNeighborCircleDetailAppVO.class) |
| | | @ApiOperation(value = "查询邻里圈详情", response = ComActNeighborCircleDetailAppVO.class) |
| | | @PostMapping("detail") |
| | | public R neighborDetailByApp(@RequestBody ComActNeighborCircleDetailAppDTO neighborCircleAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | neighborCircleAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // neighborCircleAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // neighborCircleAppDTO.setUserId(userId); |
| | | return communityService.neighborDetailByApp(neighborCircleAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询用户邻里圈审核列表" , response = ComActNeighborCircleAppVO.class) |
| | | @ApiOperation(value = "分页查询用户邻里圈审核列表", response = ComActNeighborCircleAppVO.class) |
| | | @PostMapping("user/page") |
| | | public R neighborExamineByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | neighborCircleAppDTO.setUserId(userId); |
| | |
| | | @PostMapping("fabulous") |
| | | public R neighborFabulousByApp(@RequestBody ComActNeighborFabulousAppDTO fabulousAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | fabulousAppDTO.setUserId(userId); |
| | |
| | | @PostMapping("forward") |
| | | public R neighborForwardByApp(@RequestBody ComActNeighborForwardAppDTO forwardAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | forwardAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // forwardAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // forwardAppDTO.setUserId(userId); |
| | | return communityService.neighborForwardByApp(forwardAppDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("comment") |
| | | public R neighborCommentByApp(@RequestBody ComActNeighborCommentAppDTO commentAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | commentAppDTO.setUserId(userId); |
| | |
| | | @PostMapping("reply") |
| | | public R neighborReplyByApp(@RequestBody ComActNeighborReplyAppDTO replyAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | replyAppDTO.setUserId(userId); |
| | |
| | | @PostMapping("cancel/fabulous") |
| | | public R neighborFabulousCancelByApp(@RequestBody ComActNeighborFabulousAppDTO fabulousAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | fabulousAppDTO.setUserId(userId); |
| | |
| | | @PostMapping("add/browse") |
| | | public R neighborAddBrowseByApp(@RequestBody ComActNeighborAddBrowseAppDTO addBrowseAppDTO) { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | addBrowseAppDTO.setUserId(userId); |
| | | return communityService.neighborAddBrowseByApp(addBrowseAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询评论下所有回复",response = ComActNeighborCommentReplyAppVO.class) |
| | | @ApiOperation(value = "分页查询评论下所有回复", response = ComActNeighborCommentReplyAppVO.class) |
| | | @PostMapping("comment/reply") |
| | | public R neighborCommentReplyByApp(@RequestBody ComActNeighborCommentReplyAppDTO commentReplyAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | commentReplyAppDTO.setUserId(loginUserInfo.getUserId()); |
| | | } |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // commentReplyAppDTO.setUserId(userId); |
| | | // Long userId = this.getLoginUserInfo().getUserId(); |
| | | // if(userId == null){ |
| | | // return R.fail("请先登录"); |
| | | // } |
| | | // commentReplyAppDTO.setUserId(userId); |
| | | return communityService.neighborCommentReplyByApp(commentReplyAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区邻里圈话题列表" , response = ComActNeighborCircleTopicAppVO.class) |
| | | @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class) |
| | | @GetMapping("topic/list") |
| | | public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | if(isZero == null){ |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CheckService checkService; |
| | | |
| | | @ApiOperation(value = "分页党建动态/政策文件",response =PartyBuildingComPbDynVO.class ) |
| | | public static void main(String[] args) { |
| | | Date date = new Date(); |
| | | String dateFormat = String.format("%tF %tT ", date, date); |
| | | System.out.println(dateFormat); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页党建动态/政策文件", response = PartyBuildingComPbDynVO.class) |
| | | @PostMapping("pagedynamic") |
| | | public R pageYnamic(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO){ |
| | | public R pageYnamic(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | partyBuildingComPbDynVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | Integer type = partyBuildingComPbDynVO.getType(); |
| | |
| | | return partyBuildingService.pageYnamic(partyBuildingComPbDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询党员活动",response = PageActivityMembersVO.class) |
| | | @ApiOperation(value = "分页查询党员活动", response = PageActivityMembersVO.class) |
| | | @PostMapping("pageactivity") |
| | | public R pageActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | partyBuildingActivityVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | // partyBuildingActivityVO.setCommunityId(communityId); |
| | | // Long communityId = this.getCommunityId(); |
| | | // partyBuildingActivityVO.setCommunityId(communityId); |
| | | Integer status = partyBuildingActivityVO.getStatus(); |
| | | if (null!=status&&status.intValue()==4) { |
| | | if (null != status && status.intValue() == 4) { |
| | | partyBuildingActivityVO.setIsAppliets(1); |
| | | } |
| | | return partyBuildingService.pageActivity(partyBuildingActivityVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "动态/政策文件详情",response =PartyBuildingComPbDynVO.class ) |
| | | // @ApiOperation(value = "增加阅读记录") |
| | | // @PostMapping("adddynuser") |
| | | // public R addDynUser(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) { |
| | | // Long id = partyBuildingComPbDynVO.getId(); |
| | | // if (ObjectUtils.isEmpty(id)||0==id) { |
| | | // return R.fail("主键id不能为空"); |
| | | // } |
| | | // Long userId = this.getUserId(); |
| | | // ComPbDynUserVO comPbDynUserVO=new ComPbDynUserVO(); |
| | | // comPbDynUserVO.setCreateAt(new Date()); |
| | | // comPbDynUserVO.setDynId(id); |
| | | // comPbDynUserVO.setUserId(userId); |
| | | // return partyBuildingService.addDynUser(comPbDynUserVO); |
| | | // } |
| | | |
| | | @ApiOperation(value = "动态/政策文件详情", response = PartyBuildingComPbDynVO.class) |
| | | @GetMapping("infodynamic") |
| | | public R infoYnamic(@RequestParam("id") Long id) { |
| | | R r = partyBuildingService.infoYnamic(id); |
| | | if (R.isOk(r)) { |
| | | if (ObjectUtils.isEmpty(id)||0==id) { |
| | | if (ObjectUtils.isEmpty(id) || 0 == id) { |
| | | return R.fail("主键id不能为空"); |
| | | } |
| | | Long userId = null; |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | userId = loginUserInfo.getUserId(); |
| | | } |
| | | |
| | | PartyBuildingComPbDynVO partyBuildingComPbDynVO=JSONObject.parseObject(JSONObject.toJSONString(r.getData()),PartyBuildingComPbDynVO.class); |
| | | if(userId != null){ |
| | | ComPbDynUserVO comPbDynUserVO=new ComPbDynUserVO(); |
| | | PartyBuildingComPbDynVO partyBuildingComPbDynVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r.getData()), PartyBuildingComPbDynVO.class); |
| | | if (userId != null) { |
| | | ComPbDynUserVO comPbDynUserVO = new ComPbDynUserVO(); |
| | | comPbDynUserVO.setCreateAt(new Date()); |
| | | comPbDynUserVO.setDynId(id); |
| | | comPbDynUserVO.setUserId(userId); |
| | | R r1 = partyBuildingService.addDynUser(comPbDynUserVO); |
| | | if (R.isOk(r1)) { |
| | | partyBuildingComPbDynVO.setIsAdd(1); |
| | | }else{ |
| | | } else { |
| | | partyBuildingComPbDynVO.setIsAdd(0); |
| | | } |
| | | }else{ |
| | | } else { |
| | | partyBuildingComPbDynVO.setIsAdd(0); |
| | | } |
| | | return R.ok(partyBuildingComPbDynVO); |
| | |
| | | return r; |
| | | } |
| | | |
| | | // @ApiOperation(value = "增加阅读记录") |
| | | // @PostMapping("adddynuser") |
| | | // public R addDynUser(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) { |
| | | // Long id = partyBuildingComPbDynVO.getId(); |
| | | // if (ObjectUtils.isEmpty(id)||0==id) { |
| | | // return R.fail("主键id不能为空"); |
| | | // } |
| | | // Long userId = this.getUserId(); |
| | | // ComPbDynUserVO comPbDynUserVO=new ComPbDynUserVO(); |
| | | // comPbDynUserVO.setCreateAt(new Date()); |
| | | // comPbDynUserVO.setDynId(id); |
| | | // comPbDynUserVO.setUserId(userId); |
| | | // return partyBuildingService.addDynUser(comPbDynUserVO); |
| | | // } |
| | | |
| | | @ApiOperation(value = "分页党委查询",response =PartyCommitteeVO.class ) |
| | | @ApiOperation(value = "分页党委查询", response = PartyCommitteeVO.class) |
| | | @PostMapping("pagepartycommittee") |
| | | public R pagePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) { |
| | | // Long communityId =this.getCommunityId(); |
| | | // partyCommitteeVO.setCommunityId(communityId); |
| | | // Long communityId =this.getCommunityId(); |
| | | // partyCommitteeVO.setCommunityId(communityId); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | partyCommitteeVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return partyBuildingService.pagePartyCommittee(partyCommitteeVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "活动详情",response = PartyBuildingActivityVO.class) |
| | | @ApiOperation(value = "活动详情", response = PartyBuildingActivityVO.class) |
| | | @GetMapping("activityinfo") |
| | | public R activityinfo(@RequestParam("id") Long id) { |
| | | Long userId = this.getUserId(); |
| | | return partyBuildingService.activityinfo(id,userId); |
| | | return partyBuildingService.activityinfo(id, userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "党员活动人员参入列表",response = PartyBuildingMemberVO.class) |
| | | @ApiOperation(value = "党员活动人员参入列表", response = PartyBuildingMemberVO.class) |
| | | @GetMapping("listpartybuildingmember") |
| | | public R listPartyBuildingMember(@RequestParam("id") Long id) { |
| | | return partyBuildingService.listPartyBuildingMember(id); |
| | |
| | | activitySignUpDTO.setUserId(userId); |
| | | Long id = activitySignUpDTO.getId(); |
| | | R r = partyBuildingService.putActivitySignUp(activitySignUpDTO); |
| | | if (R.isOk(r)&&activitySignUpDTO.getType().intValue()==1) { |
| | | if (R.isOk(r) && activitySignUpDTO.getType().intValue() == 1) { |
| | | R r2 = partyBuildingService.activityinfo(id, userId); |
| | | PartyBuildingActivityVO partyBuildingActivityVO=JSONObject.parseObject(JSONObject.toJSONString(r2.getData()),PartyBuildingActivityVO.class); |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | PartyBuildingActivityVO partyBuildingActivityVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r2.getData()), PartyBuildingActivityVO.class); |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(1); |
| | | sysUserNoticeVO.setTitle("报名成功"); |
| | | sysUserNoticeVO.setBusinessType(2); |
| | | sysUserNoticeVO.setBusinessTitle(partyBuildingActivityVO.getName()); |
| | | Date activityTimeBegin = partyBuildingActivityVO.getActivityTimeBegin(); |
| | | sysUserNoticeVO.setBusinessContent(String.format("活动将于 %tF %tT 开始,请按时参加", activityTimeBegin,activityTimeBegin)); |
| | | sysUserNoticeVO |
| | | .setBusinessContent(String.format("活动将于 %tF %tT 开始,请按时参加", activityTimeBegin, activityTimeBegin)); |
| | | sysUserNoticeVO.setBusinessId(id); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | |
| | | @ApiOperation(value = "创建党员活动") |
| | | @PostMapping("activityinfo") |
| | | public R addActivityinfo(@RequestBody @Validated(AddGroup.class) ComPbActivityDTO comPbActivityDTO) { |
| | | // 微信内容审核 |
| | | // 微信内容审核 |
| | | String msg = comPbActivityDTO.getRichText(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comPbActivityDTO.setCreateBy(userId); |
| | | comPbActivityDTO.setCommunityId(communityId); |
| | | Date date=new Date(); |
| | | Date date = new Date(); |
| | | comPbActivityDTO.setReleaseTime(date); |
| | | Date activityTimeBegin = comPbActivityDTO.getActivityTimeBegin(); |
| | | Date activityTimeEnd = comPbActivityDTO.getActivityTimeEnd(); |
| | |
| | | if (before) { |
| | | return R.fail("活动结束时间不能早于开始时间"); |
| | | } |
| | | // 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消 |
| | | int status=2; |
| | | // 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消 |
| | | int status = 2; |
| | | Date enrollTimeBegin = comPbActivityDTO.getEnrollTimeBegin(); |
| | | Date enrollTimeEnd = comPbActivityDTO.getEnrollTimeEnd(); |
| | | if (enrollTimeEnd.before(enrollTimeBegin)) { |
| | | return R.fail("报名结束时间不能早于报名开始时间"); |
| | | } |
| | | if (enrollTimeBegin.before(date)) { |
| | | status=3; |
| | | status = 3; |
| | | } |
| | | comPbActivityDTO.setStatus(status); |
| | | return partyBuildingService.addActivityApplets(comPbActivityDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询服务团队成员",response = ComPbServiceTeamVO.class) |
| | | @ApiOperation(value = "分页查询服务团队成员", response = ComPbServiceTeamVO.class) |
| | | @PostMapping("pageserviceteam") |
| | | public R pageServiceTeam(@RequestBody PageComPbServiceTeamDTO pageComPbServiceTeamDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | if (loginUserInfo != null) { |
| | | pageComPbServiceTeamDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | // pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId()); |
| | | // pageComPbServiceTeamDTO.setCommunityId(this.getCommunityId()); |
| | | return partyBuildingService.pageServiceTeam(pageComPbServiceTeamDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class) |
| | | @PostMapping("listpartyorganization") |
| | | public R listPartyOrganization(@RequestBody ComListPartyDTO comListPartyDTO) { |
| | | // Long communityId = this.getCommunityId(); |
| | | // log.info("社区所有党组织社区id【{}】", communityId); |
| | | // if(communityId != null){ |
| | | // comListPartyDTO.setCommunityId(communityId); |
| | | // } |
| | | // Long communityId = this.getCommunityId(); |
| | | // log.info("社区所有党组织社区id【{}】", communityId); |
| | | // if(communityId != null){ |
| | | // comListPartyDTO.setCommunityId(communityId); |
| | | // } |
| | | return partyBuildingService.listPartyOrganizationByApp(comListPartyDTO); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | Date date = new Date(); |
| | | String dateFormat = String.format("%tF %tT ", date, date); |
| | | System.out.println(dateFormat); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.config.WxMaProperties; |
| | | import com.panzhihua.common.controller.BaseController; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Resource |
| | | private WxMaProperties properties; |
| | | |
| | | @ApiOperation(value = "分页查询店铺" , response = PageShopStoreVO.class) |
| | | @ApiOperation(value = "分页查询店铺", response = PageShopStoreVO.class) |
| | | @PostMapping("pageshopstore") |
| | | public R pageShopStore(@RequestBody PageComShopStoreDTO comShopStoreDTO) { |
| | | PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); |
| | | R conf = communityService.pageShopSysConf(pageComShopSysConfDTO); |
| | | if(R.isOk(conf)&& conf.getData()!=null){ |
| | | ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); |
| | | if("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())){ |
| | | return R.ok(); |
| | | if (R.isOk(conf) && conf.getData() != null) { |
| | | ComShopSysConfVO comShopSysConfVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); |
| | | if ("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())) { |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return communityService.pageShopStore(comShopStoreDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询店铺详情" , response = PageShopStoreVO.class) |
| | | @ApiOperation(value = "查询店铺详情", response = PageShopStoreVO.class) |
| | | @PostMapping("shopstoredetail") |
| | | public R shopStoreDetail(@RequestBody PageComShopStoreDTO comShopStoreDTO) { |
| | | if(comShopStoreDTO == null || comShopStoreDTO.getStoreId() == null){ |
| | | if (comShopStoreDTO == null || comShopStoreDTO.getStoreId() == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.shopStoreDetail(comShopStoreDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询商品列表" , response = ComShopGoodsVO.class) |
| | | @ApiOperation(value = "分页查询商品列表", response = ComShopGoodsVO.class) |
| | | @PostMapping("pageShopGoods") |
| | | public R pageShopGoods(@RequestBody ComShopGoodsDTO comShopGoodsDTO) { |
| | | return communityService.pageShopGoods(comShopGoodsDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询商品详情" , response = ComShopGoodsVO.class) |
| | | @ApiOperation(value = "查询商品详情", response = ComShopGoodsVO.class) |
| | | @PostMapping("shopGoodsDetail") |
| | | @ApiImplicitParam(name = "goodsId",value = "商品id",required = true) |
| | | @ApiImplicitParam(name = "goodsId", value = "商品id", required = true) |
| | | public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.shopGoodsDetail(goodsId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询用户购物车列表" , response = ComShopCartVO.class) |
| | | @ApiOperation(value = "查询用户购物车列表", response = ComShopCartVO.class) |
| | | @PostMapping("shopCartList") |
| | | public R shopCartList() { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.shopCartList(userId); |
| | |
| | | @PostMapping("shopCartUserTotal") |
| | | public R shopCartUserTotal() { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); |
| | | R conf = communityService.pageShopSysConf(pageComShopSysConfDTO); |
| | | if(R.isOk(conf)&& conf.getData()!=null){ |
| | | ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); |
| | | if("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())){ |
| | | return R.ok(0); |
| | | if (R.isOk(conf) && conf.getData() != null) { |
| | | ComShopSysConfVO comShopSysConfVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); |
| | | if ("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())) { |
| | | return R.ok(0); |
| | | } |
| | | } |
| | | return communityService.shopCartUserTotal(userId); |
| | |
| | | @PostMapping("shopAddCart") |
| | | public R shopAddCart(@RequestBody ComShopCartDTO comShopCartDTO) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | comShopCartDTO.setUserId(userId); |
| | |
| | | return communityService.shopDelCart(Ids); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询用户收货地址列表" , response = ComShopUserAddressVO.class) |
| | | @ApiOperation(value = "查询用户收货地址列表", response = ComShopUserAddressVO.class) |
| | | @PostMapping("shopUserAddressList") |
| | | public R shopUserAddressList(@RequestBody PageComShopAddressDTO comShopAddressDTO) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | comShopAddressDTO.setUserId(userId); |
| | |
| | | @PostMapping("shopAddUserAddress") |
| | | public R shopAddUserAddress(@RequestBody ComShopAddressDTO comShopAddressDTO) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | comShopAddressDTO.setUserId(userId); |
| | |
| | | @PostMapping("shopEditUserAddress") |
| | | public R shopEditUserAddress(@RequestBody ComShopAddressDTO comShopAddressDTO) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | comShopAddressDTO.setUserId(userId); |
| | |
| | | |
| | | @ApiOperation(value = "删除用户收货地址列表") |
| | | @PostMapping("shopDelUserAddress") |
| | | @ApiImplicitParam(name = "addressId",value = "收货地址id",required = true) |
| | | @ApiImplicitParam(name = "addressId", value = "收货地址id", required = true) |
| | | public R shopDelUserAddress(@RequestParam("addressId") Long addressId) { |
| | | return communityService.shopDelUserAddress(addressId); |
| | | } |
| | |
| | | @PostMapping("orderPreview") |
| | | public R orderPreview(@RequestBody ComShopOrderPreviewDTO orderPreviewDTO) { |
| | | Long userId = this.getUserId(); |
| | | if(userId == null){ |
| | | if (userId == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | orderPreviewDTO.setUserId(userId); |
| | |
| | | @PostMapping("orderCreate") |
| | | public R orderCreate(@RequestBody ComShopOrderCreateDTO orderCreateDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | orderCreateDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | @PostMapping("pageOrderList") |
| | | public R pageOrderList(@RequestBody PageComOrderListDTO comOrderListDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | comOrderListDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | |
| | | @ApiOperation(value = "查询订单详情", response = ComShopOrderPageVO.class) |
| | | @PostMapping("orderDetail") |
| | | @ApiImplicitParam(name = "orderId",value = "订单id",required = true) |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDetail(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDetail(orderId); |
| | | } |
| | |
| | | @PostMapping("orderCancel") |
| | | public R orderCancel(@RequestBody ComShopOrderQueryDTO comShopOrderQueryDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.orderCancel(comShopOrderQueryDTO); |
| | |
| | | |
| | | @ApiOperation(value = "删除订单") |
| | | @PostMapping("orderDelete") |
| | | @ApiImplicitParam(name = "orderId",value = "订单id",required = true) |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDelete(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDelete(orderId); |
| | | } |
| | |
| | | @PostMapping("orderConfirm") |
| | | public R orderConfirm(@RequestBody ComShopOrderQueryDTO comShopOrderQueryDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.orderConfirm(comShopOrderQueryDTO); |
| | |
| | | @PostMapping("orderStatistics") |
| | | public R orderStatistics() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.orderStatistics(loginUserInfo.getUserId()); |
| | |
| | | |
| | | @ApiOperation(value = "小程序微信调起支付") |
| | | @PostMapping("wxpay") |
| | | public R wxPay(@RequestBody OrderPayDTO orderPayDTO){ |
| | | public R wxPay(@RequestBody OrderPayDTO orderPayDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | orderPayDTO.setOpenId(loginUserInfo.getOpenid()); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.applets.model.dtos.ComPbMemberCertificationDTO; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.dtos.shop.ExcelShopOrderDTO; |
| | | import com.panzhihua.common.constants.SecurityConstants; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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 org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.model.dtos.ComPbMemberCertificationDTO; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.constants.SecurityConstants; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; |
| | | 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.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.model.vos.user.UpdateUserArchivesVO; |
| | | import com.panzhihua.common.model.vos.user.UserArchivesVO; |
| | | import com.panzhihua.common.model.vos.user.UserPhoneVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | if (R.isOk(r)) { |
| | | Object data = r.getData(); |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO) data; |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO)data; |
| | | R r1 = communityService.detailHouse(userId); |
| | | if (null != communityId && 0 != communityId) { |
| | | R r2 = communityService.detailCommunity(communityId); |
| | | if (R.isOk(r2)) { |
| | | Object data1 = r2.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComActVO(JSONObject.parseObject(JSONObject.toJSONString(data1), ComActVO.class)); |
| | | loginUserInfoVO |
| | | .setComActVO(JSONObject.parseObject(JSONObject.toJSONString(data1), ComActVO.class)); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | |
| | | if (R.isOk(r3)) { |
| | | Object data1 = r3.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComMngStructAreaVO(JSONObject.parseObject(JSONObject.toJSONString(data1), ComMngStructAreaVO.class)); |
| | | loginUserInfoVO.setComMngStructAreaVO( |
| | | JSONObject.parseObject(JSONObject.toJSONString(data1), ComMngStructAreaVO.class)); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | |
| | | if (R.isOk(r1)) { |
| | | Object data1 = r1.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComMngStructHouseVOS((List<ComMngStructHouseVO>) data1); |
| | | loginUserInfoVO.setComMngStructHouseVOS((List<ComMngStructHouseVO>)data1); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | |
| | | loginUserInfoVO.setUserId(userId); |
| | | R r = userService.putUserAuthentication(loginUserInfoVO); |
| | | if (R.isOk(r)) { |
| | | //通过发通知 |
| | | // 通过发通知 |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(3); |
| | |
| | | if (R.isOk(r1)) { |
| | | log.info("新增实名认证未通过通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | //清空缓存 |
| | | // 清空缓存 |
| | | String userRoleKey = UserConstants.LOGIN_USER_INFO + this.getLoginUserInfo().getUserId(); |
| | | String userAppletRoleKey = SecurityConstants.ROLE_APPLETS_USER + this.getLoginUserInfo().getUserId(); |
| | | stringRedisTemplate.delete(userRoleKey); |
| | | stringRedisTemplate.delete(userAppletRoleKey); |
| | | } else { |
| | | //未通过发通知 |
| | | // 未通过发通知 |
| | | /** |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("实名制审核未通过"); |
| | | sysUserNoticeVO.setBusinessType(6); |
| | | sysUserNoticeVO.setBusinessContent(String.format("驳回原因:%s",r.getMsg())); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | | R r1 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r1)) { |
| | | log.info("新增实名认证未通过通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | * SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); sysUserNoticeVO.setUserId(userId); |
| | | * sysUserNoticeVO.setType(3); sysUserNoticeVO.setTitle("实名制审核未通过"); sysUserNoticeVO.setBusinessType(6); |
| | | * sysUserNoticeVO.setBusinessContent(String.format("驳回原因:%s",r.getMsg())); sysUserNoticeVO.setStatus(0); |
| | | * sysUserNoticeVO.setBusinessStatus(1); R r1 = userService.addNotice(sysUserNoticeVO); if (R.isOk(r1)) { |
| | | * log.info("新增实名认证未通过通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); } |
| | | */ |
| | | } |
| | | return r; |
| | |
| | | List<ComActActivityVO> comActActivityVOS = new ArrayList<>(); |
| | | R r = communityService.listActivity(userId); |
| | | if (R.isOk(r)) { |
| | | comActActivityVOS = (List<ComActActivityVO>) r.getData(); |
| | | comActActivityVOS = (List<ComActActivityVO>)r.getData(); |
| | | } |
| | | R r1 = partyBuildingService.listActivity(userId, communityId); |
| | | if (R.isOk(r1)) { |
| | | List<ComActActivityVO> data = (List<ComActActivityVO>) r1.getData(); |
| | | List<ComActActivityVO> data = (List<ComActActivityVO>)r1.getData(); |
| | | comActActivityVOS.addAll(data); |
| | | } |
| | | if (!ObjectUtils.isEmpty(comActActivityVOS)) { |
| | | String s = JSONArray.toJSONString(comActActivityVOS); |
| | | List<ComActActivityVO> comActActivityVOS1 = new ArrayList<>(); |
| | | comActActivityVOS1 = JSONArray.parseArray(s, ComActActivityVO.class); |
| | | List<ComActActivityVO> collect = comActActivityVOS1.stream().sorted(Comparator.comparing(ComActActivityVO::getBeginAt).reversed()).collect(Collectors.toList()); |
| | | List<ComActActivityVO> collect = comActActivityVOS1.stream() |
| | | .sorted(Comparator.comparing(ComActActivityVO::getBeginAt).reversed()).collect(Collectors.toList()); |
| | | comActActivityVOS = collect; |
| | | } |
| | | if (!ObjectUtils.isEmpty(comActActivityVOS)) { |
| | | List<ComActActivityVO> collect = comActActivityVOS.stream().sorted(Comparator.comparing(ComActActivityVO::getSingDate).reversed()).collect(Collectors.toList()); |
| | | 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()); |
| | | } |
| | | })); |
| | | } |
| | | //当前用户活动评分 |
| | | R r3 = communityService.listEvaluate(userId); |
| | | if (R.isOk(r3) && !ObjectUtils.isEmpty(r3.getData())) { |
| | | List<ComActActEvaluateVO> comActActEvaluateVOS = JSONArray.parseArray(JSONArray.toJSONString(r3.getData()), ComActActEvaluateVO.class); |
| | | collect.forEach(comActActivityVO -> comActActEvaluateVOS.forEach(comActActEvaluateVO -> { |
| | | if (comActActEvaluateVO.getActivityId().equals(comActActivityVO.getId())) { |
| | | comActActivityVO.setMyRating(comActActEvaluateVO.getStarLevel()); |
| | | } |
| | | })); |
| | | } |
| | | return R.ok(collect); |
| | | } |
| | | return R.ok(comActActivityVOS); |
| | |
| | | @ApiOperation(value = "意见反馈") |
| | | @PostMapping("feedback") |
| | | public R addFeedback(@RequestBody @Validated(AddGroup.class) SysUserFeedbackDTO sysUserFeedbackDTO) { |
| | | // 微信内容审核 |
| | | // 微信内容审核 |
| | | String msg = sysUserFeedbackDTO.getContent(); |
| | | if (!checkService.checkMessage(msg)) { |
| | | return R.fail("内容违规"); |
| | |
| | | |
| | | @ApiOperation(value = "党员认证") |
| | | @PostMapping("partybuildingembercertification") |
| | | public R partybuildingembercertification(@RequestBody @Validated(AddGroup.class) ComPbMemberCertificationDTO comPbMemberCertificationDTO) { |
| | | //党员认证 |
| | | public R partybuildingembercertification( |
| | | @RequestBody @Validated(AddGroup.class) ComPbMemberCertificationDTO comPbMemberCertificationDTO) { |
| | | // 党员认证 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | |
| | | return R.fail("未绑定社区"); |
| | | } |
| | | |
| | | //判断用户是否已认证成功 |
| | | // 判断用户是否已认证成功 |
| | | R certUser = partyBuildingService.userCertification(userId); |
| | | |
| | | Object certUserInfo = certUser.getData(); |
| | | AtomicBoolean userCertified = new AtomicBoolean(false); |
| | | if (R.isOk(certUser) && certUserInfo != null) { |
| | | try { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = JSONArray.parseArray(JSONArray.toJSONString(certUser.getData()), PartyBuildingMemberVO.class); |
| | | //已认证党员身份,直接返回 |
| | | if(partyBuildingMemberVOList!=null && partyBuildingMemberVOList.size()>0) { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = |
| | | JSONArray.parseArray(JSONArray.toJSONString(certUser.getData()), PartyBuildingMemberVO.class); |
| | | // 已认证党员身份,直接返回 |
| | | if (partyBuildingMemberVOList != null && partyBuildingMemberVOList.size() > 0) { |
| | | partyBuildingMemberVOList.forEach(vo -> { |
| | | userCertified.set(vo.getAuditResult() == 1); |
| | | }); |
| | | } |
| | | }catch (Exception e){} |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | //匹配手机,验证是否进行自动确认 |
| | | // 匹配手机,验证是否进行自动确认 |
| | | if (userCertified.get()) { |
| | | return R.fail("您已审核通过,无需重复提交"); |
| | | } |
| | |
| | | partyBuildingMemberVO.setAuditResult(0); |
| | | partyBuildingMemberVO.setCommunityId(communityId); |
| | | |
| | | //用户实名认证信息判断 |
| | | // 用户实名认证信息判断 |
| | | String idCard = loginUserInfo.getIdCard(); |
| | | partyBuildingMemberVO.setUserId(userId); |
| | | if (idCard == null) { |
| | |
| | | @ApiOperation(value = "党员认证查询") |
| | | @GetMapping("partybuildingembercertification") |
| | | public R partybuildingembercertification() { |
| | | //党员认证查询 |
| | | // 党员认证查询 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long userId = loginUserInfo.getUserId(); |
| | | R r = partyBuildingService.userCertification(userId); |
| | | |
| | | if(R.isOk(r)) { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), PartyBuildingMemberVO.class); |
| | | if(partyBuildingMemberVOList!=null && partyBuildingMemberVOList.size()>0){ |
| | | Optional<PartyBuildingMemberVO> ot = partyBuildingMemberVOList.stream().filter(partyBuildingMemberVO -> partyBuildingMemberVO.getAuditResult()==1).findFirst(); |
| | | if(ot.isPresent()){ |
| | | if (R.isOk(r)) { |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), PartyBuildingMemberVO.class); |
| | | if (partyBuildingMemberVOList != null && partyBuildingMemberVOList.size() > 0) { |
| | | Optional<PartyBuildingMemberVO> ot = partyBuildingMemberVOList.stream() |
| | | .filter(partyBuildingMemberVO -> partyBuildingMemberVO.getAuditResult() == 1).findFirst(); |
| | | if (ot.isPresent()) { |
| | | return R.ok(ot.get()); |
| | | }else{ |
| | | } else { |
| | | return R.ok(partyBuildingMemberVOList.get(0)); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户电子档案", response = UserArchivesVO.class) |
| | | @PostMapping("getUserArchives") |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollByAppDTO; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesEnrollUserByAppDTO; |
| | |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesEnrollUserByAppVO; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesUserInoculationByAppVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @RestController |
| | | @RequestMapping("/vaccines/") |
| | | @Api(tags = {"疫苗服务"}) |
| | | public class VaccinesApi extends BaseController{ |
| | | public class VaccinesApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "疫苗分类列表" , response = VaccinesByAppVO.class) |
| | | @ApiOperation(value = "疫苗分类列表", response = VaccinesByAppVO.class) |
| | | @PostMapping("list") |
| | | public R getVaccinesListByApp() { |
| | | return communityService.getVaccinesListByApp(); |
| | | } |
| | | |
| | | @ApiOperation(value = "疫苗类型对应家庭成员接种列表" , response = VaccinesEnrollUserByAppVO.class) |
| | | @ApiOperation(value = "疫苗类型对应家庭成员接种列表", response = VaccinesEnrollUserByAppVO.class) |
| | | @PostMapping("user/list") |
| | | public R getVaccinesUserListByApp(@RequestBody VaccinesEnrollUserByAppDTO enrollUserByAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | enrollUserByAppDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | |
| | | @ApiOperation(value = "用户疫苗报名") |
| | | @PostMapping("enroll") |
| | | public R VaccinesEnrollByApp(@RequestBody VaccinesEnrollByAppDTO enrollByAppDTO){ |
| | | public R VaccinesEnrollByApp(@RequestBody VaccinesEnrollByAppDTO enrollByAppDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | enrollByAppDTO.setUserId(loginUserInfo.getUserId()); |
| | |
| | | return communityService.VaccinesEnrollByApp(enrollByAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户家庭接种记录" , response = VaccinesUserInoculationByAppVO.class) |
| | | @ApiOperation(value = "用户家庭接种记录", response = VaccinesUserInoculationByAppVO.class) |
| | | @PostMapping("user/inoculation/list") |
| | | public R getVaccinesUserInoculationListByApp() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请先登录"); |
| | | } |
| | | return communityService.getVaccinesUserInoculationListByApp(loginUserInfo.getUserId()); |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeVO; |
| | | import com.panzhihua.common.model.vos.community.wallet.ComActWalletVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("/wallet/") |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @auther llming |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "办事指南_分页",response = ComActWorkGuideVO.class) |
| | | @ApiOperation(value = "办事指南_分页", response = ComActWorkGuideVO.class) |
| | | @PostMapping("pageworkguide") |
| | | public R detailWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return communityService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南_详情",response = ComActWorkGuideVO.class) |
| | | @ApiOperation(value = "办事指南_详情", response = ComActWorkGuideVO.class) |
| | | @GetMapping("detailworkguide") |
| | | public R detailWorkGuide(@RequestParam("workGuideId")Long workGuideId,@RequestParam(value = "conmunityId",required = false)Long communityId) { |
| | | Long conmunityId = communityId; |
| | | public R detailWorkGuide(@RequestParam("workGuideId") Long workGuideId, |
| | | @RequestParam(value = "communityId", required = false) Long communityId) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if(loginUserInfo != null){ |
| | | conmunityId = loginUserInfo.getCommunityId(); |
| | | if (loginUserInfo != null) { |
| | | communityId = loginUserInfo.getCommunityId(); |
| | | } |
| | | return communityService.detailWorkGuide(workGuideId, conmunityId); |
| | | return communityService.detailWorkGuide(workGuideId, communityId); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.json.XML; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.shop.WxPayNotifyOrderDTO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | String inputLine = ""; |
| | | String notityXml = ""; |
| | | try { |
| | | while((inputLine = request.getReader().readLine()) != null){ |
| | | while ((inputLine = request.getReader().readLine()) != null) { |
| | | notityXml += inputLine; |
| | | } |
| | | //关闭流 |
| | | // 关闭流 |
| | | request.getReader().close(); |
| | | log.info("微信回调内容信息:"+notityXml); |
| | | //解析成Json |
| | | log.info("微信回调内容信息:" + notityXml); |
| | | // 解析成Json |
| | | org.json.JSONObject xmlJson = XML.toJSONObject(notityXml); |
| | | if(StringUtils.isNotEmpty(xmlJson.toString())){ |
| | | if (StringUtils.isNotEmpty(xmlJson.toString())) { |
| | | JSONObject resultData = JSON.parseObject(xmlJson.get("xml").toString()); |
| | | //成功支付订单 |
| | | if(resultData.getString("result_code").equals("SUCCESS") && resultData.getString("return_code").equals("SUCCESS")){ |
| | | // 成功支付订单 |
| | | if (resultData.getString("result_code").equals("SUCCESS") |
| | | && resultData.getString("return_code").equals("SUCCESS")) { |
| | | WxPayNotifyOrderDTO notifyOrderDTO = new WxPayNotifyOrderDTO(); |
| | | //订单号 |
| | | // 订单号 |
| | | String orderTradeNo = resultData.getString("out_trade_no"); |
| | | notifyOrderDTO.setOrderTradeNo(orderTradeNo); |
| | | //微信支付订单号 |
| | | // 微信支付订单号 |
| | | String wxTradeNo = resultData.getString("transaction_id"); |
| | | notifyOrderDTO.setWxTradeNo(wxTradeNo); |
| | | //订单金额 |
| | | // 订单金额 |
| | | String totalFee = resultData.getString("total_fee"); |
| | | notifyOrderDTO.setTotalFee(totalFee); |
| | | //支付完成时间 |
| | | // 支付完成时间 |
| | | String payTime = resultData.getString("time_end"); |
| | | notifyOrderDTO.setPayTime(payTime); |
| | | //现金支付金额 |
| | | // 现金支付金额 |
| | | String cashFee = resultData.getString("cash_fee"); |
| | | notifyOrderDTO.setCashFee(cashFee); |
| | | |
| | | //根据订单号修改订单信息 |
| | | // 根据订单号修改订单信息 |
| | | communityService.wxOrderPayNotify(notifyOrderDTO); |
| | | |
| | | //封装 返回值 |
| | | // 封装 返回值 |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("<xml>"); |
| | | buffer.append("<return_code>SUCCESS</return_code>"); |
| | | buffer.append("<return_msg>OK</return_msg>"); |
| | | buffer.append("</xml>"); |
| | | |
| | | //给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | // 给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | PrintWriter writer = response.getWriter(); |
| | | //返回 |
| | | // 返回 |
| | | writer.print(buffer.toString()); |
| | | }else{//未成功支付订单 |
| | | //封装 返回值 |
| | | } else {// 未成功支付订单 |
| | | // 封装 返回值 |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("<xml>"); |
| | | buffer.append("<return_code>FAIL</return_code>"); |
| | | buffer.append("<return_msg>FAIL</return_msg>"); |
| | | buffer.append("</xml>"); |
| | | |
| | | //给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | // 给微信服务器返回 成功标示 否则会一直询问 咱们服务器 是否回调成功 |
| | | PrintWriter writer = response.getWriter(); |
| | | //返回 |
| | | // 返回 |
| | | writer.print(buffer.toString()); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.io.PrintWriter; |
| | | import java.security.MessageDigest; |
| | | import java.util.Arrays; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.Arrays; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | |
| | | private String token = "01A9CB2234D7CBD0AC61B75EB1263805"; |
| | | |
| | | private String url = "www.taobao.com";//图文跳转地址 |
| | | private String url = "www.taobao.com";// 图文跳转地址 |
| | | |
| | | private String thumbUrl = "https://www.psciio.com//idcard/f986ba3ae7a241d9bce5cb568adec7da.jpg";//图片地址 |
| | | private String thumbUrl = "https://www.psciio.com//idcard/f986ba3ae7a241d9bce5cb568adec7da.jpg";// 图片地址 |
| | | |
| | | @Resource |
| | | private WxXCXTempSend wxXCXTempSend; |
| | |
| | | String nonce = request.getParameter("nonce"); |
| | | // 随机字符串 |
| | | String echostr = request.getParameter("echostr"); |
| | | log.info("signature = "+signature+" , timestamp = "+timestamp+ " , nonce = "+nonce+ " , echostr = "+echostr); |
| | | String[] strArray = new String[] { token, timestamp, nonce }; |
| | | log.info("signature = " + signature + " , timestamp = " + timestamp + " , nonce = " + nonce |
| | | + " , echostr = " + echostr); |
| | | String[] strArray = new String[] {token, timestamp, nonce}; |
| | | Arrays.sort(strArray); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String str : strArray) { |
| | |
| | | response.getOutputStream().write(echostr.getBytes()); |
| | | } |
| | | |
| | | }else{ |
| | | } else { |
| | | // 进入POST聊天处理 |
| | | // 将请求、响应的编码均设置为UTF-8(防止中文乱码) |
| | | request.setCharacterEncoding("UTF-8"); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 接受到微信接口数据 |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | |
| | | String inputLine = ""; |
| | | String notityXml = ""; |
| | | try { |
| | | //接收数据 |
| | | while((inputLine = request.getReader().readLine()) != null){ |
| | | // 接收数据 |
| | | while ((inputLine = request.getReader().readLine()) != null) { |
| | | notityXml += inputLine; |
| | | } |
| | | |
| | | // xml请求解析 |
| | | JSONObject requestJson = JSON.parseObject(notityXml); |
| | | log.info(">>>>>>>>>>>>>"+requestJson.toString()); |
| | | log.info(">>>>>>>>>>>>>" + requestJson.toString()); |
| | | // 发送方帐号(open_id) |
| | | String fromUserName = requestJson.get("FromUserName").toString(); |
| | | // 公众帐号 |
| | | String toUserName = requestJson.get("ToUserName").toString(); |
| | | // 消息类型 |
| | | String msgType = requestJson.get("MsgType").toString(); |
| | | // String Event = requestJson.get("Event").toString(); //SCAN 为扫描信息 VIEW 公众号底部点击事件 |
| | | log.info("fromUserName = "+fromUserName+" , ToUserName = "+toUserName+ " , msgType = "+msgType); |
| | | // String Event = requestJson.get("Event").toString(); //SCAN 为扫描信息 VIEW 公众号底部点击事件 |
| | | log.info("fromUserName = " + fromUserName + " , ToUserName = " + toUserName + " , msgType = " + msgType); |
| | | |
| | | String access_token = wxXCXTempSend.getAccessToken();//获取access_token |
| | | String access_token = wxXCXTempSend.getAccessToken();// 获取access_token |
| | | |
| | | //公众号关注事件消息 |
| | | if(msgType.equals("event")){ |
| | | // log.info("公众号被关注事件.........."); |
| | | }else if(msgType.equals("text")){ |
| | | // if(StringUtils.isNotEmpty(access_token)){ |
| | | // String mediaId = wxXCXTempSend.getMediaId(access_token);//获取mediaId |
| | | // WxUtil.sendKfImagesMessage(fromUserName,access_token,mediaId); |
| | | // } |
| | | // log.info("公众号接受文字.........."); |
| | | }else if(msgType.equals("image")){ |
| | | // log.info("公众号接受图片.........."); |
| | | }else if(msgType.equals("miniprogrampage")){ |
| | | if(StringUtils.isNotEmpty(access_token)){ |
| | | String mediaId = wxXCXTempSend.getMediaId(access_token);//获取mediaId |
| | | WxUtil.sendKfImagesMessage(fromUserName,access_token,mediaId); |
| | | // 公众号关注事件消息 |
| | | if (msgType.equals("event")) { |
| | | // log.info("公众号被关注事件.........."); |
| | | } else if (msgType.equals("text")) { |
| | | // if(StringUtils.isNotEmpty(access_token)){ |
| | | // String mediaId = wxXCXTempSend.getMediaId(access_token);//获取mediaId |
| | | // WxUtil.sendKfImagesMessage(fromUserName,access_token,mediaId); |
| | | // } |
| | | // log.info("公众号接受文字.........."); |
| | | } else if (msgType.equals("image")) { |
| | | // log.info("公众号接受图片.........."); |
| | | } else if (msgType.equals("miniprogrampage")) { |
| | | if (StringUtils.isNotEmpty(access_token)) { |
| | | String mediaId = wxXCXTempSend.getMediaId(access_token);// 获取mediaId |
| | | WxUtil.sendKfImagesMessage(fromUserName, access_token, mediaId); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.HttpClientUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.MalformedURLException; |
| | | import java.net.ProtocolException; |
| | | import java.net.URL; |
| | | import java.nio.charset.Charset; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | @Resource |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | //公众号appid |
| | | private List<String> appidList = new ArrayList<String>(){{this.add("wx7c733ebbf6c55ecf");this.add("wxc94f0cddf13577d5");}}; |
| | | //公众号secret |
| | | private List<String> secretList = new ArrayList<String>(){{this.add("500290552cbfdd1c1c18131c5807b6ae");this.add("3418127405845701497a09f65678953f");}}; |
| | | |
| | | /** |
| | | * 获取token |
| | | * @param appid 公众号appid |
| | | * @param secret 公众号secret |
| | | * @return token |
| | | */ |
| | | private String getToken(String appid,String secret) throws MalformedURLException, IOException, ProtocolException { |
| | | // access_token接口https请求方式: GET https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET |
| | | String path = " https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential"; |
| | | URL url = new URL(path+"&appid=" + appid + "&secret=" + secret); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | connection.connect(); |
| | | |
| | | InputStream in = connection.getInputStream(); |
| | | byte[] b = new byte[100]; |
| | | int len = -1; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while((len = in.read(b)) != -1) { |
| | | sb.append(new String(b,0,len)); |
| | | // 公众号appid |
| | | private List<String> appidList = new ArrayList<String>() { |
| | | { |
| | | this.add("wx7c733ebbf6c55ecf"); |
| | | this.add("wxc94f0cddf13577d5"); |
| | | } |
| | | |
| | | // System.out.println(sb.toString()); |
| | | in.close(); |
| | | return sb.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 通过token获取公众号文章 |
| | | * @param token token |
| | | * @return 获取的文章列表结果 |
| | | */ |
| | | private String getContentList(String token) throws IOException { |
| | | String path = " https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=" + token; |
| | | URL url = new URL(path); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("POST"); |
| | | connection.setDoOutput(true); |
| | | connection.setRequestProperty("content-type", "application/json;charset=utf-8"); |
| | | connection.connect(); |
| | | // post发送的参数 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("type", "news"); // news表示图文类型的素材,具体看API文档 |
| | | map.put("offset", 0); |
| | | map.put("count", 5); |
| | | // 将map转换成json字符串 |
| | | String paramBody = JSON.toJSONString(map); // 这里用了Alibaba的fastjson |
| | | |
| | | OutputStream out = connection.getOutputStream(); |
| | | BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out,"utf-8")); |
| | | bw.write(paramBody); // 向流中写入参数字符串 |
| | | bw.flush(); |
| | | |
| | | InputStream in = connection.getInputStream(); |
| | | byte[] b = new byte[100]; |
| | | int len = -1; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while((len = in.read(b)) != -1) { |
| | | sb.append(new String(b,0,len,"UTF-8")); |
| | | }; |
| | | // 公众号secret |
| | | private List<String> secretList = new ArrayList<String>() { |
| | | { |
| | | this.add("500290552cbfdd1c1c18131c5807b6ae"); |
| | | this.add("3418127405845701497a09f65678953f"); |
| | | } |
| | | |
| | | in.close(); |
| | | return sb.toString(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 微信公众号请求头设置 |
| | |
| | | /** |
| | | * 根据文章链接抓取文章内容 |
| | | * |
| | | * @param url 文章链接 |
| | | * @param url |
| | | * 文章链接 |
| | | * @return 文章内容 |
| | | */ |
| | | public static String getActicle(String url) { |
| | |
| | | map.put("count", 5); |
| | | // 将map转换成json字符串 |
| | | String paramBody = JSON.toJSONString(map); |
| | | return HttpClientUtil.get(url, getWxHeaderMap(),paramBody); |
| | | return HttpClientUtil.get(url, getWxHeaderMap(), paramBody); |
| | | } |
| | | |
| | | /** |
| | | * 获取token |
| | | * |
| | | * @param appid |
| | | * 公众号appid |
| | | * @param secret |
| | | * 公众号secret |
| | | * @return token |
| | | */ |
| | | private String getToken(String appid, String secret) throws IOException { |
| | | // access_token接口https请求方式: GET |
| | | // https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET |
| | | String path = " https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential"; |
| | | URL url = new URL(path + "&appid=" + appid + "&secret=" + secret); |
| | | HttpURLConnection connection = (HttpURLConnection)url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | connection.connect(); |
| | | |
| | | InputStream in = connection.getInputStream(); |
| | | byte[] b = new byte[100]; |
| | | int len = -1; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((len = in.read(b)) != -1) { |
| | | sb.append(new String(b, 0, len)); |
| | | } |
| | | |
| | | // System.out.println(sb.toString()); |
| | | in.close(); |
| | | return sb.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 通过token获取公众号文章 |
| | | * |
| | | * @param token |
| | | * token |
| | | * @return 获取的文章列表结果 |
| | | */ |
| | | private String getContentList(String token) throws IOException { |
| | | String path = " https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=" + token; |
| | | URL url = new URL(path); |
| | | HttpURLConnection connection = (HttpURLConnection)url.openConnection(); |
| | | connection.setRequestMethod("POST"); |
| | | connection.setDoOutput(true); |
| | | connection.setRequestProperty("content-type", "application/json;charset=utf-8"); |
| | | connection.connect(); |
| | | // post发送的参数 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("type", "news"); // news表示图文类型的素材,具体看API文档 |
| | | map.put("offset", 0); |
| | | map.put("count", 5); |
| | | // 将map转换成json字符串 |
| | | String paramBody = JSON.toJSONString(map); // 这里用了Alibaba的fastjson |
| | | |
| | | OutputStream out = connection.getOutputStream(); |
| | | BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8)); |
| | | bw.write(paramBody); // 向流中写入参数字符串 |
| | | bw.flush(); |
| | | |
| | | InputStream in = connection.getInputStream(); |
| | | byte[] b = new byte[100]; |
| | | int len = -1; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((len = in.read(b)) != -1) { |
| | | sb.append(new String(b, 0, len, StandardCharsets.UTF_8)); |
| | | } |
| | | |
| | | in.close(); |
| | | return sb.toString(); |
| | | } |
| | | |
| | | @ApiOperation(value = "拉取公众号列表") |
| | | @GetMapping(value = "/list/noToken",produces="application/json;charset=utf-8") |
| | | public R pageDiscuss() throws Exception{ |
| | | @GetMapping(value = "/list/noToken", produces = "application/json;charset=utf-8") |
| | | public R pageDiscuss() throws Exception { |
| | | WxOfficialApi officialApi = new WxOfficialApi(); |
| | | |
| | | List<String> tokenList = new ArrayList<>(); |
| | | if(!appidList.isEmpty()){ |
| | | if (!appidList.isEmpty()) { |
| | | for (int i = 0; i < appidList.size(); i++) { |
| | | String token = officialApi.getToken(appidList.get(i),secretList.get(i)); |
| | | log.info("通过appid:"+appidList.get(i)+"获取token返回参数:" + token); |
| | | String token = officialApi.getToken(appidList.get(i), secretList.get(i)); |
| | | log.info("通过appid:" + appidList.get(i) + "获取token返回参数:" + token); |
| | | JSONObject tokenJson = JSON.parseObject(token); |
| | | if(StringUtils.isNotEmpty(tokenJson)){ |
| | | if (StringUtils.isNotEmpty(tokenJson)) { |
| | | tokenList.add(tokenJson.getString("access_token")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<JSONObject> resultList = new ArrayList<>(); |
| | | if(!tokenList.isEmpty()){ |
| | | if (!tokenList.isEmpty()) { |
| | | tokenList.forEach(token -> { |
| | | try { |
| | | String url = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=" + token; |
| | | String result = getActicle(url); |
| | | // log.info("通过token获取文章列表成功,返回结果:" + result); |
| | | // log.info("通过token获取文章列表成功,返回结果:" + result); |
| | | |
| | | JSONObject resultJson = JSON.parseObject(result); |
| | | if(resultJson != null){ |
| | | List<JSONObject> itemList = JSON.parseArray(resultJson.getString("item"),JSONObject.class); |
| | | if(!itemList.isEmpty()){ |
| | | if (resultJson != null) { |
| | | List<JSONObject> itemList = JSON.parseArray(resultJson.getString("item"), JSONObject.class); |
| | | if (!itemList.isEmpty()) { |
| | | for (JSONObject object : itemList) { |
| | | String newsId = object.getString("media_id"); |
| | | JSONObject contentJson = JSON.parseObject(object.getString("content")); |
| | | List<JSONObject> newsItemList = JSON.parseArray(contentJson.getString("news_item"),JSONObject.class); |
| | | List<JSONObject> newsItemList = |
| | | 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); |
| | | 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); |
| | | } |
| | | } |
| | | resultJson.put("item",itemList); |
| | | resultJson.put("item", itemList); |
| | | } |
| | | resultList.add(resultJson); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | log.error("通过token获取文章列表失败,错误原因:" + e.getMessage()); |
| | | } |
| | | }); |
| | |
| | | |
| | | @ApiOperation(value = "获取公众号文章链接") |
| | | @GetMapping(value = "/get/noToken") |
| | | public R getDiscuss(@RequestParam("mediaId") String mediaId){ |
| | | public R getDiscuss(@RequestParam("mediaId") String mediaId) { |
| | | |
| | | String key = UserConstants.NEWS_ID + mediaId; |
| | | Boolean hasKey = stringRedisTemplate.hasKey(key); |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | |
| | | public class SwaggerConfig { |
| | | @Bean |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | .apis(RequestHandlerSelectors.basePackage("com.panzhihua")) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | .apis(RequestHandlerSelectors.basePackage("com.panzhihua")).paths(PathSelectors.any()).build(); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("攀枝花小程序开发文档") |
| | | .description("。") |
| | | .contact(new Contact("huanghongfa", "", "")) |
| | | .version("1.0") |
| | | .build(); |
| | | return new ApiInfoBuilder().title("攀枝花小程序开发文档").description("。").contact(new Contact("huanghongfa", "", "")) |
| | | .version("1.0").build(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; |
| | | import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private WxMaProperties properties; |
| | | |
| | | public WxMaService getMaService() { |
| | | public WxMaService getMaService() { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | config.setAppid(properties.getAppid()); |
| | | config.setSecret(properties.getSecret()); |
| | |
| | | package com.panzhihua.applets.config; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 微信配置 |
| | |
| | | package com.panzhihua.applets.model.dtos; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 党员认证 |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "入党时间") |
| | | private Date joinTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "转正时间") |
| | | private Date employmentTime; |
| | | @ApiModelProperty(value = "所属党组织id") |
| | |
| | | @ApiModel(value = "小程序登录") |
| | | public class LoginRequest { |
| | | |
| | | @ApiModelProperty(name = "code",value = "登录时获取的 code") |
| | | @ApiModelProperty(name = "code", value = "登录时获取的 code") |
| | | String code; |
| | | |
| | | @ApiModelProperty(name = "signature",value = "使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息") |
| | | @ApiModelProperty(name = "signature", value = "使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息") |
| | | String signature; |
| | | |
| | | @ApiModelProperty(name = "rawData",value = "不包括敏感信息的原始数据字符串,用于计算签名") |
| | | @ApiModelProperty(name = "rawData", value = "不包括敏感信息的原始数据字符串,用于计算签名") |
| | | String rawData; |
| | | |
| | | @ApiModelProperty(name = "encryptedData",value = "包括敏感数据在内的完整用户信息的加密数据") |
| | | @ApiModelProperty(name = "encryptedData", value = "包括敏感数据在内的完整用户信息的加密数据") |
| | | String encryptedData; |
| | | |
| | | @ApiModelProperty(name = "iv",value = "加密算法的初始向量") |
| | | @ApiModelProperty(name = "iv", value = "加密算法的初始向量") |
| | | String iv; |
| | | |
| | | @ApiModelProperty(name = "userInfo",value = "用户基本信息") |
| | | @ApiModelProperty(name = "userInfo", value = "用户基本信息") |
| | | WxMaUserInfo userInfo; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets.weixin; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.applets.config.WxMaConfiguration; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaSecCheckService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | |
| | | public boolean checkMessage(String msg){ |
| | | WxMaSecCheckService wxMaSecCheckService=wxMaConfiguration.getMaService().getSecCheckService(); |
| | | public boolean checkMessage(String msg) { |
| | | WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | try { |
| | | boolean b = wxMaSecCheckService.checkMessage(msg); |
| | | return b; |
| | | } catch (WxErrorException e) { |
| | | log.error("微信审核文字内容出错【{}】",e.getMessage()); |
| | | log.error("微信审核文字内容出错【{}】", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.ComponentScans; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | @EnableSwagger2 |
| | |
| | | @EnableEurekaClient |
| | | @EnableFeignClients(basePackages = {"com.panzhihua.common.service"}) |
| | | @EnableAspectJAutoProxy(proxyTargetClass = true) |
| | | @ComponentScan({"com.panzhihua.applets_backstage","com.panzhihua.common"}) |
| | | @ComponentScan({"com.panzhihua.applets_backstage", "com.panzhihua.common"}) |
| | | public class AppletsBackstageApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | package com.panzhihua.applets_backstage.aop; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.user.SysOperLogVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import com.panzhihua.common.utlis.IPUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.AfterReturning; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | |
| | | import org.springframework.web.context.request.RequestAttributes; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.user.SysOperLogVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import com.panzhihua.common.utlis.IPUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * 切面处理类,操作日志异常日志记录处理 |
| | |
| | | * 设置操作日志切入点 记录操作日志 在注解的位置切入代码 |
| | | */ |
| | | @Pointcut("@annotation(com.panzhihua.common.interfaces.OperLog)") |
| | | public void operLogPoinCut() { |
| | | } |
| | | public void operLogPoinCut() {} |
| | | |
| | | // /** |
| | | // * 设置操作异常切入点记录异常日志 扫描所有controller包下操作 |
| | | // */ |
| | | // @Pointcut("execution(* com.hyd.zcar.cms.controller..*.*(..))") |
| | | // public void operExceptionLogPoinCut() { |
| | | // } |
| | | // /** |
| | | // * 设置操作异常切入点记录异常日志 扫描所有controller包下操作 |
| | | // */ |
| | | // @Pointcut("execution(* com.hyd.zcar.cms.controller..*.*(..))") |
| | | // public void operExceptionLogPoinCut() { |
| | | // } |
| | | |
| | | /** |
| | | * 正常返回通知,拦截用户操作日志,连接点正常执行完成后执行, 如果连接点抛出异常,则不会执行 |
| | | * |
| | | * @param joinPoint 切入点 |
| | | * @param keys 返回结果 |
| | | * @param joinPoint |
| | | * 切入点 |
| | | * @param keys |
| | | * 返回结果 |
| | | */ |
| | | @AfterReturning(value = "operLogPoinCut()", returning = "keys") |
| | | public void saveOperLog(JoinPoint joinPoint, Object keys) { |
| | |
| | | // 获取RequestAttributes |
| | | RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | HttpServletRequest request = (HttpServletRequest) requestAttributes |
| | | .resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // 登录对象信息 |
| | | HttpServletRequest request = |
| | | (HttpServletRequest)requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // 登录对象信息 |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("操作日志获取登录用户信息失败【{}】",joinPoint); |
| | | log.error("操作日志获取登录用户信息失败【{}】", joinPoint); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo=new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO= JSONObject.parseObject(userInfo,LoginUserInfoVO.class); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | |
| | | SysOperLogVO operlog = new SysOperLogVO(); |
| | | try { |
| | | |
| | | // 从切面织入点处通过反射机制获取织入点处的方法 |
| | | MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
| | | MethodSignature signature = (MethodSignature)joinPoint.getSignature(); |
| | | // 获取切入点所在的方法 |
| | | Method method = signature.getMethod(); |
| | | // 获取操作 |
| | |
| | | operlog.setOperTime(new Date()); // 创建时间 |
| | | operlog.setAccount(loginUserInfoVO.getAccount()); |
| | | Long communityId = loginUserInfoVO.getCommunityId(); |
| | | operlog.setCommunityId(null==communityId?0:communityId); |
| | | operlog.setCommunityId(null == communityId ? 0 : communityId); |
| | | userService.addOperLog(operlog); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // /** |
| | | // * 异常返回通知,用于拦截异常日志信息 连接点抛出异常后执行 |
| | | // * |
| | | // * @param joinPoint 切入点 |
| | | // * @param e 异常信息 |
| | | // */ |
| | | // @AfterThrowing(pointcut = "operExceptionLogPoinCut()", throwing = "e") |
| | | // public void saveExceptionLog(JoinPoint joinPoint, Throwable e) { |
| | | // // 获取RequestAttributes |
| | | // RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | // HttpServletRequest request = (HttpServletRequest) requestAttributes |
| | | // .resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // |
| | | // ExceptionLog excepLog = new ExceptionLog(); |
| | | // try { |
| | | // // 从切面织入点处通过反射机制获取织入点处的方法 |
| | | // MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
| | | // // 获取切入点所在的方法 |
| | | // Method method = signature.getMethod(); |
| | | // excepLog.setExcId(UuidUtil.get32UUID()); |
| | | // // 获取请求的类名 |
| | | // String className = joinPoint.getTarget().getClass().getName(); |
| | | // // 获取请求的方法名 |
| | | // String methodName = method.getName(); |
| | | // methodName = className + "." + methodName; |
| | | // // 请求的参数 |
| | | // Map<String, String> rtnMap = converMap(request.getParameterMap()); |
| | | // // 将参数所在的数组转换成json |
| | | // String params = JSON.toJSONString(rtnMap); |
| | | // excepLog.setExcRequParam(params); // 请求参数 |
| | | // excepLog.setOperMethod(methodName); // 请求方法名 |
| | | // excepLog.setExcName(e.getClass().getName()); // 异常名称 |
| | | // excepLog.setExcMessage(stackTraceToString(e.getClass().getName(), e.getMessage(), e.getStackTrace())); // 异常信息 |
| | | // excepLog.setOperUserId(UserShiroUtil.getCurrentUserLoginName()); // 操作员ID |
| | | // excepLog.setOperUserName(UserShiroUtil.getCurrentUserName()); // 操作员名称 |
| | | // excepLog.setOperUri(request.getRequestURI()); // 操作URI |
| | | // excepLog.setOperIp(IPUtil.getRemortIP(request)); // 操作员IP |
| | | // excepLog.setOperVer(operVer); // 操作版本号 |
| | | // excepLog.setOperCreateTime(new Date()); // 发生异常时间 |
| | | // |
| | | // exceptionLogService.insert(excepLog); |
| | | // |
| | | // } catch (Exception e2) { |
| | | // e2.printStackTrace(); |
| | | // } |
| | | // |
| | | // } |
| | | // /** |
| | | // * 异常返回通知,用于拦截异常日志信息 连接点抛出异常后执行 |
| | | // * |
| | | // * @param joinPoint 切入点 |
| | | // * @param e 异常信息 |
| | | // */ |
| | | // @AfterThrowing(pointcut = "operExceptionLogPoinCut()", throwing = "e") |
| | | // public void saveExceptionLog(JoinPoint joinPoint, Throwable e) { |
| | | // // 获取RequestAttributes |
| | | // RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | // HttpServletRequest request = (HttpServletRequest) requestAttributes |
| | | // .resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // |
| | | // ExceptionLog excepLog = new ExceptionLog(); |
| | | // try { |
| | | // // 从切面织入点处通过反射机制获取织入点处的方法 |
| | | // MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
| | | // // 获取切入点所在的方法 |
| | | // Method method = signature.getMethod(); |
| | | // excepLog.setExcId(UuidUtil.get32UUID()); |
| | | // // 获取请求的类名 |
| | | // String className = joinPoint.getTarget().getClass().getName(); |
| | | // // 获取请求的方法名 |
| | | // String methodName = method.getName(); |
| | | // methodName = className + "." + methodName; |
| | | // // 请求的参数 |
| | | // Map<String, String> rtnMap = converMap(request.getParameterMap()); |
| | | // // 将参数所在的数组转换成json |
| | | // String params = JSON.toJSONString(rtnMap); |
| | | // excepLog.setExcRequParam(params); // 请求参数 |
| | | // excepLog.setOperMethod(methodName); // 请求方法名 |
| | | // excepLog.setExcName(e.getClass().getName()); // 异常名称 |
| | | // excepLog.setExcMessage(stackTraceToString(e.getClass().getName(), e.getMessage(), e.getStackTrace())); // 异常信息 |
| | | // excepLog.setOperUserId(UserShiroUtil.getCurrentUserLoginName()); // 操作员ID |
| | | // excepLog.setOperUserName(UserShiroUtil.getCurrentUserName()); // 操作员名称 |
| | | // excepLog.setOperUri(request.getRequestURI()); // 操作URI |
| | | // excepLog.setOperIp(IPUtil.getRemortIP(request)); // 操作员IP |
| | | // excepLog.setOperVer(operVer); // 操作版本号 |
| | | // excepLog.setOperCreateTime(new Date()); // 发生异常时间 |
| | | // |
| | | // exceptionLogService.insert(excepLog); |
| | | // |
| | | // } catch (Exception e2) { |
| | | // e2.printStackTrace(); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * 转换request 请求参数 |
| | | * |
| | | * @param paramMap request获取的参数数组 |
| | | * @param paramMap |
| | | * request获取的参数数组 |
| | | */ |
| | | public Map<String, String> converMap(Map<String, String[]> paramMap) { |
| | | Map<String, String> rtnMap = new HashMap<String, String>(); |
| | |
| | | return rtnMap; |
| | | } |
| | | |
| | | private String getPostData(HttpServletRequest request) { |
| | | private String getPostData(HttpServletRequest request) { |
| | | StringBuffer data = new StringBuffer(); |
| | | String line = null; |
| | | BufferedReader reader = null; |
| | |
| | | /** |
| | | * 转换异常信息为字符串 |
| | | * |
| | | * @param exceptionName 异常名称 |
| | | * @param exceptionMessage 异常信息 |
| | | * @param elements 堆栈信息 |
| | | * @param exceptionName |
| | | * 异常名称 |
| | | * @param exceptionMessage |
| | | * 异常信息 |
| | | * @param elements |
| | | * 堆栈信息 |
| | | */ |
| | | public String stackTraceToString(String exceptionName, String exceptionMessage, StackTraceElement[] elements) { |
| | | StringBuffer strbuff = new StringBuffer(); |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; |
| | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @ApiOperation("新增广告") |
| | | @PostMapping("advertisement") |
| | | @OperLog(operModul = "广告管理",operType = 1) |
| | | public R addAdvertisement(@RequestBody @Validated(AddGroup.class) ComOpsAdvDTO comOpsAdvDTO){ |
| | | @OperLog(operModul = "广告管理", operType = 1) |
| | | public R addAdvertisement(@RequestBody @Validated(AddGroup.class) ComOpsAdvDTO comOpsAdvDTO) { |
| | | Integer linkType = comOpsAdvDTO.getLinkType(); |
| | | if (linkType.intValue()==1) { |
| | | if (linkType.intValue() == 1) { |
| | | Long jumpId = comOpsAdvDTO.getJumpId(); |
| | | if (null==jumpId||0==jumpId.intValue()) { |
| | | if (null == jumpId || 0 == jumpId.intValue()) { |
| | | return R.fail("跳转内容不能为空"); |
| | | } |
| | | } else { |
| | |
| | | |
| | | @ApiOperation("编辑广告") |
| | | @PutMapping("advertisement") |
| | | @OperLog(operModul = "广告管理",operType = 2) |
| | | public R putAdvertisement(@RequestBody ComOpsAdvDTO comOpsAdvDTO){ |
| | | @OperLog(operModul = "广告管理", operType = 2) |
| | | public R putAdvertisement(@RequestBody ComOpsAdvDTO comOpsAdvDTO) { |
| | | Long posId = comOpsAdvDTO.getPosId(); |
| | | if (null!=posId&&posId==0) { |
| | | if (null != posId && posId == 0) { |
| | | comOpsAdvDTO.setPosId(null); |
| | | } |
| | | Long id = comOpsAdvDTO.getId(); |
| | | if (null==id||id.intValue()==0) { |
| | | if (null == id || id.intValue() == 0) { |
| | | return R.fail("广告主键不能为空"); |
| | | } |
| | | Integer linkType = comOpsAdvDTO.getLinkType(); |
| | | if (linkType.intValue()==1) { |
| | | if (linkType.intValue() == 1) { |
| | | Long jumpId = comOpsAdvDTO.getJumpId(); |
| | | if (null==jumpId||0==jumpId.intValue()) { |
| | | if (null == jumpId || 0 == jumpId.intValue()) { |
| | | return R.fail("跳转内容不能为空"); |
| | | } |
| | | } else { |
| | |
| | | return communityService.putAdvertisement(comOpsAdvDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告位置下拉列表",response = ComOpsAdvPosVO.class) |
| | | @ApiOperation(value = "广告位置下拉列表", response = ComOpsAdvPosVO.class) |
| | | @GetMapping("listadvpos") |
| | | public R listadvpos(){ |
| | | public R listadvpos() { |
| | | return communityService.listAdvpos(); |
| | | } |
| | | |
| | | @ApiOperation(value = "跳转内容下拉列表",response = ComOpsAdvJumpVO.class) |
| | | @ApiOperation(value = "跳转内容下拉列表", response = ComOpsAdvJumpVO.class) |
| | | @GetMapping("listadvjump") |
| | | public R listadvjump(){ |
| | | public R listadvjump() { |
| | | return communityService.listAdvjump(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询广告",response = ComOpsAdvVO.class) |
| | | @ApiOperation(value = "分页查询广告", response = ComOpsAdvVO.class) |
| | | @PostMapping("pageadvertisement") |
| | | public R pageAdvertisement(@RequestBody PageComOpsAdvDTO pageComOpsAdvDTO){ |
| | | public R pageAdvertisement(@RequestBody PageComOpsAdvDTO pageComOpsAdvDTO) { |
| | | return communityService.pageAdvertisement(pageComOpsAdvDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告详情",response = ComOpsAdvVO.class) |
| | | @ApiOperation(value = "广告详情", response = ComOpsAdvVO.class) |
| | | @GetMapping("advertisement") |
| | | public R detailAdvertisement(@RequestParam("id") Long id){ |
| | | public R detailAdvertisement(@RequestParam("id") Long id) { |
| | | return communityService.detailAdvertisement(id); |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String name = file.getOriginalFilename(); |
| | | name= UUID.randomUUID().toString().replaceAll("-","")+".jpg"; |
| | | name = UUID.randomUUID().toString().replaceAll("-", "") + ".jpg"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除广告") |
| | | @DeleteMapping("advertisement") |
| | | public R deleteAdvertisement(@RequestParam("id") Long id){ |
| | | public R deleteAdvertisement(@RequestParam("id") Long id) { |
| | | return communityService.deleteAdvertisement(id); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComMngCarSaveDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngCarVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @description: 社区管理基础数据库管理接口 |
| | |
| | | private CommunityService communityService; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl="http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | private String excelConvenientUrl = "http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @ApiOperation(value = "分页查询车辆管理列表",response = ComMngCarVO.class) |
| | | @ApiOperation(value = "分页查询车辆管理列表", response = ComMngCarVO.class) |
| | | @PostMapping("/car/page") |
| | | public R pageQueryComMngCar(@RequestBody PageComMngCarDTO pageComMngCarDTO) { |
| | | return communityService.pageQueryComMngCar(pageComMngCarDTO); |
| | |
| | | return communityService.deleteComMngCar(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取树结构区域信息") |
| | | @GetMapping(value = "arealist") |
| | | public R getAllArea(@ApiParam(name = "省份:四川510000", required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode ) { |
| | | public R getAllArea(@ApiParam(name = "省份:四川510000", |
| | | required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | return communityService.getCityTreeByProvinceCode(provinceAdcode); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | return communityService.pageArea(comMngStructAreaVO); |
| | | } |
| | | |
| | | // /** |
| | | // * 攀枝花地址json |
| | | // */ |
| | | // private String panzhihuajson="[{\"district_name\":\"仁和区\",\"city_adcode\":510400,\"district_adcode\":510411,\"province_id\":23,\"id\":2004,\"province_adcode\":510000,\"city_id\":256},{\"district_name\":\"米易县\",\"city_adcode\":510400,\"district_adcode\":510421,\"province_id\":23,\"id\":2005,\"province_adcode\":510000,\"city_id\":256},{\"district_name\":\"盐边县\",\"city_adcode\":510400,\"district_adcode\":510422,\"province_id\":23,\"id\":2006,\"province_adcode\":510000,\"city_id\":256}]"; |
| | | // /** |
| | | // * 攀枝花地址json |
| | | // */ |
| | | // private String |
| | | // panzhihuajson="[{\"district_name\":\"仁和区\",\"city_adcode\":510400,\"district_adcode\":510411,\"province_id\":23,\"id\":2004,\"province_adcode\":510000,\"city_id\":256},{\"district_name\":\"米易县\",\"city_adcode\":510400,\"district_adcode\":510421,\"province_id\":23,\"id\":2005,\"province_adcode\":510000,\"city_id\":256},{\"district_name\":\"盐边县\",\"city_adcode\":510400,\"district_adcode\":510422,\"province_id\":23,\"id\":2006,\"province_adcode\":510000,\"city_id\":256}]"; |
| | | |
| | | @ApiOperation(value = "新增社区", response = ComActVO.class) |
| | | @PostMapping("community") |
| | |
| | | public R detailCommunity(@RequestParam("id") Long id) { |
| | | return communityService.detailCommunity(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | 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; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.jcraft.jsch.SftpException; |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @description: 社区便民服务商家接口 |
| | |
| | | private CommunityService communityService; |
| | | |
| | | @Value("${excel.convenientUrl}") |
| | | private String excelConvenientUrl="http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | private String excelConvenientUrl = "http://panzhihua.nhys.cdnhxx.com/web/bianminfuwudaoru.xlsx"; |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @ApiOperation(value = "分页查询便民服务商家",response = ComCvtBusinessVO.class) |
| | | @ApiOperation(value = "分页查询便民服务商家", response = ComCvtBusinessVO.class) |
| | | @PostMapping("/business/page") |
| | | public R pageComCvtBusiness(@RequestBody PageComCvtBusinessDTO pageComCvtBusinessDTO) { |
| | | return communityService.pageComCvtBusiness(pageComCvtBusinessDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "新增便民服务商家") |
| | | @PostMapping("/business/add") |
| | |
| | | return communityService.addComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表" ,response = ComActVO.class) |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("/community") |
| | | public R listCommunity(){ |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "编辑便民服务商家") |
| | | @PutMapping("/business/put") |
| | |
| | | return communityService.putComCvtBusiness(comCvtBusinessDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情") |
| | | @GetMapping("/business/get") |
| | | public R getComCvtBusiness(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtBusiness(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除便民服务商家详情") |
| | | @DeleteMapping("/business/delete") |
| | |
| | | return communityService.deleteComCvtBusiness(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询便民服务分类",response = ComCvtCategoryVO.class) |
| | | @ApiOperation(value = "分页查询便民服务分类", response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/page") |
| | | public R pageComCvtCategory(@RequestBody PageComCvtCategoryDTO pageComCvtCategoryDTO) { |
| | | return communityService.pageComCvtCategory(pageComCvtCategoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框",response = ComCvtCategoryVO.class) |
| | | @ApiOperation(value = "查询便民服务所有分类,下拉框", response = ComCvtCategoryVO.class) |
| | | @PostMapping("/category/all") |
| | | public R allComCvtCategory() { |
| | | return communityService.allComCvtCategory(); |
| | |
| | | return communityService.addComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "编辑便民服务分类") |
| | | @PutMapping("/category/put") |
| | | public R putComCvtCategory(@RequestBody ComCvtCategoryDTO comCvtCategoryDTO) { |
| | | return communityService.putComCvtCategory(comCvtCategoryDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询便民服务分类详情",response = ComCvtCategoryVO.class) |
| | | @ApiOperation(value = "查询便民服务分类详情", response = ComCvtCategoryVO.class) |
| | | @GetMapping("/category/get") |
| | | public R getComCvtCategory(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtCategory(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除便民服务分类信息") |
| | | @DeleteMapping("/category/delete") |
| | |
| | | return communityService.deleteComCvtCategory(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页查询便民服务",response = ComCvtServeVO.class) |
| | | @ApiOperation(value = "分页查询便民服务", response = ComCvtServeVO.class) |
| | | @PostMapping("/serve/page") |
| | | public R pageComCvtServe(@RequestBody PageComCvtServeDTO pageComCvtServeDTO) { |
| | | return communityService.pageComCvtServe(pageComCvtServeDTO); |
| | |
| | | return communityService.putComCvtServe(comCvtServeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务详情",response = ComCvtServeVO.class) |
| | | @ApiOperation(value = "查询便民服务详情", response = ComCvtServeVO.class) |
| | | @GetMapping("/serve/get") |
| | | public R getComCvtServe(@RequestParam("id") Long id) { |
| | | return communityService.getComCvtServe(id); |
| | |
| | | @PostMapping(value = "/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name= UUID.randomUUID().toString().replaceAll("-","")+"."+extension; |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName,password,host,port); |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | |
| | | @ApiOperation(value = "excel导入便民服务") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String fileName = file.getOriginalFilename(); //获取文件名 |
| | | log.info("传入文件名字【{}】",fileName); |
| | | String fileName = file.getOriginalFilename(); // 获取文件名 |
| | | log.info("传入文件名字【{}】", fileName); |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService,null)) |
| | | .sheet().doRead(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService, null)) |
| | | .sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoClassifyDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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 |
| | | @Api(tags = {"随手拍分类"}) |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComOpsHouseVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | return communityService.addOpsHouse(comOpsHouseDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "房屋租售-详情",response = ComOpsHouseVO.class) |
| | | @ApiOperation(value = "房屋租售-详情", response = ComOpsHouseVO.class) |
| | | @GetMapping("house") |
| | | public R detailHouse(@RequestParam("id") Long id) { |
| | | return communityService.detailOpsHouse(id); |
| | |
| | | return communityService.deleteOpsHouse(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "房屋租售-分页查询",response = ComOpsHouseVO.class) |
| | | @ApiOperation(value = "房屋租售-分页查询", response = ComOpsHouseVO.class) |
| | | @PostMapping("pagehouse") |
| | | public R pageHouse(@RequestBody PageComOpsHouseDTO pageComOpsHouseDTO) { |
| | | return communityService.pageOpsHouse(pageComOpsHouseDTO); |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.panzhihua.common.model.vos.IndexDataKanbanVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.IndexDataKanbanVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "数据看板",response = IndexDataKanbanVO.class) |
| | | @ApiOperation(value = "数据看板", response = IndexDataKanbanVO.class) |
| | | @GetMapping("datakanban") |
| | | public R dataKanban(){ |
| | | public R dataKanban() { |
| | | return userService.dataKanban(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.applets_backstage.model.vos.LoginBody; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.auth.TokenService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | @ApiOperation(value = "登录") |
| | | @PostMapping("login") |
| | | public R login(@RequestBody LoginBody loginBody){ |
| | | public R login(@RequestBody LoginBody loginBody) { |
| | | String account = loginBody.getAccount(); |
| | | String password = loginBody.getPassword(); |
| | | boolean empty = ObjectUtils.isEmpty(account); |
| | | boolean empty1 = ObjectUtils.isEmpty(password); |
| | | if (empty||empty1) { |
| | | if (empty || empty1) { |
| | | return R.fail("账户密码不能为空"); |
| | | } |
| | | log.info("登录用户信息【{}】",loginBody); |
| | | return tokenService.loginAppletsBackStage(account,password); |
| | | log.info("登录用户信息【{}】", loginBody); |
| | | return tokenService.loginAppletsBackStage(account, password); |
| | | } |
| | | |
| | | @ApiOperation(value = "登出") |
| | | @PostMapping("logout") |
| | | public R login(){ |
| | | public R login() { |
| | | String token = this.getToken(); |
| | | if (ObjectUtils.isEmpty(token)) { |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "刷新token") |
| | | @GetMapping("refreshToken") |
| | | @ApiImplicitParam(name ="refreshToken",value = "登录返回的刷新token") |
| | | public R refreshToken(@RequestParam("refreshToken")String refreshToken){ |
| | | @ApiImplicitParam(name = "refreshToken", value = "登录返回的刷新token") |
| | | public R refreshToken(@RequestParam("refreshToken") String refreshToken) { |
| | | return tokenService.refreshToken(refreshToken); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.model.vos.user.ChangePasswordVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @auther llming |
| | |
| | | return R.fail(); |
| | | } |
| | | storeVO.setLoginUserId(loginUserId); |
| | | //查询该手机号是否已注册到平台 |
| | | // 查询该手机号是否已注册到平台 |
| | | R isAddStore = communityService.addStore(storeVO); |
| | | if(isAddStore.getCode() != 200){ |
| | | if (isAddStore.getCode() != 200) { |
| | | return isAddStore; |
| | | } |
| | | R isAddSysUser = userService.addSysUser(storeVO); |
| | | if(isAddSysUser.getCode() != 200){ |
| | | if (isAddSysUser.getCode() != 200) { |
| | | return isAddSysUser; |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | // @ApiOperation(value = "编辑商家、启用、禁用") |
| | | // @ApiOperation(value = "编辑商家、启用、禁用") |
| | | @PostMapping("/storebak/edit/{id}") |
| | | // @ApiImplicitParam(name = "id", value = "商家id") |
| | | // @ApiImplicitParam(name = "id", value = "商家id") |
| | | public R editStoreBak(@Valid @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) { |
| | | R<LoginUserInfoVO> sysUserVO = userService.getSysUserVOByAccountAndType(storeVO.getStoreAccount(),5); |
| | | R<LoginUserInfoVO> sysUserVO = userService.getSysUserVOByAccountAndType(storeVO.getStoreAccount(), 5); |
| | | if (sysUserVO.getData() == null) { |
| | | return R.fail("没有相关的用户!"); |
| | | } |
| | | |
| | | LoginUserInfoVO user = JSON.parseObject(JSON.toJSONString(sysUserVO.getData())).toJavaObject(LoginUserInfoVO.class); |
| | | LoginUserInfoVO user = |
| | | JSON.parseObject(JSON.toJSONString(sysUserVO.getData())).toJavaObject(LoginUserInfoVO.class); |
| | | storeVO.setSysUserId(user.getUserId()); |
| | | R<ShopStoreVO> storeInfoVO = communityService.getStoreInfo(id); |
| | | if (storeInfoVO.getCode() == 500) { |
| | | return R.fail(storeInfoVO.getMsg()); |
| | | } |
| | | //维护sys_user |
| | | ShopStoreVO shopStoreVO = JSON.parseObject(JSON.toJSONString(storeInfoVO.getData())).toJavaObject(ShopStoreVO.class); |
| | | // 维护sys_user |
| | | ShopStoreVO shopStoreVO = |
| | | JSON.parseObject(JSON.toJSONString(storeInfoVO.getData())).toJavaObject(ShopStoreVO.class); |
| | | ChangePasswordVO changePasswordVO = new ChangePasswordVO(); |
| | | changePasswordVO.setOldPassword(shopStoreVO.getStorePassword()); |
| | | changePasswordVO.setUserId(user.getUserId()); |
| | | changePasswordVO.setNewPassword(storeVO.getStorePassword()); |
| | | R r = userService.changePassword(changePasswordVO); |
| | | if (R.isOk(r)||r.getMsg().equals("新密码与原密码不能相同")){ |
| | | if (R.isOk(r) || r.getMsg().equals("新密码与原密码不能相同")) { |
| | | return communityService.editStore(storeVO, id); |
| | | } |
| | | return R.fail(); |
| | |
| | | @PostMapping("/store/edit/{id}") |
| | | @ApiImplicitParam(name = "id", value = "商家id") |
| | | public R editStore(@Validated @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) { |
| | | //判断参数 |
| | | if(storeVO == null || id == null){ |
| | | // 判断参数 |
| | | if (storeVO == null || id == null) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | storeVO.setId(id); |
| | | //修改店铺信息 |
| | | // 修改店铺信息 |
| | | R editStore = communityService.editStore(storeVO, id); |
| | | if(editStore == null || editStore.getCode() != Constants.SUCCESS){ |
| | | if (editStore == null || editStore.getCode() != Constants.SUCCESS) { |
| | | return editStore; |
| | | } |
| | | //修改SysUser信息 |
| | | // 修改SysUser信息 |
| | | R editUser = userService.editSysUser(storeVO); |
| | | if(editUser == null || editUser.getCode() != Constants.SUCCESS){ |
| | | if (editUser == null || editUser.getCode() != Constants.SUCCESS) { |
| | | return editUser; |
| | | } |
| | | return R.ok(); |
| | |
| | | return communityService.saveShopGoods(addShopGoodsVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "编辑商品") |
| | | @PostMapping("/goods/edit/{id}") |
| | | R editShopGoods(@PathVariable("id") Long id, @RequestBody @Validated(AddGroup.class) AddShopGoodsVO addShopGoodsVO) { |
| | | R editShopGoods(@PathVariable("id") Long id, |
| | | @RequestBody @Validated(AddGroup.class) AddShopGoodsVO addShopGoodsVO) { |
| | | return communityService.editShopGoods(id, addShopGoodsVO); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "商品上下架") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"), |
| | | @ApiImplicitParam(name = "status", value = "1.上架 2.下架 ")}) |
| | | @ApiImplicitParam(name = "status", value = "1.上架 2.下架 ")}) |
| | | @GetMapping("/goods/changeStatus") |
| | | R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) { |
| | | return communityService.changeStatus(id, status); |
| | |
| | | @ApiOperation(value = "订单_分页列表", response = ComShopOrderSearchVO.class) |
| | | @PostMapping("/order/page") |
| | | public R page(@RequestBody @Validated PageComShopOrderSearchDTO pageComShopOrderSearchDTO) { |
| | | //pageComShopOrderSearchDTO.setUserId(this.getUserId()); |
| | | // pageComShopOrderSearchDTO.setUserId(this.getUserId()); |
| | | ClazzUtils.setIfStringIsEmpty(pageComShopOrderSearchDTO); |
| | | return communityService.pageShopOrder(pageComShopOrderSearchDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "订单_详细", response = ComShopOrderPageVO.class) |
| | | @GetMapping("/order/detail") |
| | |
| | | ClazzUtils.setIfStringIsEmpty(comShopOrderExportDTO); |
| | | String url = excelUrl; |
| | | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| | | //String name=uuid+".xlsx"; |
| | | // String name=uuid+".xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | |
| | | R r = communityService.shopOrderExportData(comShopOrderExportDTO); |
| | | if (R.isOk(r)) { |
| | | List<ExcelShopOrderDTO> excelShopOrderDTO = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopOrderDTO.class); |
| | | List<ExcelShopOrderDTO> excelShopOrderDTO = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopOrderDTO.class); |
| | | if (excelShopOrderDTO == null || excelShopOrderDTO.size() == 0) { |
| | | return R.ok("未找到数据"); |
| | | } |
| | |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ExcelShopOrderDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | excelWriter = EasyExcel.write(fileName, ExcelShopOrderDTO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("订单").build(); |
| | | excelWriter.write(excelShopOrderDTO, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | return communityService.capitalDetailByStore(orderId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "资金_导出表格") |
| | | @PostMapping("/capital/export") |
| | | @ShopOperLog(operType = 12) |
| | |
| | | ClazzUtils.setIfStringIsEmpty(comShopFundsExportDTO); |
| | | String url = excelUrl; |
| | | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| | | //String name=uuid+".xlsx"; |
| | | // String name=uuid+".xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | |
| | | Long userId = this.getUserId(); |
| | | comShopFundsExportDTO.setUserId(userId); |
| | | R r = communityService.shopOrderFundsExportData(comShopFundsExportDTO); |
| | | if (R.isOk(r)) { |
| | | List<ExcelShopFundsDTO> excelShopFundsDTO = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopFundsDTO.class); |
| | | List<ExcelShopFundsDTO> excelShopFundsDTO = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopFundsDTO.class); |
| | | if (excelShopFundsDTO == null || excelShopFundsDTO.size() == 0) { |
| | | return R.ok("未找到数据"); |
| | | } |
| | |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ExcelShopFundsDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | excelWriter = EasyExcel.write(fileName, ExcelShopFundsDTO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("订单").build(); |
| | | excelWriter.write(excelShopFundsDTO, writeSheet); |
| | | excelWriter.finish(); |
| | |
| | | return R.fail("导出数据失败"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "商家配置修改") |
| | | @PutMapping("/shop/conf") |
| | | public R editConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO){ |
| | | public R editConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO) { |
| | | return communityService.editShopSysConf(comShopSysConfDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家配置查询", response = ComShopHiddenConfVO.class) |
| | | @GetMapping("/shop/conf") |
| | | public R getConf(){ |
| | | public R getConf() { |
| | | PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); |
| | | R r = communityService.pageShopSysConf(pageComShopSysConfDTO); |
| | | if(R.isOk(r) && r.getData()!=null){ |
| | | ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComShopSysConfVO.class); |
| | | if(comShopSysConfVO!=null){ |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | ComShopSysConfVO comShopSysConfVO = |
| | | JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComShopSysConfVO.class); |
| | | if (comShopSysConfVO != null) { |
| | | ComShopHiddenConfVO comShopHiddenConfVO = new ComShopHiddenConfVO(); |
| | | comShopHiddenConfVO.setId(comShopSysConfVO.getId()); |
| | | comShopHiddenConfVO.setHidden(comShopSysConfVO.getVal()); |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComStreetVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @description: 街道管理 |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO; |
| | |
| | | import com.panzhihua.common.model.vos.AppletesBackstageConfigVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.advertisement.ComOpsAdvJumpVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.service.HanyuPinyinHelper; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @ApiOperation(value = "新增运营后台账户") |
| | | @PostMapping("user") |
| | | @OperLog(operModul = "用户管理",operType = 1) |
| | | public R addUser(@RequestBody @Validated(AddGroup.class) AdministratorsUserVO administratorsUserVO){ |
| | | @OperLog(operModul = "用户管理", operType = 1) |
| | | public R addUser(@RequestBody @Validated(AddGroup.class) AdministratorsUserVO administratorsUserVO) { |
| | | administratorsUserVO.setType(2); |
| | | administratorsUserVO.setAreaId(null); |
| | | administratorsUserVO.setCommunityId(0l); |
| | |
| | | |
| | | @ApiOperation(value = "编辑运营后台账户") |
| | | @PutMapping("user") |
| | | @OperLog(operModul = "用户管理",operType = 2) |
| | | public R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO){ |
| | | @OperLog(operModul = "用户管理", operType = 2) |
| | | public R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | Long userId = administratorsUserVO.getUserId(); |
| | | if (null==userId||0==userId) { |
| | | if (null == userId || 0 == userId) { |
| | | return R.fail("用户主键不能为空"); |
| | | } |
| | | administratorsUserVO.setType(2); |
| | | administratorsUserVO.setAreaId(null); |
| | | administratorsUserVO.setCommunityId(0l); |
| | | Integer status = administratorsUserVO.getStatus(); |
| | | if (null!=status&&status.intValue()==0) { |
| | | if (null != status && status.intValue() == 0) { |
| | | administratorsUserVO.setStatus(null); |
| | | } |
| | | return userService.putUserBackstage(administratorsUserVO); |
| | |
| | | |
| | | @ApiOperation(value = "删除后台用户") |
| | | @DeleteMapping("user") |
| | | @OperLog(operModul = "用户管理",operType = 3) |
| | | public R deleteUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO){ |
| | | @OperLog(operModul = "用户管理", operType = 3) |
| | | public R deleteUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | Long userId = administratorsUserVO.getUserId(); |
| | | if (null==userId||0==userId) { |
| | | if (null == userId || 0 == userId) { |
| | | return R.fail("用户主键不能为空"); |
| | | } |
| | | administratorsUserVO.setCommunityId(0l); |
| | | return userService.deleteUserBackstage(administratorsUserVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "角色下拉列表",response = RoleVO.class) |
| | | @ApiOperation(value = "角色下拉列表", response = RoleVO.class) |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage(){ |
| | | Long communityId=0l; |
| | | public R listRoleBackstage() { |
| | | Long communityId = 0l; |
| | | return userService.listRoleBackstage(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户",response = AdministratorsUserVO.class) |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | | @PostMapping("pageuser") |
| | | public R pageUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO){ |
| | | public R pageUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { |
| | | administratorsUserVO.setCommunityId(0l); |
| | | return userService.pageUserBackstage(administratorsUserVO); |
| | | } |
| | | |
| | | // @ApiOperation(value = "新增角色") |
| | | // @PostMapping("role") |
| | | // @OperLog(operModul = "角色管理",operType = 1) |
| | | // public R addRoleBackstage(@RequestBody RoleVO roleVO){ |
| | | // String roleName = roleVO.getRoleName(); |
| | | // if (ObjectUtils.isEmpty(roleName)) { |
| | | // return R.fail("角色名字不能为空"); |
| | | // } |
| | | // roleVO.setCommunityId(0l); |
| | | // Long userId = this.getUserId(); |
| | | // roleVO.setCreateBy(userId); |
| | | // roleVO.setStatus(0); |
| | | // HanyuPinyinHelper hanyuPinyinHelper = new HanyuPinyinHelper() ; |
| | | // roleVO.setRoleKey(hanyuPinyinHelper.toHanyuPinyin(roleName)); |
| | | // return userService.addRoleBackstage(roleVO); |
| | | // } |
| | | |
| | | // @ApiOperation(value = "新增角色") |
| | | // @PostMapping("role") |
| | | // @OperLog(operModul = "角色管理",operType = 1) |
| | | // public R addRoleBackstage(@RequestBody RoleVO roleVO){ |
| | | // String roleName = roleVO.getRoleName(); |
| | | // if (ObjectUtils.isEmpty(roleName)) { |
| | | // return R.fail("角色名字不能为空"); |
| | | // } |
| | | // roleVO.setCommunityId(0l); |
| | | // Long userId = this.getUserId(); |
| | | // roleVO.setCreateBy(userId); |
| | | // roleVO.setStatus(0); |
| | | // HanyuPinyinHelper hanyuPinyinHelper = new HanyuPinyinHelper() ; |
| | | // roleVO.setRoleKey(hanyuPinyinHelper.toHanyuPinyin(roleName)); |
| | | // return userService.addRoleBackstage(roleVO); |
| | | // } |
| | | |
| | | @ApiOperation(value = "新增角色-设置角色的权限") |
| | | @PostMapping("menu") |
| | | @OperLog(operModul = "角色管理",operType = 1) |
| | | public R addMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO){ |
| | | RoleVO roleVO=new RoleVO(); |
| | | @OperLog(operModul = "角色管理", operType = 1) |
| | | public R addMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) { |
| | | RoleVO roleVO = new RoleVO(); |
| | | String roleName = menuRoleVO.getRoleName(); |
| | | if (ObjectUtils.isEmpty(roleName)) { |
| | | return R.fail("角色名字不能为空"); |
| | |
| | | roleVO.setCommunityId(communityId); |
| | | roleVO.setCreateBy(userId); |
| | | roleVO.setStatus(0); |
| | | HanyuPinyinHelper hanyuPinyinHelper = new HanyuPinyinHelper() ; |
| | | HanyuPinyinHelper hanyuPinyinHelper = new HanyuPinyinHelper(); |
| | | roleVO.setRoleKey(hanyuPinyinHelper.toHanyuPinyin(roleName)); |
| | | R r = userService.addRoleBackstage(roleVO); |
| | | if (R.isOk(r)) { |
| | | Long roleId =Long.parseLong(r.getData().toString()); |
| | | Long roleId = Long.parseLong(r.getData().toString()); |
| | | menuRoleVO.setRoleId(roleId); |
| | | menuRoleVO.setCommunityId(communityId); |
| | | return userService.putMenuRole(menuRoleVO); |
| | |
| | | return r; |
| | | } |
| | | |
| | | @ApiOperation(value = "获取角色的权限配置列表",response = SysMenuVO.class) |
| | | @ApiOperation(value = "获取角色的权限配置列表", response = SysMenuVO.class) |
| | | @GetMapping("listmenurole") |
| | | @ApiImplicitParam(name = "roleId",value = "角色id") |
| | | public R listMenuBackstageByRole(@RequestParam("roleId") Long roleId){ |
| | | @ApiImplicitParam(name = "roleId", value = "角色id") |
| | | public R listMenuBackstageByRole(@RequestParam("roleId") Long roleId) { |
| | | return userService.listMenuBackstageByRole(roleId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除角色") |
| | | @DeleteMapping("role") |
| | | @OperLog(operModul = "角色管理",operType = 3) |
| | | public R deleteRoleBackstage(@RequestBody RoleVO roleVO){ |
| | | @OperLog(operModul = "角色管理", operType = 3) |
| | | public R deleteRoleBackstage(@RequestBody RoleVO roleVO) { |
| | | Long roleId = roleVO.getRoleId(); |
| | | if (null==roleId||0==roleId) { |
| | | if (null == roleId || 0 == roleId) { |
| | | return R.fail("角色主键不能为空"); |
| | | } |
| | | return userService.deleteRoleBackstage(roleVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "运营平台权限配置列表",response = SysMenuVO.class) |
| | | @ApiOperation(value = "运营平台权限配置列表", response = SysMenuVO.class) |
| | | @GetMapping("listmenu") |
| | | public R listMenuBackstage(){ |
| | | Long communityId=0l; |
| | | public R listMenuBackstage() { |
| | | Long communityId = 0l; |
| | | return userService.listMenuBackstage(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "设置角色的权限") |
| | | @PutMapping("menu") |
| | | @OperLog(operModul = "角色管理",operType = 2) |
| | | public R putMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO){ |
| | | @OperLog(operModul = "角色管理", operType = 2) |
| | | public R putMenuRole(@RequestBody @Validated MenuRoleVO menuRoleVO) { |
| | | menuRoleVO.setCommunityId(0l); |
| | | return userService.putMenuRole(menuRoleVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "分页展示操作日志",response = SysOperLogVO.class) |
| | | @ApiOperation(value = "分页展示操作日志", response = SysOperLogVO.class) |
| | | @PostMapping("pageoperlog") |
| | | public R pageOperLog(@RequestBody SysOperLogVO sysOperLogVO){ |
| | | public R pageOperLog(@RequestBody SysOperLogVO sysOperLogVO) { |
| | | sysOperLogVO.setCommunityId(0l); |
| | | return userService.pageOperLog(sysOperLogVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户协议",response = SysUserAgreementVO.class) |
| | | @ApiOperation(value = "用户协议", response = SysUserAgreementVO.class) |
| | | @GetMapping("listagreement") |
| | | public R listAgreement(){ |
| | | public R listAgreement() { |
| | | return userService.listAgreement(0L); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑用户协议") |
| | | @PutMapping("agreement") |
| | | @OperLog(operModul = "用户协议",operType = 2) |
| | | public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO){ |
| | | @OperLog(operModul = "用户协议", operType = 2) |
| | | public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO) { |
| | | Long id = sysUserAgreementVO.getId(); |
| | | if (null==id||id==0) { |
| | | if (null == id || id == 0) { |
| | | return R.fail("协议主键不能为空"); |
| | | } |
| | | return userService.putAgreement(sysUserAgreementVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取系统配置",response = AppletesBackstageConfigVO.class) |
| | | @ApiOperation(value = "获取系统配置", response = AppletesBackstageConfigVO.class) |
| | | @GetMapping("config") |
| | | public R getConfig(){ |
| | | public R getConfig() { |
| | | return communityService.getJumpContent(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑系统配置") |
| | | @PutMapping("config") |
| | | @OperLog(operModul = "系统配置",operType = 2) |
| | | public R putConfig(@RequestBody AppletesBackstageConfigDTO appletesBackstageConfigDTO){ |
| | | @OperLog(operModul = "系统配置", operType = 2) |
| | | public R putConfig(@RequestBody AppletesBackstageConfigDTO appletesBackstageConfigDTO) { |
| | | List<ComOpsAdvJumpDTO> comOpsAdvJumpDTOS = appletesBackstageConfigDTO.getComOpsAdvJumpDTOS(); |
| | | if (ObjectUtils.isEmpty(comOpsAdvJumpDTOS)) { |
| | | return R.fail("广告跳转内容不能为空"); |
| | |
| | | return communityService.putJumpContent(appletesBackstageConfigDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询用户意见反馈",response = SysUserFeedbackVO.class) |
| | | @ApiOperation(value = "分页查询用户意见反馈", response = SysUserFeedbackVO.class) |
| | | @PostMapping("pagefeedback") |
| | | public R pageFeedback(@RequestBody @Validated(PageGroup.class) PageFeedBackDTO pageFeedBackDTO){ |
| | | public R pageFeedback(@RequestBody @Validated(PageGroup.class) PageFeedBackDTO pageFeedBackDTO) { |
| | | return userService.pageFeedback(pageFeedBackDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "反馈意见详情",response = SysUserFeedbackVO.class) |
| | | @ApiOperation(value = "反馈意见详情", response = SysUserFeedbackVO.class) |
| | | @GetMapping("feedback") |
| | | public R detailFeedback(@RequestParam("id") Long id){ |
| | | public R detailFeedback(@RequestParam("id") Long id) { |
| | | return userService.detailFeedback(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除意见反馈") |
| | | @DeleteMapping("feedback") |
| | | public R deleteFeedback(@RequestParam("id") Long id){ |
| | | public R deleteFeedback(@RequestParam("id") Long id) { |
| | | return userService.deleteFeedback(id); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.user.ChangePasswordVO; |
| | | import com.panzhihua.common.model.vos.user.SysMenuVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class UserApi extends BaseController { |
| | | @Resource |
| | | private UserService userService; |
| | | @ApiOperation(value = "当前登录用户信息",response = LoginUserInfoVO.class) |
| | | |
| | | @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class) |
| | | @GetMapping("info") |
| | | public R getUserInfo(){ |
| | | public R getUserInfo() { |
| | | Long userId = this.getUserId(); |
| | | return userService.detailUser(userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改密码") |
| | | @PutMapping("changepassword") |
| | | @OperLog(operModul = "密码管理",operType = 2) |
| | | public R changePassword(@Validated @RequestBody ChangePasswordVO changePasswordVO){ |
| | | @OperLog(operModul = "密码管理", operType = 2) |
| | | public R changePassword(@Validated @RequestBody ChangePasswordVO changePasswordVO) { |
| | | Long userId = this.getUserId(); |
| | | String newPassword = changePasswordVO.getNewPassword(); |
| | | String oldPassword=changePasswordVO.getOldPassword(); |
| | | String oldPassword = changePasswordVO.getOldPassword(); |
| | | if (newPassword.equals(oldPassword)) { |
| | | return R.fail("修改失败,新密码和原密码一致"); |
| | | } |
| | |
| | | return userService.changePassword(changePasswordVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户菜单获取",response = SysMenuVO.class) |
| | | @ApiOperation(value = "用户菜单获取", response = SysMenuVO.class) |
| | | @GetMapping("listmenu") |
| | | public R listmenu(){ |
| | | public R listmenu() { |
| | | Long userId = this.getUserId(); |
| | | return userService.listmenu(userId); |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.interfaces.OperLog; |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询小程序用户",response = SysUserVO.class ) |
| | | @ApiOperation(value = "分页查询小程序用户", response = SysUserVO.class) |
| | | @PostMapping("pageuser") |
| | | public R pageUserAppletsBackstage(@RequestBody @Validated(PageGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO){ |
| | | return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO); |
| | | public R pageUserAppletsBackstage( |
| | | @RequestBody @Validated(PageGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) { |
| | | return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑用户状态" ) |
| | | @ApiOperation(value = "编辑用户状态") |
| | | @PostMapping("user") |
| | | @OperLog(operModul = "居民用户管理",operType = 2) |
| | | public R putUserAppletsBackstage(@RequestBody @Validated(PutGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO){ |
| | | @OperLog(operModul = "居民用户管理", operType = 2) |
| | | public R putUserAppletsBackstage( |
| | | @RequestBody @Validated(PutGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) { |
| | | return userService.putUserAppletsBackstage(pageUserAppletsBackstageDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区下拉列表" ,response = ComActVO.class) |
| | | @ApiOperation(value = "社区下拉列表", response = ComActVO.class) |
| | | @GetMapping("listcommunity") |
| | | public R listCommunity(){ |
| | | public R listCommunity() { |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.vaccines.VaccinesByAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.vaccines.VaccinesByAppVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | 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("/vaccines/") |
| | | @Api(tags = {"疫苗服务"}) |
| | | public class VaccinesApi extends BaseController { |
| | | public class VaccinesApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "疫苗分类列表" , response = VaccinesByAppVO.class) |
| | | @ApiOperation(value = "疫苗分类列表", response = VaccinesByAppVO.class) |
| | | @PostMapping("list") |
| | | public R getVaccinesListByAdmin(@RequestBody VaccinesByAdminDTO vaccinesByAdminDTO) { |
| | | return communityService.getVaccinesListByAdmin(vaccinesByAdminDTO); |
| | |
| | | public R deleteVaccinesByAdmin(@RequestParam("id") Long id) { |
| | | return communityService.deleteVaccinesByAdmin(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.PageActWorkGuideDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @description: 办事指南管理 |
| | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | |
| | | @ApiOperation(value = "办事指南_新增") |
| | | @PostMapping("addworkguide") |
| | | public R addStreet(@RequestBody @Validated(AddGroup.class) ComActWorkGuideVO workGuideVO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | return communityService.addWorkGuide(workGuideVO,loginUserInfo.getUserId()); |
| | | return communityService.addWorkGuide(workGuideVO, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("editworkguide") |
| | | @ApiOperation(value = "办事指南_编辑") |
| | | public R putWorkGuide(@RequestBody @Validated(AddGroup.class) ComActWorkGuideVO workGuideVO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | return communityService.editWorkGuide(workGuideVO,loginUserInfo.getUserId()); |
| | | return communityService.editWorkGuide(workGuideVO, loginUserInfo.getUserId()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "办事指南_详情",response = ComActWorkGuideVO.class) |
| | | @ApiOperation(value = "办事指南_详情", response = ComActWorkGuideVO.class) |
| | | @GetMapping("detailworkguide") |
| | | public R detailWorkGuide(@RequestParam("workGuideId")Long workGuideId) { |
| | | Long conmunityId = this.getLoginUserInfo().getCommunityId(); |
| | | return communityService.detailWorkGuide(workGuideId, conmunityId); |
| | | public R detailWorkGuide(@RequestParam("workGuideId") Long workGuideId) { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | return communityService.detailWorkGuide(workGuideId, communityId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "办事指南_分页",response = ComActWorkGuideVO.class) |
| | | @ApiOperation(value = "办事指南_分页", response = ComActWorkGuideVO.class) |
| | | @PostMapping("pageworkguide") |
| | | public R detailWorkGuide(@RequestBody PageActWorkGuideDTO pageActWorkGuideDTO) { |
| | | return communityService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "办事指南_删除",response = ComActWorkGuideVO.class) |
| | | @ApiOperation(value = "办事指南_删除", response = ComActWorkGuideVO.class) |
| | | @PostMapping("delectworkguide") |
| | | R delectWorkGuide(@RequestParam("workGuideId") Long workGuideId){ |
| | | R delectWorkGuide(@RequestParam("workGuideId") Long workGuideId) { |
| | | return communityService.delectWorkGuide(workGuideId); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.applets_backstage.config; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | |
| | | public class SwaggerConfig { |
| | | @Bean |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)).paths(PathSelectors.any()).build(); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("小程序后台接口文档") |
| | | .description("。") |
| | | .contact(new Contact("Ray。", "http://www.ruiyeclub.cn", "ruiyeclub@foxmail.com")) |
| | | .version("1.0") |
| | | .build(); |
| | | return new ApiInfoBuilder().title("小程序后台接口文档").description("。") |
| | | .contact(new Contact("Ray。", "http://www.ruiyeclub.cn", "ruiyeclub@foxmail.com")).version("1.0").build(); |
| | | } |
| | | } |
| | |
| | | @EnableFeignClients(basePackages = {"com.panzhihua.common.service"}) |
| | | @EnableCircuitBreaker |
| | | @EnableEurekaClient |
| | | @ComponentScan({"com.panzhihua.auth","com.panzhihua.common"}) |
| | | @ComponentScan({"com.panzhihua.auth", "com.panzhihua.common"}) |
| | | public class AuthApplication { |
| | | |
| | | public static void main(String[] args) { |
| | |
| | | package com.panzhihua.auth.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.auth.model.dos.LoginBody; |
| | | import com.panzhihua.auth.service.LoginService; |
| | | import com.panzhihua.common.exceptions.TokenException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import io.jsonwebtoken.Claims; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | /** |
| | | * 小程序登录 |
| | | * |
| | | * @param openId 微信标识 |
| | | * @param openId |
| | | * 微信标识 |
| | | * @return jwt |
| | | */ |
| | | @PostMapping("/loginApplets") |
| | |
| | | /** |
| | | * 用户登出 |
| | | * |
| | | * @param token 登录用户token |
| | | * @param token |
| | | * 登录用户token |
| | | * @return 登出结果 |
| | | */ |
| | | @PostMapping("/logout") |
| | |
| | | /** |
| | | * 运营后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginAppletsBackStage") |
| | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * |
| | | * @param loginBody 账户 |
| | | * @param loginBody |
| | | * 账户 |
| | | * @return 登录结果 |
| | | * @author manailin |
| | | * @date 2021-5-13 10:56 |
| | |
| | | /** |
| | | * 社区后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginCommunityBackage") |
| | |
| | | /** |
| | | * 认证中心刷新token |
| | | * |
| | | * @param refreshToken 用户端保存的刷新token |
| | | * @param refreshToken |
| | | * 用户端保存的刷新token |
| | | * @return 新的token 和刷新token |
| | | */ |
| | | @PostMapping("/refreshToken") |
| | |
| | | throw new TokenException("刷新token校验失败"); |
| | | } |
| | | String subject = claims.getSubject(); |
| | | Integer type = (Integer) claims.get("type"); |
| | | Integer type = (Integer)claims.get("type"); |
| | | boolean empty1 = ObjectUtils.isEmpty(subject); |
| | | boolean empty2 = ObjectUtils.isEmpty(type); |
| | | if (empty1 || empty2) { |
| | |
| | | /** |
| | | * 商家后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginShopBackStage") |
| | |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 网格综治APP登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginGridApp") |
| | |
| | | return R.ok(loginReturnVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 网格综治后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @PostMapping("/loginGridBackstage") |
| | |
| | | package com.panzhihua.auth.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 读取项目相关配置 |
| | |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "auth") |
| | | public class AuthConfig |
| | | { |
| | | /** 项目名称 */ |
| | | public String name; |
| | | /** 版本 */ |
| | | public String version; |
| | | |
| | | public class AuthConfig { |
| | | /** 上传路径 */ |
| | | public static String profile; |
| | | /** 获取地址开关 */ |
| | | public static boolean addressEnabled; |
| | | |
| | | |
| | | |
| | | /** 项目名称 */ |
| | | public String name; |
| | | /** 版本 */ |
| | | public String version; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.auth.config; |
| | | |
| | | |
| | | import com.panzhihua.common.constants.Constants; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | import com.panzhihua.common.constants.Constants; |
| | | |
| | | /** |
| | | * 通用配置 |
| | | * |
| | | * @author huanghongfa |
| | | */ |
| | | @Configuration |
| | | public class ResourcesConfig implements WebMvcConfigurer |
| | | { |
| | | public class ResourcesConfig implements WebMvcConfigurer { |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) |
| | | { |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | /** 本地文件上传路径 */ |
| | | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + AuthConfig.profile + "/"); |
| | | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**") |
| | | .addResourceLocations("file:" + AuthConfig.profile + "/"); |
| | | |
| | | /** swagger配置 */ |
| | | registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); |
| | | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跨域配置 |
| | | */ |
| | | @Bean |
| | | public CorsFilter corsFilter() |
| | | { |
| | | public CorsFilter corsFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | CorsConfiguration config = new CorsConfiguration(); |
| | | config.setAllowCredentials(true); |
| | |
| | | package com.panzhihua.auth.config; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.auth.handel.*; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.security.authentication.AuthenticationManager; |
| | |
| | | import org.springframework.security.config.http.SessionCreationPolicy; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.auth.handel.AjaxAuthenticationEntryPoint; |
| | | import com.panzhihua.auth.handel.UserAuthenticationProvider; |
| | | import com.panzhihua.auth.handel.UserLoginFailureHandler; |
| | | import com.panzhihua.auth.handel.UserLogoutSuccessHandler; |
| | | |
| | | /** |
| | | * SpringSecurity配置类 |
| | | * |
| | | * @Author youcong |
| | | */ |
| | | @Configuration |
| | |
| | | @Resource |
| | | private UserAuthenticationProvider userAuthenticationProvider; |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder(); |
| | | String encode = bCryptPasswordEncoder.encode("123456"); |
| | | System.out.println(encode); |
| | | } |
| | | |
| | | /** |
| | | * 加密方式 |
| | | * |
| | | * @Author youcong |
| | | */ |
| | | @Bean |
| | | public BCryptPasswordEncoder bCryptPasswordEncoder(){ |
| | | public BCryptPasswordEncoder bCryptPasswordEncoder() { |
| | | return new BCryptPasswordEncoder(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 配置登录验证逻辑 |
| | | */ |
| | | @Override |
| | | protected void configure(AuthenticationManagerBuilder auth){ |
| | | //这里可启用我们自己的登陆验证逻辑 |
| | | protected void configure(AuthenticationManagerBuilder auth) { |
| | | // 这里可启用我们自己的登陆验证逻辑 |
| | | auth.authenticationProvider(userAuthenticationProvider); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Bean |
| | | @Override |
| | | public AuthenticationManager authenticationManagerBean() throws Exception |
| | | { |
| | | public AuthenticationManager authenticationManagerBean() throws Exception { |
| | | return super.authenticationManagerBean(); |
| | | } |
| | | |
| | | /** |
| | | * 配置security的控制逻辑 |
| | | * |
| | | * @Author youcong |
| | | * @Param http 请求 |
| | | * @Param http 请求 |
| | | */ |
| | | @Override |
| | | protected void configure(HttpSecurity http) throws Exception { |
| | | |
| | | http.authorizeRequests() |
| | | .anyRequest().permitAll() |
| | | .and() |
| | | // 配置登录成功自定义处理类 |
| | | .formLogin() |
| | | // .successHandler(new UserLoginSuccessHandler()) |
| | | // 配置登录失败自定义处理类 |
| | | .failureHandler(new UserLoginFailureHandler()) |
| | | .and() |
| | | // 配置登出地址 |
| | | .logout() |
| | | .logoutUrl("/login/userLogout") |
| | | // 配置用户登出自定义处理类 |
| | | .logoutSuccessHandler(new UserLogoutSuccessHandler()) |
| | | .and() |
| | | // 开启跨域 |
| | | .cors() |
| | | //异常处理(权限拒绝、登录失效等) |
| | | .and().exceptionHandling() |
| | | .authenticationEntryPoint(new AjaxAuthenticationEntryPoint())//匿名用户访问无权限资源时的异常处理; |
| | | .and() |
| | | // 取消跨站请求伪造防护 |
| | | .csrf().disable(); |
| | | http.authorizeRequests().anyRequest().permitAll().and() |
| | | // 配置登录成功自定义处理类 |
| | | .formLogin() |
| | | // .successHandler(new UserLoginSuccessHandler()) |
| | | // 配置登录失败自定义处理类 |
| | | .failureHandler(new UserLoginFailureHandler()).and() |
| | | // 配置登出地址 |
| | | .logout().logoutUrl("/login/userLogout") |
| | | // 配置用户登出自定义处理类 |
| | | .logoutSuccessHandler(new UserLogoutSuccessHandler()).and() |
| | | // 开启跨域 |
| | | .cors() |
| | | // 异常处理(权限拒绝、登录失效等) |
| | | .and().exceptionHandling().authenticationEntryPoint(new AjaxAuthenticationEntryPoint())// 匿名用户访问无权限资源时的异常处理; |
| | | .and() |
| | | // 取消跨站请求伪造防护 |
| | | .csrf().disable(); |
| | | // 基于Token不需要session |
| | | http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); |
| | | // 禁用缓存 |
| | | http.headers().cacheControl(); |
| | | |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | BCryptPasswordEncoder bCryptPasswordEncoder=new BCryptPasswordEncoder(); |
| | | String encode = bCryptPasswordEncoder.encode("123456"); |
| | | System.out.println(encode); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.AuthenticationException; |
| | | import org.springframework.security.web.AuthenticationEntryPoint; |
| | | import org.springframework.stereotype.Component; |
| | | import java.io.IOException; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | import org.springframework.security.core.AuthenticationException; |
| | | import org.springframework.security.web.AuthenticationEntryPoint; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class AjaxAuthenticationEntryPoint implements AuthenticationEntryPoint { |
| | | |
| | | @Override |
| | | public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException { |
| | | log.error("错误信息【{}】",e.getMessage()); |
| | | ResultUtil.responseJson(httpServletResponse,R.fail(e.getMessage())); |
| | | public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, |
| | | AuthenticationException e) throws IOException, ServletException { |
| | | log.error("错误信息【{}】", e.getMessage()); |
| | | ResultUtil.responseJson(httpServletResponse, R.fail(e.getMessage())); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.security.authentication.AuthenticationProvider; |
| | | import org.springframework.security.authentication.BadCredentialsException; |
| | | import org.springframework.security.authentication.LockedException; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class UserAuthenticationProvider implements AuthenticationProvider { |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | public Authentication authenticate(Authentication authentication) throws AuthenticationException { |
| | | // 获取表单输入中返回的用户名 |
| | | String userName = (String) authentication.getPrincipal(); |
| | | String userName = (String)authentication.getPrincipal(); |
| | | // 获取表单中输入的密码 |
| | | String password = (String) authentication.getCredentials(); |
| | | String password = (String)authentication.getCredentials(); |
| | | // 查询用户是否存在 |
| | | R<LoginUserInfoVO> r = userService.getUserInfo(userName); |
| | | if (r.getCode()!=200) { |
| | | if (r.getCode() != 200) { |
| | | throw new UsernameNotFoundException("该账号不存在"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = r.getData(); |
| | | List<GrantedAuthority> grantedAuthorityList=new ArrayList<>(); |
| | | List<GrantedAuthority> grantedAuthorityList = new ArrayList<>(); |
| | | Set<String> roles = loginUserInfoVO.getRoles(); |
| | | if (!ObjectUtils.isEmpty(roles)) { |
| | | roles.forEach(s -> { |
| | |
| | | throw new BadCredentialsException("密码不正确"); |
| | | } |
| | | // 还可以加一些其他信息的判断,比如用户账号已停用等判断 |
| | | if (loginUserInfoVO.getStatus().intValue()==2) { |
| | | if (loginUserInfoVO.getStatus().intValue() == 2) { |
| | | throw new LockedException("该用户已被禁用"); |
| | | } |
| | | // 维护最后登录时间 |
| | | // 维护最后登录时间 |
| | | userService.putUserLastLoginTime(loginUserInfoVO.getUserId()); |
| | | return new UsernamePasswordAuthenticationToken(loginUserInfoVO, password, grantedAuthorityList); |
| | | } |
| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.authentication.BadCredentialsException; |
| | | import org.springframework.security.authentication.LockedException; |
| | | import org.springframework.security.core.AuthenticationException; |
| | |
| | | import org.springframework.security.web.authentication.AuthenticationFailureHandler; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class UserLoginFailureHandler implements AuthenticationFailureHandler { |
| | | /** |
| | | * 登录失败返回结果 |
| | | * |
| | | * @Author youcong |
| | | */ |
| | | @Override |
| | | public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception){ |
| | | public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, |
| | | AuthenticationException exception) { |
| | | log.info("登录失败"); |
| | | // 这些对于操作的处理类可以根据不同异常进行不同处理 |
| | | if (exception instanceof UsernameNotFoundException){ |
| | | if (exception instanceof UsernameNotFoundException) { |
| | | ResultUtil.responseJson(response, R.fail("该账号不存在")); |
| | | } |
| | | if (exception instanceof LockedException){ |
| | | ResultUtil.responseJson(response,R.fail("用户被冻结")); |
| | | if (exception instanceof LockedException) { |
| | | ResultUtil.responseJson(response, R.fail("用户被冻结")); |
| | | } |
| | | if (exception instanceof BadCredentialsException){ |
| | | ResultUtil.responseJson(response,R.fail("密码错误")); |
| | | if (exception instanceof BadCredentialsException) { |
| | | ResultUtil.responseJson(response, R.fail("密码错误")); |
| | | } |
| | | ResultUtil.responseJson(response,R.fail("登录失败")); |
| | | ResultUtil.responseJson(response, R.fail("登录失败")); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.security.web.authentication.AuthenticationSuccessHandler; |
| | | import java.io.IOException; |
| | | |
| | | import javax.servlet.FilterChain; |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.security.web.authentication.AuthenticationSuccessHandler; |
| | | |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | @Slf4j |
| | | public class UserLoginSuccessHandler implements AuthenticationSuccessHandler { |
| | | @Override |
| | | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authentication) throws IOException, ServletException { |
| | | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, FilterChain chain, |
| | | Authentication authentication) throws IOException, ServletException { |
| | | log.info("登录成功"); |
| | | } |
| | | |
| | | @Override |
| | | public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException { |
| | | public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, |
| | | Authentication authentication) throws IOException, ServletException { |
| | | log.info("登录成功"); |
| | | // 组装JWT |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUserInfoVO); |
| | | token = TokenConstant.TOKEN_PRE + token; |
| | | // 封装返回参数 |
| | | R<String> ok = R.ok(token); |
| | | ResultUtil.responseJson(httpServletResponse,ok); |
| | | ResultUtil.responseJson(httpServletResponse, ok); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.handel; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.ResultUtil; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | public class UserLogoutSuccessHandler implements LogoutSuccessHandler { |
| | | /** |
| | | * 用户登出返回结果 |
| | | * 这里应该让前端清除掉Token |
| | | * 用户登出返回结果 这里应该让前端清除掉Token |
| | | * |
| | | * @Author youcong |
| | | */ |
| | | @Override |
| | | public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication){ |
| | | public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, |
| | | Authentication authentication) { |
| | | SecurityContextHolder.clearContext(); |
| | | ResultUtil.responseJson(response, R.ok()); |
| | | } |
| | |
| | | package com.panzhihua.auth.manager; |
| | | |
| | | import java.util.TimerTask; |
| | | |
| | | import com.panzhihua.auth.model.dos.SysLogininforDO; |
| | | import com.panzhihua.auth.model.dos.SysOperLogDO; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.auth.model.dos.SysLogininforDO; |
| | | import com.panzhihua.common.utlis.AddressUtils; |
| | | import com.panzhihua.common.utlis.IpUtils; |
| | | import com.panzhihua.common.utlis.LogUtils; |
| | | import com.panzhihua.common.utlis.ServletUtils; |
| | | |
| | | import eu.bitwalker.useragentutils.UserAgent; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.TimerTask; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | /** |
| | | * 记录登录信息 |
| | | * |
| | | * @param username 用户名 |
| | | * @param status 状态 |
| | | * @param message 消息 |
| | | * @param args 列表 |
| | | * @param username |
| | | * 用户名 |
| | | * @param status |
| | | * 状态 |
| | | * @param message |
| | | * 消息 |
| | | * @param args |
| | | * 列表 |
| | | * @return 任务task |
| | | */ |
| | | public static TimerTask recordLogininfor(final String username, final String status, final String message, |
| | | final Object... args) |
| | | { |
| | | final Object... args) { |
| | | final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); |
| | | final String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); |
| | | return new TimerTask() |
| | | { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() |
| | | { |
| | | public void run() { |
| | | String address = AddressUtils.getRealAddressByIP(ip); |
| | | StringBuilder s = new StringBuilder(); |
| | | s.append(LogUtils.getBlock(ip)); |
| | |
| | | logininfor.setOs(os); |
| | | logininfor.setMsg(message); |
| | | // 日志状态 |
| | | if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) |
| | | { |
| | | logininfor.setStatus(Constants.SUCCESS+""); |
| | | } |
| | | else if (Constants.LOGIN_FAIL.equals(status)) |
| | | { |
| | | logininfor.setStatus(Constants.FAIL+""); |
| | | if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) { |
| | | logininfor.setStatus(Constants.SUCCESS + ""); |
| | | } else if (Constants.LOGIN_FAIL.equals(status)) { |
| | | logininfor.setStatus(Constants.FAIL + ""); |
| | | } |
| | | // 插入数据 |
| | | // SpringUtils.getBean(ISysLogininforService.class).insertLogininfor(logininfor); |
| | | // SpringUtils.getBean(ISysLogininforService.class).insertLogininfor(logininfor); |
| | | } |
| | | }; |
| | | } |
| | |
| | | /** |
| | | * 操作日志记录 |
| | | * |
| | | * @param operLog 操作日志信息 |
| | | * @param operLog |
| | | * 操作日志信息 |
| | | * @return 任务task |
| | | */ |
| | | public static TimerTask recordOper(final SysOperLogDO operLog) |
| | | { |
| | | return new TimerTask() |
| | | { |
| | | public static TimerTask recordOper(final SysOperLogDO operLog) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() |
| | | { |
| | | public void run() { |
| | | // 远程查询操作地点 |
| | | operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp())); |
| | | // SpringUtils.getBean(ISysOperLogService.class).insertOperlog(operLog); |
| | | // SpringUtils.getBean(ISysOperLogService.class).insertOperlog(operLog); |
| | | } |
| | | }; |
| | | } |
| | |
| | | package com.panzhihua.auth.manager; |
| | | |
| | | import com.panzhihua.common.utlis.SpringUtils; |
| | | import com.panzhihua.common.utlis.Threads; |
| | | |
| | | import java.util.TimerTask; |
| | | import java.util.concurrent.ScheduledExecutorService; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import com.panzhihua.common.utlis.SpringUtils; |
| | | import com.panzhihua.common.utlis.Threads; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | public class AsyncManagerNew { |
| | | |
| | | private static AsyncManagerNew me = new AsyncManagerNew(); |
| | | /** |
| | | * 操作延迟10毫秒 |
| | | */ |
| | | private final int OPERATE_DELAY_TIME = 10; |
| | | |
| | | /** |
| | | * 异步操作任务调度线程池 |
| | | */ |
| | |
| | | /** |
| | | * 单例模式 |
| | | */ |
| | | private AsyncManagerNew(){} |
| | | private AsyncManagerNew() {} |
| | | |
| | | private static AsyncManagerNew me = new AsyncManagerNew(); |
| | | |
| | | public static AsyncManagerNew me() |
| | | { |
| | | public static AsyncManagerNew me() { |
| | | return me; |
| | | } |
| | | |
| | | /** |
| | | * 执行任务 |
| | | * |
| | | * @param task 任务 |
| | | * @param task |
| | | * 任务 |
| | | */ |
| | | public void execute(TimerTask task) |
| | | { |
| | | public void execute(TimerTask task) { |
| | | executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); |
| | | } |
| | | |
| | | /** |
| | | * 停止任务线程池 |
| | | */ |
| | | public void shutdown() |
| | | { |
| | | public void shutdown() { |
| | | Threads.shutdownAndAwaitTermination(executor); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.manager; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | |
| | | /** |
| | | * 确保应用退出时能关闭后台线程 |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class ShutdownManager |
| | | { |
| | | public class ShutdownManager { |
| | | private static final Logger logger = LoggerFactory.getLogger("sys-user"); |
| | | |
| | | @PreDestroy |
| | | public void destroy() |
| | | { |
| | | public void destroy() { |
| | | shutdownAsyncManager(); |
| | | } |
| | | |
| | | /** |
| | | * 停止异步执行任务 |
| | | */ |
| | | private void shutdownAsyncManager() |
| | | { |
| | | try |
| | | { |
| | | private void shutdownAsyncManager() { |
| | | try { |
| | | logger.info("====关闭后台任务任务线程池===="); |
| | | AsyncManagerNew.me().shutdown(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * |
| | | * @author manailin |
| | | * @date 2021-5-13 10:56 |
| | | */ |
| | |
| | | package com.panzhihua.auth.model.dos; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 系统访问记录表 sys_logininfor |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Data |
| | | public class SysLogininforDO |
| | | { |
| | | public class SysLogininforDO { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | |
| | | /** 访问时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date loginTime; |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.auth.model.dos; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 操作日志记录表 oper_log |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Data |
| | | public class SysOperLogDO |
| | | { |
| | | public class SysOperLogDO { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 日志主键 */ |
| | |
| | | /** 操作时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operTime; |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.auth.model.vos; |
| | | |
| | | import org.springframework.security.core.GrantedAuthority; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.security.core.GrantedAuthority; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | */ |
| | | private boolean isEnabled = true; |
| | | |
| | | |
| | | public static long getSerialVersionUID() { |
| | | return serialVersionUID; |
| | | } |
| | |
| | | this.password = password; |
| | | } |
| | | |
| | | |
| | | public void setAuthorities(Collection<GrantedAuthority> authorities) { |
| | | this.authorities = authorities; |
| | | } |
| | | |
| | | |
| | | public void setEnabled(boolean enabled) { |
| | | isEnabled = enabled; |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | |
| | | return authorities; |
| | | } |
| | | |
| | | public void setAuthorities(Collection<GrantedAuthority> authorities) { |
| | | this.authorities = authorities; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isAccountNonExpired() { |
| | | return isAccountNonExpired; |
| | |
| | | public boolean isEnabled() { |
| | | return isEnabled; |
| | | } |
| | | |
| | | public void setEnabled(boolean enabled) { |
| | | isEnabled = enabled; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.auth.service; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.auth.service; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | /** |
| | | * 微信小程序登录 |
| | | * |
| | | * @param openId 微信标识 |
| | | * @param openId |
| | | * 微信标识 |
| | | * @return jwt |
| | | */ |
| | | LoginReturnVO loginApplets(String openId); |
| | |
| | | /** |
| | | * 小程序用户登出 |
| | | * |
| | | * @param token 登录用户token |
| | | * @param token |
| | | * 登录用户token |
| | | */ |
| | | void logoutApplets(String token); |
| | | |
| | | /** |
| | | * 小程序后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginAppletsBackStage(String account, String password); |
| | | |
| | | /** |
| | | * 社区后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginCommunityBackage(String account, String password); |
| | | |
| | | /** |
| | | * 商家后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginShopBackStage(String account, String password); |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | |
| | | |
| | | /** |
| | | * 网格综治APP登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnsVO loginGridApp(String account, String password); |
| | | |
| | | /** |
| | | * 网格综治后台登录 |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | LoginReturnVO loginGridBackstage(String account, String password); |
| | |
| | | package com.panzhihua.auth.service.impl; |
| | | |
| | | import com.panzhihua.auth.service.ISysMenuService; |
| | | import java.util.Set; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Set; |
| | | import com.panzhihua.auth.service.ISysMenuService; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | package com.panzhihua.auth.service.impl; |
| | | |
| | | import com.panzhihua.auth.service.ISysRoleService; |
| | | import java.util.Set; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Set; |
| | | import com.panzhihua.auth.service.ISysRoleService; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | package com.panzhihua.auth.service.impl; |
| | | |
| | | import com.panzhihua.auth.service.LoginService; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.concurrent.TimeUnit; |
| | | import com.panzhihua.auth.service.LoginService; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.vos.LoginReturnVO; |
| | | import com.panzhihua.common.model.vos.LoginReturnsVO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.JWTTokenUtil; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | /** |
| | | * 微信小程序登录 |
| | | * |
| | | * @param openId 微信标识 |
| | | * @param openId |
| | | * 微信标识 |
| | | * @return jwt |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginApplets(String openId) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(openId+"_1", UserConstants.PASSWORD)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | .authenticate(new UsernamePasswordAuthenticationToken(openId + "_1", UserConstants.PASSWORD)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | /** |
| | | * 小程序用户登出 |
| | | * |
| | | * @param token 登录用户token |
| | | * @param token |
| | | * 登录用户token |
| | | */ |
| | | @Override |
| | | public void logoutApplets(String token) { |
| | | ValueOperations<String, String> valueOperations = redisTemplate.opsForValue(); |
| | | token= token.replaceAll(TokenConstant.TOKEN_PRE,""); |
| | | valueOperations.set(UserConstants.LOGOUT_TOKEN+token,token, TokenConstant.EXPIRETIME, TimeUnit.MINUTES); |
| | | token = token.replaceAll(TokenConstant.TOKEN_PRE, ""); |
| | | valueOperations.set(UserConstants.LOGOUT_TOKEN + token, token, TokenConstant.EXPIRETIME, TimeUnit.MINUTES); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginAppletsBackStage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_2", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_2", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | /** |
| | | * 社区后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginCommunityBackage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_3", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_3", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | /** |
| | | * 商家后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginShopBackStage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_5", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_5", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | |
| | | /** |
| | | * 大数据统计平台(区、街道、社区三层登陆接口) |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @author manailin |
| | | * @return 登录结果 |
| | | * @date 2021-5-13 10:56 |
| | |
| | | @Override |
| | | public LoginReturnVO loginBigDataBackStage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_8", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_8", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | /** |
| | | * 商家后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnsVO loginGridApp(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_6", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_6", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnsVO loginReturnVO=new LoginReturnsVO(); |
| | | LoginReturnsVO loginReturnVO = new LoginReturnsVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | loginReturnVO.setUserId(loginUser.getUserId()); |
| | |
| | | /** |
| | | * 商家后台登录 |
| | | * |
| | | * @param account 账户 |
| | | * @param password 密码 |
| | | * @param account |
| | | * 账户 |
| | | * @param password |
| | | * 密码 |
| | | * @return 登录结果 |
| | | */ |
| | | @Override |
| | | public LoginReturnVO loginGridBackstage(String account, String password) { |
| | | Authentication authentication = null; |
| | | authentication = authenticationManager |
| | | .authenticate(new UsernamePasswordAuthenticationToken(account+"_7", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO) authentication.getPrincipal(); |
| | | authentication = |
| | | authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(account + "_7", password)); |
| | | LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal(); |
| | | String token = JWTTokenUtil.generateToken(loginUser); |
| | | String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser); |
| | | LoginReturnVO loginReturnVO=new LoginReturnVO(); |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setToken(token); |
| | | loginReturnVO.setRefreshToken(refeshToken); |
| | | return loginReturnVO; |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | | <artifactId>core</artifactId> |
| | | <version>3.1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | | <artifactId>javase</artifactId> |
| | | <version>3.1.0</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | */ |
| | | public class DictionItemConstants { |
| | | |
| | | private DictionItemConstants() { |
| | | throw new IllegalStateException("Utility class"); |
| | | } |
| | | |
| | | /** |
| | | * 文化层度字典编码 |
| | | */ |
| | | public static final String LC_CULTURE_LEVEL = "1156457421221564414"; |
| | | |
| | | private DictionItemConstants() { |
| | | throw new IllegalStateException("Utility class"); |
| | | } |
| | | } |
| | |
| | | * @author manailin |
| | | * @date 2021/06/16 |
| | | */ |
| | | public class LcApiConstants |
| | | { |
| | | |
| | | private LcApiConstants() { |
| | | throw new IllegalStateException("Utility class"); |
| | | } |
| | | public class LcApiConstants { |
| | | |
| | | /** |
| | | * 将浪潮对接接口中所需的固定账号名称,账号和密码登陆来获取token |
| | | */ |
| | | public static final String LC_UPLOAD_NAME ="18080799023"; |
| | | public static final String LC_UPLOAD_NAME = "18080799023"; |
| | | /** |
| | | * 将浪潮对接接口中所需的固定用户密码 |
| | | */ |
| | | public static final String LC_UPLOAD_PASSWORD ="123456"; |
| | | public static final String LC_UPLOAD_PASSWORD = "123456"; |
| | | /** |
| | | * 将浪潮对接接口中所需的token存在Redis里面的KEY |
| | | */ |
| | | public static final String LANG_CHAO_TOKEN ="lang_chao_token"; |
| | | public static final String LANG_CHAO_TOKEN = "lang_chao_token"; |
| | | /** |
| | | * 获取token |
| | | */ |
| | | public static final String GRID_GET_TOKEN_URL = "http://171.217.92.33:53303/aaToken?username=#username&password=#password"; |
| | | public static final String GRID_GET_TOKEN_URL = |
| | | "http://171.217.92.33:53303/aaToken?username=#username&password=#password"; |
| | | /** |
| | | * 提交事件登记(自处) |
| | | */ |
| | |
| | | /** |
| | | * 获取指定事件信息 |
| | | */ |
| | | public static final String GRID_APP_EVENT_INFO_DETAIL_URL = "http://171.217.92.33:53303/businessData/getAppointEventInfo"; |
| | | public static final String GRID_APP_EVENT_INFO_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getAppointEventInfo"; |
| | | /** |
| | | * 通过AREAID获取辖区网格树 |
| | | */ |
| | | public static final String GRID_GET_EVENT_INFO_AREA_ID_URL = "http://171.217.92.33:53303/area/getAreaGridTreeByAreaId"; |
| | | public static final String GRID_GET_EVENT_INFO_AREA_ID_URL = |
| | | "http://171.217.92.33:53303/area/getAreaGridTreeByAreaId"; |
| | | /** |
| | | * 通过AREAID获取辖区网格数据列表 |
| | | */ |
| | | public static final String GRID_GET_GRID_DATA_AREA_ID_URL = "http://171.217.92.33:53303/gridDefined/getGridInfoByAreaId"; |
| | | public static final String GRID_GET_GRID_DATA_AREA_ID_URL = |
| | | "http://171.217.92.33:53303/gridDefined/getGridInfoByAreaId"; |
| | | /** |
| | | * 获取所有或者根据姓名和工号查询,分页 |
| | | */ |
| | | public static final String GRID_GET_GETALL_SEARCH_PAGE_URL = "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp"; |
| | | public static final String GRID_GET_GETALL_SEARCH_PAGE_URL = |
| | | "http://171.217.92.33:53303/gridOperator/getAllOrSearchByPage?areaId=jhRxqEQp"; |
| | | /** |
| | | * 流动人口 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_PAGE_URL = |
| | | "http://171.217.92.33:53303/businessData/getFPVisitRecordByPageApp"; |
| | | |
| | | /** |
| | | * 下面的接口全部都是走访任务接口 |
| | | */ |
| | | /** |
| | | * 流动人口 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_PAGE_URL = "http://171.217.92.33:53303/businessData/getFPVisitRecordByPageApp"; |
| | | |
| | | |
| | | /** |
| | | * 流动人口 走访详情(民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_DETAIL_URL = "http://171.217.92.33:53303/businessData/getFPVisitRecordDetailByIdApp"; |
| | | |
| | | |
| | | public static final String VISIT_RECORD_FLOW_PERSON_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getFPVisitRecordDetailByIdApp"; |
| | | /** |
| | | * 流动人口 添加走访记录 (民警带领下工作或者自己走访) |
| | | */ |
| | | public static final String VISIT_RECORD_FLOW_PERSON_SAVE_URL = "http://171.217.92.33:53303/businessData/saveFpVisitRecordAppDock"; |
| | | |
| | | |
| | | public static final String VISIT_RECORD_FLOW_PERSON_SAVE_URL = |
| | | "http://171.217.92.33:53303/businessData/saveFpVisitRecordAppDock"; |
| | | /** |
| | | * 重点人员 日常管理 走访记录列表 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_PAGE_URL = "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordByPageApp"; |
| | | |
| | | |
| | | public static final String VISIT_RECORD_KEY_PERSON_PAGE_URL = |
| | | "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordByPageApp"; |
| | | /** |
| | | * 重点人员 日常管理 走访详情 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_DETAIL_URL = "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordDetailByIdApp"; |
| | | |
| | | |
| | | public static final String VISIT_RECORD_KEY_PERSON_DETAIL_URL = |
| | | "http://171.217.92.33:53303/businessData/getKeyPersonVisitRecordDetailByIdApp"; |
| | | /** |
| | | *重点人员 日常管理 添加走访记录 |
| | | * 重点人员 日常管理 添加走访记录 |
| | | */ |
| | | public static final String VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL = "http://171.217.92.33:53303/businessData/saveKeyPersonVisitRecordAppDock"; |
| | | public static final String VISIT_RECORD_KEY_PERSON_SAVE_REMOTE_URL = |
| | | "http://171.217.92.33:53303/businessData/saveKeyPersonVisitRecordAppDock"; |
| | | |
| | | private LcApiConstants() { |
| | | throw new IllegalStateException("Utility class"); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 浪潮接口请求返回结果对象 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
| | |
| | | */ |
| | | FALSE("0", "失败"), |
| | | /** |
| | | *浪潮接口请求返回成功枚举 |
| | | * 浪潮接口请求返回成功枚举 |
| | | */ |
| | | SUCCESS("200", "成功"); |
| | | |
| | |
| | | this.code = code; |
| | | this.result = result; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.api; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 攀枝花综治网格化-事件接口请求返回的对象 |
| | | * |
| | |
| | | */ |
| | | private String code; |
| | | /** |
| | | *返回消息信息 |
| | | * 返回消息信息 |
| | | */ |
| | | private String message; |
| | | /** |
| | | *返回对象信息 |
| | | * 返回对象信息 |
| | | */ |
| | | private String data; |
| | | /** |
| | | *返回的是否成功标识 |
| | | * 返回的是否成功标识 |
| | | */ |
| | | private Boolean success; |
| | | } |
| | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 攀枝花综治网格化 |
| | | * 浪潮重点人员走访接口,人员类型 |
| | | * 攀枝花综治网格化 浪潮重点人员走访接口,人员类型 |
| | | * |
| | | * @author manailin |
| | | * @date 2021/06/20 |
| | | */ |
| | |
| | | */ |
| | | XD(1, "p01_drug"), |
| | | /** |
| | | *浪潮接口请求参数:重精人员类型 |
| | | * 浪潮接口请求参数:重精人员类型 |
| | | */ |
| | | JS(2, "p01_trouble_schiz"), |
| | | /** |
| | |
| | | package com.panzhihua.common.constants; |
| | | |
| | | /** 字典表key |
| | | /** |
| | | * 字典表key |
| | | * |
| | | * @author xyh |
| | | * @date 2021/6/11 15:53 |
| | | */ |
| | | public class BcDictionaryConstants { |
| | | public class BcDictionaryConstants { |
| | | |
| | | /** |
| | | * 家庭关系 |
| | |
| | | * 政治面貌 |
| | | */ |
| | | public static final String POLITICAL_OUTLOOK = "political_outlook"; |
| | | |
| | | |
| | | } |
| | |
| | | * |
| | | * @author HUANGHONGFA |
| | | */ |
| | | public class Constants |
| | | { |
| | | public class Constants { |
| | | /** |
| | | * UTF-8 字符集 |
| | | */ |
| | |
| | | */ |
| | | public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; |
| | | |
| | | public static final String AES_KEY="35^*M@dp$5xDB&P@"; |
| | | public static final String AES_KEY = "35^*M@dp$5xDB&P@"; |
| | | |
| | | /** |
| | | * 商户平台默认角色权限默认字符串 |
| | | */ |
| | | public static final String SHOP_ROLE_KEY="shanghupingtai"; |
| | | public static final String SHOP_ROLE_KEY = "shanghupingtai"; |
| | | /** |
| | | * 商户平台超级管理员权限默认字符串 |
| | | */ |
| | | public static final String ADMIN_SHOP_ROLE_KEY="chaojiguanliyuan"; |
| | | public static final String ADMIN_SHOP_ROLE_KEY = "chaojiguanliyuan"; |
| | | /** |
| | | * 首页商城是否展示(1.是 2.否) |
| | | */ |
| | |
| | | /** |
| | | * 网格综治-默认角色权限默认字符串 |
| | | */ |
| | | public static final String GRID_DEFAULT_ROLE_KEY="grid_member_default_role"; |
| | | public static final String GRID_DEFAULT_ROLE_KEY = "grid_member_default_role"; |
| | | |
| | | public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = "https://www.psciio.com//idcard/57bf4104a76741cfabfead0bb8218307.jpg"; |
| | | public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = |
| | | "https://www.psciio.com//idcard/57bf4104a76741cfabfead0bb8218307.jpg"; |
| | | |
| | | public static final String ZZ_APP_TAG_LIST = "{\"list\":[\"流动人口\",\"户籍人口\",\"社区矫正\",\"吸毒人员\",\"重精患者\",\"刑满释放\"]}"; |
| | | |
| | | public static final String PROFIT_EXPLAIN = "<p>一、简介</p><p>活动期间内,居民发布随手拍内容可获得一定现金奖励,具体奖励金额以社区设置为准,最终由对应社区统一结算。</p><p>二、如何使用</p><p>居民获得收益后由对应社区结算,具体结算方式由社区根据实际情况进行处理。</p><p>三、如何获得</p><p>1.参与活动</p><p>活动期间内,用户可以在西区社区通“随手拍”板块,用照片和视频记录展示社区生活;</p><p>活动由所在社区添加管理,社区发布活动后居民可进行参与。</p><p>2. 社区审核</p><p>社区通过对用户发布内容的质量(优质、精良、普通内容)和价值进行审核,酌情对相关用户进行奖励;</p><p>3. 获得奖励</p><p>审核完成后,根据社区设置的内容质量奖励金额下发奖励。</p><p>若内容被工作人员驳回将不可获得奖励。</p><p> </p><p><br></p>"; |
| | | public static final String PROFIT_EXPLAIN = |
| | | "<p>一、简介</p><p>活动期间内,居民发布随手拍内容可获得一定现金奖励,具体奖励金额以社区设置为准,最终由对应社区统一结算。</p><p>二、如何使用</p><p>居民获得收益后由对应社区结算,具体结算方式由社区根据实际情况进行处理。</p><p>三、如何获得</p><p>1.参与活动</p><p>活动期间内,用户可以在西区社区通“随手拍”板块,用照片和视频记录展示社区生活;</p><p>活动由所在社区添加管理,社区发布活动后居民可进行参与。</p><p>2. 社区审核</p><p>社区通过对用户发布内容的质量(优质、精良、普通内容)和价值进行审核,酌情对相关用户进行奖励;</p><p>3. 获得奖励</p><p>审核完成后,根据社区设置的内容质量奖励金额下发奖励。</p><p>若内容被工作人员驳回将不可获得奖励。</p><p> </p><p><br></p>"; |
| | | |
| | | public static final String INTEGRAL_EXPLAIN = "积分说明"; |
| | | |
| | |
| | | /** |
| | | * ftp站点 |
| | | */ |
| | | public static final String FTPHOST="47.104.148.185"; |
| | | public static final String FTPHOST = "47.104.148.185"; |
| | | /** |
| | | * 端口号 |
| | | */ |
| | | public static final Integer FTPPORT=22; |
| | | public static final Integer FTPPORT = 22; |
| | | /** |
| | | * ftp访问用户名 |
| | | */ |
| | | public static final String FTPUSERNAME="root"; |
| | | public static final String FTPUSERNAME = "root"; |
| | | /** |
| | | * ftp访问密码 |
| | | */ |
| | | public static final String FTPPASSWORD="evanN7F2K5M6"; |
| | | public static final String FTPPASSWORD = "evanN7F2K5M6"; |
| | | /** |
| | | * excel模板 |
| | | */ |
| | | public static final String FTPFILEPATH_MUBAN="/mnt/data/ftp/muban/"; |
| | | public static final String FTPFILEPATH_MUBAN = "/mnt/data/ftp/muban/"; |
| | | /** |
| | | * 党员保存 |
| | | */ |
| | | public static final String FTPFILEPATH_IDCARD="/mnt/data/ftp/idcard/"; |
| | | public static final String FTPFILEPATH_IDCARD = "/mnt/data/ftp/idcard/"; |
| | | /** |
| | | * http访问路径 |
| | | */ |
| | | public static final String HTTP_URL="http://image.panzhihua.nhys.cdnhxx.com/"; |
| | | public static final String HTTP_URL = "http://image.panzhihua.nhys.cdnhxx.com/"; |
| | | } |
| | |
| | | **/ |
| | | public class HttpConstant { |
| | | |
| | | /**httpClient连接超时时间,单位毫秒 */ |
| | | public static final int CONNECT_TIMEOUT = 3*1000; |
| | | /** httpClient连接超时时间,单位毫秒 */ |
| | | public static final int CONNECT_TIMEOUT = 3 * 1000; |
| | | |
| | | /**httpClient请求获取数据的超时时间(即响应时间) 单位毫秒*/ |
| | | public static final int SOCKET_TIMEOUT = 10*1000; |
| | | /** httpClient请求获取数据的超时时间(即响应时间) 单位毫秒 */ |
| | | public static final int SOCKET_TIMEOUT = 10 * 1000; |
| | | |
| | | /**http连接池大小*/ |
| | | /** http连接池大小 */ |
| | | public static final int MAX_TOTAL = 10; |
| | | |
| | | /**分配给同一个route(路由)最大的并发连接数*/ |
| | | /** 分配给同一个route(路由)最大的并发连接数 */ |
| | | public static final int MAX_CONN_PER_ROUTE = 2; |
| | | |
| | | /**http连接是否是长连接*/ |
| | | /** http连接是否是长连接 */ |
| | | public static final boolean IS_KEEP_ALIVE = true; |
| | | |
| | | /**调用接口失败默认重新调用次数*/ |
| | | /** 调用接口失败默认重新调用次数 */ |
| | | public static final int REQ_TIMES = 3; |
| | | |
| | | /**utf-8编码*/ |
| | | /** utf-8编码 */ |
| | | public static final String UTF8_ENCODE = "UTF-8"; |
| | | |
| | | /** application/json */ |
| | |
| | | * |
| | | * @author huanghongfa |
| | | */ |
| | | public class HttpStatus |
| | | { |
| | | public class HttpStatus { |
| | | /** |
| | | * 操作成功 |
| | | */ |
| | |
| | | */ |
| | | public class PayCpmstant { |
| | | |
| | | //微信支付统一下单url地址 |
| | | public static final String UNIFIEDORDER_URL="https://api.mch.weixin.qq.com/pay/unifiedorder"; |
| | | //微信支付默认编码格式 |
| | | public static final String DEFAULT_ENCODING="UTF-8"; |
| | | //微信支付返回支付成功CODE |
| | | public static final String RETURN_CODE="SUCCESS"; |
| | | //微信支付返回支付成功MSG |
| | | public static final String RETURN_MSG="OK"; |
| | | //微信支付默认加密格式 |
| | | public static final String SIGN_TYPE="MD5"; |
| | | // 微信支付统一下单url地址 |
| | | public static final String UNIFIEDORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder"; |
| | | // 微信支付默认编码格式 |
| | | public static final String DEFAULT_ENCODING = "UTF-8"; |
| | | // 微信支付返回支付成功CODE |
| | | public static final String RETURN_CODE = "SUCCESS"; |
| | | // 微信支付返回支付成功MSG |
| | | public static final String RETURN_MSG = "OK"; |
| | | // 微信支付默认加密格式 |
| | | public static final String SIGN_TYPE = "MD5"; |
| | | } |
| | |
| | | **/ |
| | | public class SecurityConstants { |
| | | |
| | | public static final String ROLE_ALL="springsecurity:role:all";//平台所有权限存储在redis |
| | | public static final String ROLE_USER="springsecurity:role:";//某个用户的具体权限 |
| | | public static final String ROLE_APPLETS="applets";//小程序用户通用角色 |
| | | public static final String APPLETS_ACCESS_TOKEN ="APPLETS_ACCESS_TOKEN";//小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_TOKEN_TIME ="APPLETS_ACCESS_TOKEN_TIME";//小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_MEDIA_ID ="APPLETS_ACCESS_MEDIA_ID";//小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_MEDIA_ID_TIME ="APPLETS_ACCESS_MEDIA_ID_TIME";//小程序获取的access_token |
| | | public static final String ROLE_ALL = "springsecurity:role:all";// 平台所有权限存储在redis |
| | | public static final String ROLE_USER = "springsecurity:role:";// 某个用户的具体权限 |
| | | public static final String ROLE_APPLETS = "applets";// 小程序用户通用角色 |
| | | public static final String APPLETS_ACCESS_TOKEN = "APPLETS_ACCESS_TOKEN";// 小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_TOKEN_TIME = "APPLETS_ACCESS_TOKEN_TIME";// 小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_MEDIA_ID = "APPLETS_ACCESS_MEDIA_ID";// 小程序获取的access_token |
| | | public static final String APPLETS_ACCESS_MEDIA_ID_TIME = "APPLETS_ACCESS_MEDIA_ID_TIME";// 小程序获取的access_token |
| | | |
| | | public static final String ROLE_APPLETS_REAL_NAMED="applets:realnamed";//小程序用户实名角色 |
| | | public static final String ROLE_APPLETS_USER="applets:realnamed:user:";//小程序用户角色 |
| | | public static final String ROLE_APPLETS_REAL_NAMED = "applets:realnamed";// 小程序用户实名角色 |
| | | public static final String ROLE_APPLETS_USER = "applets:realnamed:user:";// 小程序用户角色 |
| | | } |
| | |
| | | **/ |
| | | public class TokenConstant { |
| | | |
| | | public static final String TOKEN_HEADER="Authorization"; |
| | | public static final String TOKEN_LOGOUT="token_logout"; |
| | | public static final String TOKEN_PRE="Bearer "; |
| | | public static final String TOKEN_USERINFO="token_userinfo"; |
| | | public static final String TOKEN_HEADER = "Authorization"; |
| | | public static final String TOKEN_LOGOUT = "token_logout"; |
| | | public static final String TOKEN_PRE = "Bearer "; |
| | | public static final String TOKEN_USERINFO = "token_userinfo"; |
| | | /** |
| | | * 30分钟 |
| | | */ |
| | | public static final int EXPIRETIME=300; |
| | | public static final Long EXPIRETIME_LONG = 300L; |
| | | public static final String SECRET="UTivpbn%n9O!KnnL"; |
| | | public static final int EXPIRETIME = 300; |
| | | public static final Long EXPIRETIME_LONG = 300L; |
| | | public static final String SECRET = "UTivpbn%n9O!KnnL"; |
| | | /** |
| | | * 24小时 |
| | | */ |
| | | public static final int EXPIRETIME_REFRESH=24; |
| | | public static final int EXPIRETIME_REFRESH = 24; |
| | | } |
| | |
| | | public static final String USER_ID = "user_id"; |
| | | public static final String LOGOUT_TOKEN = "logout:"; |
| | | 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 PHONE_PUT = "phone_put:"; |
| | | public static final String NEWS_ID = "news_media_id:"; |
| | | } |
| | |
| | | package com.panzhihua.common.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.exceptions.UnAuthenticationException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.AES; |
| | | |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | @Slf4j |
| | | public class BaseController { |
| | | public static void main(String[] args) { |
| | | byte[] bytes = AES.parseHexStr2Byte( |
| | | "5730CB290AD203B32D2FA4347CD54A50A684E16D2C7A4544CF352D54D8A763BA6652C323B13BEEE682A5095B8BCC76842225A914253CE84AFB6B58A9D1BE30A7992786E151A933FDEC6EBDCD1928CA68927047770F296F7541268149B34FDFCEF1340CF2266A041484744CB45B216EE8B4D96E243098F9CB3F661ACA7AF356C422BFE9A009FA478DF606A71DA7DBD776527E5120C3F13281BA8FC5587BACD5E403EE069762B5CF060BFA3CF4FD3417F5653CC178D2CA117284D85F442C0FAB076DB6F6D873B5363FAB93EBA9284CC87A5E97243EF4DC73F1ADA57BD9E9AAB2E4972AC3A4615B2DF6F9062BC04428D1B84B6C892A306F191B1D9DDBBB201D2767CE928020489AFC6BCFDC8A74F8C95080F74B4EC64AD1A6354B17A156B95AA9467C7461BD3C3F15F8F65BD7F3272184435D77003738B5B942EEA9603CFF249764718732595EC44DE4ED1BB763F9C88BAFACF5540E689FE84A4702E31D3D1D05BAC25C10F8E0C3948C777478537397BCB67D37066385DFCBDE3F4A53D6BA14481DBCB07E8452ACD2790A76669A9DE6D7080C8CFD9FB774035FCC3AC1C436581144969B7150318024A2E893FE926654E002097EB4735E49F3A9698A405969888A7D88A55A0FA60318C4A1E2D243BEE6D438"); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | System.out.println(decrypt); |
| | | String s = new String(decrypt); |
| | | System.out.println(s); |
| | | } |
| | | |
| | | /** |
| | | * 获取request对象 |
| | | */ |
| | | public HttpServletRequest getRequest() { |
| | | return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
| | | return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (empty) { |
| | | throw new UnAuthenticationException("获取登录人信息失败"); |
| | | } |
| | | // log.info("userInfo【{}】",userInfo); |
| | | // log.info("userInfo【{}】",userInfo); |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | // log.info("bytes【{}】",bytes); |
| | | // log.info("bytes【{}】",bytes); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | // log.info("decrypt【{}】",decrypt); |
| | | // log.info("decrypt【{}】",decrypt); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | return loginUserInfoVO; |
| | |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | return null; |
| | | // throw new UnAuthenticationException("获取登录人信息失败"); |
| | | // throw new UnAuthenticationException("获取登录人信息失败"); |
| | | } |
| | | // log.info("userInfo【{}】",userInfo); |
| | | // log.info("userInfo【{}】",userInfo); |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | // log.info("bytes【{}】",bytes); |
| | | // log.info("bytes【{}】",bytes); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | // log.info("decrypt【{}】",decrypt); |
| | | // log.info("decrypt【{}】",decrypt); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | return loginUserInfoVO; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | byte[] bytes = AES.parseHexStr2Byte("5730CB290AD203B32D2FA4347CD54A50A684E16D2C7A4544CF352D54D8A763BA6652C323B13BEEE682A5095B8BCC76842225A914253CE84AFB6B58A9D1BE30A7992786E151A933FDEC6EBDCD1928CA68927047770F296F7541268149B34FDFCEF1340CF2266A041484744CB45B216EE8B4D96E243098F9CB3F661ACA7AF356C422BFE9A009FA478DF606A71DA7DBD776527E5120C3F13281BA8FC5587BACD5E403EE069762B5CF060BFA3CF4FD3417F5653CC178D2CA117284D85F442C0FAB076DB6F6D873B5363FAB93EBA9284CC87A5E97243EF4DC73F1ADA57BD9E9AAB2E4972AC3A4615B2DF6F9062BC04428D1B84B6C892A306F191B1D9DDBBB201D2767CE928020489AFC6BCFDC8A74F8C95080F74B4EC64AD1A6354B17A156B95AA9467C7461BD3C3F15F8F65BD7F3272184435D77003738B5B942EEA9603CFF249764718732595EC44DE4ED1BB763F9C88BAFACF5540E689FE84A4702E31D3D1D05BAC25C10F8E0C3948C777478537397BCB67D37066385DFCBDE3F4A53D6BA14481DBCB07E8452ACD2790A76669A9DE6D7080C8CFD9FB774035FCC3AC1C436581144969B7150318024A2E893FE926654E002097EB4735E49F3A9698A405969888A7D88A55A0FA60318C4A1E2D243BEE6D438"); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | System.out.println(decrypt); |
| | | String s = new String(decrypt); |
| | | System.out.println(s); |
| | | } |
| | | |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum EldersAuthLevelEnum |
| | | { |
| | | ELDER80_89(1,"80_89周岁"), |
| | | ELDER90_99(2,"90_99周岁"), |
| | | ELDER9100_(3,"100周岁(含)以上"), |
| | | ; |
| | | public enum EldersAuthLevelEnum { |
| | | ELDER80_89(1, "80_89周岁"), ELDER90_99(2, "90_99周岁"), ELDER9100_(3, "100周岁(含)以上"),; |
| | | |
| | | private final int level; |
| | | private final String info; |
| | | |
| | | EldersAuthLevelEnum(int level, String info) |
| | | { |
| | | EldersAuthLevelEnum(int level, String info) { |
| | | this.level = level; |
| | | this.info = info; |
| | | } |
| | | |
| | | public static int getCode(int age){ |
| | | public static int getCode(int age) { |
| | | |
| | | if(80 <= age && age <= 89){ |
| | | if (80 <= age && age <= 89) { |
| | | return ELDER80_89.getLevel(); |
| | | }else if(90 <= age && age <= 99){ |
| | | return ELDER90_99.getLevel(); |
| | | }else if(100 <= age){ |
| | | } else if (90 <= age && age <= 99) { |
| | | return ELDER90_99.getLevel(); |
| | | } else if (100 <= age) { |
| | | return ELDER9100_.getLevel(); |
| | | } |
| | | return 0; |
| | |
| | | * @author lyq |
| | | */ |
| | | @Getter |
| | | public enum EventStatusEnum |
| | | { |
| | | DCL(1, "待走访"), |
| | | YJJ(2, "已走访"), |
| | | DYZ(3, "待验证"), |
| | | CGX(4, "草稿箱"), |
| | | YCX(5, "已撤销"), |
| | | YC(6, "异常"), |
| | | WZ(9, "未知"); |
| | | public enum EventStatusEnum { |
| | | DCL(1, "待走访"), YJJ(2, "已走访"), DYZ(3, "待验证"), CGX(4, "草稿箱"), YCX(5, "已撤销"), YC(6, "异常"), WZ(9, "未知"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | EventStatusEnum(Integer code, String name) |
| | | { |
| | | EventStatusEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** 走访任务状态 |
| | | /** |
| | | * 走访任务状态 |
| | | * |
| | | * @author xyh |
| | | * @date 2021/6/21 17:22 |
| | | */ |
| | | public enum EventTasksStatusEnum { |
| | | public enum EventTasksStatusEnum { |
| | | |
| | | DZF(1,"待走访"), |
| | | YJJ(2,"已走访") |
| | | ; |
| | | |
| | | DZF(1, "待走访"), YJJ(2, "已走访"); |
| | | |
| | | private final int code; |
| | | private final String name; |
| | | |
| | | EventTasksStatusEnum(int code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static String getName(int code) { |
| | | for (EventTasksStatusEnum item : EventTasksStatusEnum.values()) { |
| | | if (item.code == (code)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | EventTasksStatusEnum(int code, String name){ |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static String getName(int code){ |
| | | for (EventTasksStatusEnum item : EventTasksStatusEnum.values()) { |
| | | if (item.code == (code)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** 被走访人标签 |
| | | /** |
| | | * 被走访人标签 |
| | | * |
| | | * @author xyh |
| | | * @date 2021/6/21 17:22 |
| | | */ |
| | | public enum EventTasksVisitorTypeEnum { |
| | | |
| | | DZF(1,"待走访"), |
| | | JXZ(2,"进行中"), |
| | | ZJJJ(3,"自己解决"), |
| | | DYZ(4,"待验证"), |
| | | CG(5,"草稿"), |
| | | YCX(6,"已撤销"), |
| | | YC(7,"异常"), |
| | | ; |
| | | |
| | | DZF(1, "待走访"), JXZ(2, "进行中"), ZJJJ(3, "自己解决"), DYZ(4, "待验证"), CG(5, "草稿"), YCX(6, "已撤销"), YC(7, "异常"),; |
| | | |
| | | private final int code; |
| | | private final String name; |
| | | |
| | | EventTasksVisitorTypeEnum(int code, String name){ |
| | | EventTasksVisitorTypeEnum(int code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public static String getName(int code){ |
| | | public static String getName(int code) { |
| | | for (EventTasksVisitorTypeEnum item : EventTasksVisitorTypeEnum.values()) { |
| | | if (item.code == (code)) { |
| | | return item.name(); |
| | |
| | | * @Version 1.0 |
| | | **/ |
| | | public class EventType { |
| | | //当event_type_category是1填写事件分类 |
| | | // 当event_type_category是1填写事件分类 |
| | | // 1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 7 宣传教育 |
| | | public static Integer EMERGENCIES = 5; //5 突发事件 |
| | | public static Integer CONTRADICTION = 3; //3 矛盾纠纷 |
| | | public static Integer HAZARD=1; //1 治安隐患 |
| | | public static Integer UNSTABLE=4; //4 不稳定因素 |
| | | public static Integer PUBLIC=2; //2 公共服务 |
| | | public static Integer PROPAGANDA=7; //7 宣传教育 |
| | | public static Integer SPECIAL = 6; //6 特殊人群信息上报 |
| | | public static Integer EMERGENCIES = 5; // 5 突发事件 |
| | | public static Integer CONTRADICTION = 3; // 3 矛盾纠纷 |
| | | public static Integer HAZARD = 1; // 1 治安隐患 |
| | | public static Integer UNSTABLE = 4; // 4 不稳定因素 |
| | | public static Integer PUBLIC = 2; // 2 公共服务 |
| | | public static Integer PROPAGANDA = 7; // 7 宣传教育 |
| | | public static Integer SPECIAL = 6; // 6 特殊人群信息上报 |
| | | } |
| | |
| | | * @author manaiilin |
| | | */ |
| | | @Getter |
| | | public enum KeyPersonLabelEnum |
| | | { |
| | | XD(1, "吸毒人员"), |
| | | ZJ(2, "重精人员"), |
| | | XJ(3, "邪教人员"), |
| | | QT(4, "其他重点人员"); |
| | | public enum KeyPersonLabelEnum { |
| | | XD(1, "吸毒人员"), ZJ(2, "重精人员"), XJ(3, "邪教人员"), QT(4, "其他重点人员"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | KeyPersonLabelEnum(Integer code, String name) |
| | | { |
| | | KeyPersonLabelEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * desc 本地事件类型和浪潮接口对应的事件类型的对应关系 |
| | | * 本地事件类型1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 7宣传教育 |
| | | * desc 本地事件类型和浪潮接口对应的事件类型的对应关系 本地事件类型1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 7宣传教育 |
| | | * |
| | | * @author manaiilin |
| | | */ |
| | | @Getter |
| | | public enum LocalEventToLangChaoEventTypeEnum |
| | | { |
| | | ZA(1, "6","治安隐患"), |
| | | GG(2, "4","公共服务"), |
| | | MD(3, "5","矛盾纠纷"), |
| | | TF(5, "1b62afbccc2a4bb98125f999b7133242","突发事件"), |
| | | TSRQ(6, "7da14163537b4b7e9a73ae28f4a58b72","特殊人群信息上报"), |
| | | XC(8, "9306ca7327a44b5ca474426f2da0e206","宣传教育"); |
| | | public enum LocalEventToLangChaoEventTypeEnum { |
| | | ZA(1, "6", "治安隐患"), GG(2, "4", "公共服务"), MD(3, "5", "矛盾纠纷"), TF(5, "1b62afbccc2a4bb98125f999b7133242", "突发事件"), |
| | | TSRQ(6, "7da14163537b4b7e9a73ae28f4a58b72", "特殊人群信息上报"), XC(8, "9306ca7327a44b5ca474426f2da0e206", "宣传教育"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | private final String eventName; |
| | | |
| | | LocalEventToLangChaoEventTypeEnum(Integer code, String name,String eventName) |
| | | { |
| | | LocalEventToLangChaoEventTypeEnum(Integer code, String name, String eventName) { |
| | | this.code = code; |
| | | this.name = name; |
| | | this.eventName = eventName; |
| | | } |
| | | |
| | | public static String getCodeByName(Integer code) { |
| | | for (LocalEventToLangChaoEventTypeEnum item : LocalEventToLangChaoEventTypeEnum.values()) { |
| | | if (item.getCode().equals(code)) { |
| | |
| | | } |
| | | return ZA.getName(); |
| | | } |
| | | |
| | | public static String getEventNameByCode(Integer code) { |
| | | for (LocalEventToLangChaoEventTypeEnum item : LocalEventToLangChaoEventTypeEnum.values()) { |
| | | if (item.getCode().equals(code)) { |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum OpsHouseStatus |
| | | { |
| | | public enum OpsHouseStatus { |
| | | AUDIT(0, "待审核"), GROUNDING(1, "已上架"), REJECTED(2, "已驳回"), UNDERCARRIAGE(2, "已下架"); |
| | | |
| | | private final int code; |
| | | private final String info; |
| | | |
| | | OpsHouseStatus(int code, String info) |
| | | { |
| | | OpsHouseStatus(int code, String info) { |
| | | this.code = code; |
| | | this.info = info; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulCultureLevelEnum |
| | | { |
| | | XX(80, "小学"), |
| | | CZ(70, "初中"), |
| | | GZ(61, "高中"), |
| | | ZZ(40, "中专"), |
| | | DZ(31, "大专"), |
| | | BK(21, "本科"), |
| | | SS(14, "硕士"), |
| | | YJS(10, "研究生"), |
| | | BS(11, "博士"), |
| | | QT(90, "其他"), |
| | | WM(9, "文盲"); |
| | | public enum PopulCultureLevelEnum { |
| | | XX(80, "小学"), CZ(70, "初中"), GZ(61, "高中"), ZZ(40, "中专"), DZ(31, "大专"), BK(21, "本科"), SS(14, "硕士"), YJS(10, "研究生"), |
| | | BS(11, "博士"), QT(90, "其他"), WM(9, "文盲"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulCultureLevelEnum(Integer code, String name) |
| | | { |
| | | PopulCultureLevelEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author LYQ |
| | | */ |
| | | @Getter |
| | | public enum PopulHouseControlStatusEnum |
| | | { |
| | | CG(1, "常规"), |
| | | GZ(2, "关注"), |
| | | GK(3, "管控"); |
| | | public enum PopulHouseControlStatusEnum { |
| | | CG(1, "常规"), GZ(2, "关注"), GK(3, "管控"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulHouseControlStatusEnum(Integer code, String name) |
| | | { |
| | | PopulHouseControlStatusEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author LYQ |
| | | */ |
| | | @Getter |
| | | public enum PopulHousePurposeEnum |
| | | { |
| | | ZZ(1, "住宅"), |
| | | GY(2, "公寓"), |
| | | SS(3, "宿舍"), |
| | | CK(4, "仓库"), |
| | | QT(5, "其他"); |
| | | public enum PopulHousePurposeEnum { |
| | | ZZ(1, "住宅"), GY(2, "公寓"), SS(3, "宿舍"), CK(4, "仓库"), QT(5, "其他"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulHousePurposeEnum(Integer code, String name) |
| | | { |
| | | PopulHousePurposeEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author LYQ |
| | | */ |
| | | @Getter |
| | | public enum PopulHouseStatusEnum |
| | | { |
| | | ZI_ZHU(1, "自住"), |
| | | ZU_ZHU(2, "租住"), |
| | | QI_TA(3, "其他"); |
| | | public enum PopulHouseStatusEnum { |
| | | ZI_ZHU(1, "自住"), ZU_ZHU(2, "租住"), QI_TA(3, "其他"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulHouseStatusEnum(Integer code, String name) |
| | | { |
| | | PopulHouseStatusEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** 实有房屋使用类型 |
| | | /** |
| | | * 实有房屋使用类型 |
| | | * |
| | | * @author xyh |
| | | * @date 2021/6/11 9:33 |
| | | */ |
| | | public enum PopulHouseUseEnum { |
| | | public enum PopulHouseUseEnum { |
| | | |
| | | SELF(1,"是"), |
| | | RENT(0,"否"), |
| | | ; |
| | | SELF(1, "是"), RENT(0, "否"),; |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulHouseUseEnum(Integer code,String name){ |
| | | PopulHouseUseEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public static int getCodeByName(String name) { |
| | |
| | | } |
| | | return "其他"; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulIsOkEnum |
| | | { |
| | | public enum PopulIsOkEnum { |
| | | YES(1, "是"), NO(0, "否"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulIsOkEnum(Integer code, String name) |
| | | { |
| | | PopulIsOkEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulIsOksEnum |
| | | { |
| | | public enum PopulIsOksEnum { |
| | | YES(1, "是"), NO(2, "否"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulIsOksEnum(Integer code, String name) |
| | | { |
| | | PopulIsOksEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulIsRentEnum |
| | | { |
| | | public enum PopulIsRentEnum { |
| | | YES(1, "租住"), NO(0, "自住"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulIsRentEnum(Integer code, String name) |
| | | { |
| | | PopulIsRentEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulMarriageEnum |
| | | { |
| | | WH(10, "未婚"), |
| | | YH(20, "已婚"), |
| | | CH(21, "初婚"), |
| | | ZH(22, "再婚"), |
| | | FH(23, "复婚"), |
| | | SO(30, "丧偶"), |
| | | LH(40, "离婚"), |
| | | public enum PopulMarriageEnum { |
| | | WH(10, "未婚"), YH(20, "已婚"), CH(21, "初婚"), ZH(22, "再婚"), FH(23, "复婚"), SO(30, "丧偶"), LH(40, "离婚"), |
| | | |
| | | QT(60, "其他"), |
| | | WSM(90, "未说明的婚姻状况"); |
| | | QT(60, "其他"), WSM(90, "未说明的婚姻状况"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulMarriageEnum(Integer code, String name) |
| | | { |
| | | PopulMarriageEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author LYQ |
| | | */ |
| | | @Getter |
| | | public enum PopulOutOrLocalEnum |
| | | { |
| | | BD(1, "本地"), |
| | | WD(2, "外地"); |
| | | public enum PopulOutOrLocalEnum { |
| | | BD(1, "本地"), WD(2, "外地"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulOutOrLocalEnum(Integer code, String name) |
| | | { |
| | | PopulOutOrLocalEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author tangxb |
| | | */ |
| | | @Getter |
| | | public enum PopulPersonTypeEnum |
| | | { |
| | | HJ(1, "户籍人员"), |
| | | LS(2, "留守人员"), |
| | | WD(3, "外地人员"), |
| | | JW(4, "境外人员"); |
| | | public enum PopulPersonTypeEnum { |
| | | HJ(1, "户籍人员"), LS(2, "留守人员"), WD(3, "外地人员"), JW(4, "境外人员"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulPersonTypeEnum(Integer code, String name) |
| | | { |
| | | PopulPersonTypeEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulPoliticalOutlookEnum |
| | | { |
| | | PARTY_MEMBER(1, "中共党员"), |
| | | PROBATIONARY_PARTY_MEMBER(2, "中共预备党员"), |
| | | COMMUNIST_YOUTH_LEAGUE_MEMBER(3, "共青团员"), |
| | | MEMBERS_OF_THE_DEMOCRATIC_REVOLUTION(4, "民革党员"), |
| | | LEAGUE_MEMBER(5, "民盟盟员"), |
| | | MEMBER_OF_CIVIL_CONSTRUCTION(6, "民建会员"), |
| | | A_MEMBER_OF_THE_RURAL_LABOR_PARTY(8, "农工党党员"), |
| | | ZHIGONG_PARTY_MEMBER(9, "致公党党员"), |
| | | MEMBER_OF_JIUSAN_SOCIETY(10, "九三学社社员"), |
| | | MEMBER_OF_THE_TAIWAN_LEAGUE(11, "台盟盟员"), |
| | | INDEPENDENTS(12, "无党派人士"), |
| | | public enum PopulPoliticalOutlookEnum { |
| | | PARTY_MEMBER(1, "中共党员"), PROBATIONARY_PARTY_MEMBER(2, "中共预备党员"), COMMUNIST_YOUTH_LEAGUE_MEMBER(3, "共青团员"), |
| | | MEMBERS_OF_THE_DEMOCRATIC_REVOLUTION(4, "民革党员"), LEAGUE_MEMBER(5, "民盟盟员"), MEMBER_OF_CIVIL_CONSTRUCTION(6, "民建会员"), |
| | | A_MEMBER_OF_THE_RURAL_LABOR_PARTY(8, "农工党党员"), ZHIGONG_PARTY_MEMBER(9, "致公党党员"), |
| | | MEMBER_OF_JIUSAN_SOCIETY(10, "九三学社社员"), MEMBER_OF_THE_TAIWAN_LEAGUE(11, "台盟盟员"), INDEPENDENTS(12, "无党派人士"), |
| | | THE_MASSES(13, "群众"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulPoliticalOutlookEnum(Integer code, String name) |
| | | { |
| | | PopulPoliticalOutlookEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** 实有房屋使用类型 |
| | | /** |
| | | * 实有房屋使用类型 |
| | | * |
| | | * @author xyh |
| | | * @date 2021/6/11 9:33 |
| | | */ |
| | | public enum PopulRegiterNatureEnum { |
| | | |
| | | CZHK(1,"城镇户口"), |
| | | NCHK(0,"农村户口"), |
| | | ; |
| | | CZHK(1, "城镇户口"), NCHK(0, "农村户口"),; |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulRegiterNatureEnum(Integer code, String name){ |
| | | PopulRegiterNatureEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public static int getCodeByName(String name) { |
| | |
| | | } |
| | | return "其他"; |
| | | } |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum PopulRelationEnum |
| | | { |
| | | relation01(1, "本人"), |
| | | relation02(2, "户主"), |
| | | relation10(10, "配偶"), |
| | | relation11(11, "夫"), |
| | | relation12(12, "妻"), |
| | | public enum PopulRelationEnum { |
| | | relation01(1, "本人"), relation02(2, "户主"), relation10(10, "配偶"), relation11(11, "夫"), relation12(12, "妻"), |
| | | |
| | | relation20(20, "子"), |
| | | relation21(21, "独生子"), |
| | | relation22(22, "长子"), |
| | | relation23(23, "次子"), |
| | | relation24(24, "三子"), |
| | | relation25(25, "四子"), |
| | | relation26(26, "五子"), |
| | | relation27(27, "养子或继子"), |
| | | relation28(28, "女婿"), |
| | | relation29(29, "其他儿子"), |
| | | relation20(20, "子"), relation21(21, "独生子"), relation22(22, "长子"), relation23(23, "次子"), relation24(24, "三子"), |
| | | relation25(25, "四子"), relation26(26, "五子"), relation27(27, "养子或继子"), relation28(28, "女婿"), relation29(29, "其他儿子"), |
| | | |
| | | relation30(30, "女"), |
| | | relation31(31, "独生女"), |
| | | relation32(32, "长女"), |
| | | relation33(33, "次女"), |
| | | relation434(34, "三女"), |
| | | relation35(35, "四女"), |
| | | relation36(36, "五女"), |
| | | relation37(37, "养女或继女"), |
| | | relation38(38, "儿媳"), |
| | | relation39(39, "其他女儿"), |
| | | relation30(30, "女"), relation31(31, "独生女"), relation32(32, "长女"), relation33(33, "次女"), relation434(34, "三女"), |
| | | relation35(35, "四女"), relation36(36, "五女"), relation37(37, "养女或继女"), relation38(38, "儿媳"), relation39(39, "其他女儿"), |
| | | |
| | | relation40(40, "孙子、孙女或外孙子、外孙女"), |
| | | relation41(41, "孙子"), |
| | | relation42(42, "孙女"), |
| | | relation43(43, "外孙子"), |
| | | relation44(44, "外孙女"), |
| | | relation45(45, "孙媳妇或外孙媳妇"), |
| | | relation46(46, "孙女婿或外孙女婿"), |
| | | relation47(47, "曾孙子或外曾孙子"), |
| | | relation48(48, "曾孙女或外曾孙女"), |
| | | relation49(49, "其他孙子、孙女或外孙子、外孙女"), |
| | | relation40(40, "孙子、孙女或外孙子、外孙女"), relation41(41, "孙子"), relation42(42, "孙女"), relation43(43, "外孙子"), |
| | | relation44(44, "外孙女"), relation45(45, "孙媳妇或外孙媳妇"), relation46(46, "孙女婿或外孙女婿"), relation47(47, "曾孙子或外曾孙子"), |
| | | relation48(48, "曾孙女或外曾孙女"), relation49(49, "其他孙子、孙女或外孙子、外孙女"), |
| | | |
| | | relation50(50, "父母"), |
| | | relation51(51, "父亲"), |
| | | relation52(52, "母亲"), |
| | | relation53(53, "公公"), |
| | | relation54(54, "婆婆"), |
| | | relation55(55, "岳父"), |
| | | relation56(56, "岳母"), |
| | | relation57(57, "继父或养父"), |
| | | relation58(58, "继母或养母"), |
| | | relation50(50, "父母"), relation51(51, "父亲"), relation52(52, "母亲"), relation53(53, "公公"), relation54(54, "婆婆"), |
| | | relation55(55, "岳父"), relation56(56, "岳母"), relation57(57, "继父或养父"), relation58(58, "继母或养母"), |
| | | relation59(59, "其他父母关系"), |
| | | |
| | | relation60(60, "祖父母或外祖父母"), |
| | | relation61(61, "祖父"), |
| | | relation62(62, "祖母"), |
| | | relation63(63, "外祖父"), |
| | | relation64(64, "外祖母"), |
| | | relation65(65, "配偶的祖父母或外祖父母"), |
| | | relation66(66, "曾祖父"), |
| | | relation67(67, "曾祖母"), |
| | | relation68(68, "配偶的曾祖父母或外曾祖父母"), |
| | | relation69(69, "其他祖父母或外祖父母关系"), |
| | | relation60(60, "祖父母或外祖父母"), relation61(61, "祖父"), relation62(62, "祖母"), relation63(63, "外祖父"), |
| | | relation64(64, "外祖母"), relation65(65, "配偶的祖父母或外祖父母"), relation66(66, "曾祖父"), relation67(67, "曾祖母"), |
| | | relation68(68, "配偶的曾祖父母或外曾祖父母"), relation69(69, "其他祖父母或外祖父母关系"), |
| | | |
| | | relation70(70, "兄弟姐妹"), |
| | | relation71(71, "兄"), |
| | | relation72(72, "嫂"), |
| | | relation73(73, "弟"), |
| | | relation74(74, "弟媳"), |
| | | relation75(75, "姐姐"), |
| | | relation76(76, "姐夫"), |
| | | relation77(77, "妹妹"), |
| | | relation78(78, "妹夫"), |
| | | relation79(79, "其他兄弟姐妹"), |
| | | relation80(80, "其他"), |
| | | relation81(81, "伯父"), |
| | | relation82(82, "伯母"), |
| | | relation83(83, "叔父"), |
| | | relation84(84, "婶母"), |
| | | relation85(85, "舅父"), |
| | | relation86(86, "舅母"), |
| | | relation87(87, "姨夫"), |
| | | relation88(88, "姨母"), |
| | | relation89(89, "姑母"), |
| | | relation70(70, "兄弟姐妹"), relation71(71, "兄"), relation72(72, "嫂"), relation73(73, "弟"), relation74(74, "弟媳"), |
| | | relation75(75, "姐姐"), relation76(76, "姐夫"), relation77(77, "妹妹"), relation78(78, "妹夫"), relation79(79, "其他兄弟姐妹"), |
| | | relation80(80, "其他"), relation81(81, "伯父"), relation82(82, "伯母"), relation83(83, "叔父"), relation84(84, "婶母"), |
| | | relation85(85, "舅父"), relation86(86, "舅母"), relation87(87, "姨夫"), relation88(88, "姨母"), relation89(89, "姑母"), |
| | | |
| | | relation90(90, "姑父"), |
| | | relation91(91, "堂兄妹,堂姐妹"), |
| | | relation92(92, "表兄妹,表姐妹"), |
| | | relation93(93, "侄子"), |
| | | relation94(94, "侄女"), |
| | | relation95(95, "外甥"), |
| | | relation96(96, "外甥女"), |
| | | relation97(97, "其他亲属"), |
| | | relation99(99, "非亲属"); |
| | | relation90(90, "姑父"), relation91(91, "堂兄妹,堂姐妹"), relation92(92, "表兄妹,表姐妹"), relation93(93, "侄子"), |
| | | relation94(94, "侄女"), relation95(95, "外甥"), relation96(96, "外甥女"), relation97(97, "其他亲属"), relation99(99, "非亲属"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | PopulRelationEnum(Integer code, String name) |
| | | { |
| | | PopulRelationEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author llming |
| | | */ |
| | | @Getter |
| | | public enum RealAssetsCategoryType |
| | | { |
| | | public enum RealAssetsCategoryType { |
| | | PUBLIC(2, "公共设施"), BUILD(1, "建筑类"); |
| | | |
| | | private final int code; |
| | | private final String info; |
| | | |
| | | RealAssetsCategoryType(int code, String info) |
| | | { |
| | | RealAssetsCategoryType(int code, String info) { |
| | | this.code = code; |
| | | this.info = info; |
| | | } |
| | |
| | | * @author llming |
| | | */ |
| | | @Getter |
| | | public enum RealAssetsFloorType |
| | | { |
| | | public enum RealAssetsFloorType { |
| | | HIGN(1, "高层"), CENTRE(2, "中层"), LOW(3, "底层"); |
| | | |
| | | private final int code; |
| | | private final String info; |
| | | |
| | | RealAssetsFloorType(int code, String info) |
| | | { |
| | | RealAssetsFloorType(int code, String info) { |
| | | this.code = code; |
| | | this.info = info; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum SafeWordDangerLevelEnum |
| | | { |
| | | RED(1, "红色预警"), |
| | | ORANGE(2, "橙色预警"), |
| | | YELLOW(3, "黄色预警"), |
| | | BLUE(4, "蓝色预警"); |
| | | public enum SafeWordDangerLevelEnum { |
| | | RED(1, "红色预警"), ORANGE(2, "橙色预警"), YELLOW(3, "黄色预警"), BLUE(4, "蓝色预警"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | SafeWordDangerLevelEnum(Integer code, String name) |
| | | { |
| | | SafeWordDangerLevelEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum SafeWordStatusEnum |
| | | { |
| | | DCL(1, "待处理"), |
| | | YCL(2, "已处理"), |
| | | YZG(3, "已整改"); |
| | | public enum SafeWordStatusEnum { |
| | | DCL(1, "待处理"), YCL(2, "已处理"), YZG(3, "已整改"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | | |
| | | SafeWordStatusEnum(Integer code, String name) |
| | | { |
| | | SafeWordStatusEnum(Integer code, String name) { |
| | | this.code = code; |
| | | this.name = name; |
| | | } |
| | |
| | | * @author huanghongfa |
| | | */ |
| | | @Getter |
| | | public enum UserStatus |
| | | { |
| | | public enum UserStatus { |
| | | OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除"); |
| | | |
| | | private final String code; |
| | | private final String info; |
| | | |
| | | UserStatus(String code, String info) |
| | | { |
| | | UserStatus(String code, String info) { |
| | | this.code = code; |
| | | this.info = info; |
| | | } |
| | |
| | | package com.panzhihua.common.excel; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| | | import org.apache.poi.ss.usermodel.DataValidation; |
| | | import org.apache.poi.ss.usermodel.DataValidationConstraint; |
| | | import org.apache.poi.ss.usermodel.DataValidationHelper; |
| | | import org.apache.poi.ss.util.CellRangeAddressList; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| | | |
| | | /** |
| | | * 自定义拦截器.对第一列第一行和第二行的数据新增下拉框,显示 测试1 测试2 |
| | |
| | | |
| | | // 区间设置 第一列第一行和第二行的数据。由于第一行是头,所以第一、二行的数据实际上是第二三行 |
| | | CellRangeAddressList cellRangeAddressList = new CellRangeAddressList(1, 2000, 11, 11); |
| | | CellRangeAddressList cellRangeAddressList1 = new CellRangeAddressList(1, 2000, 4 ,4); |
| | | CellRangeAddressList cellRangeAddressList2 = new CellRangeAddressList(1, 2000, 6 ,6); |
| | | CellRangeAddressList cellRangeAddressList3 = new CellRangeAddressList(1, 2000, 13 ,13); |
| | | CellRangeAddressList cellRangeAddressList4 = new CellRangeAddressList(1, 2000, 14 ,14); |
| | | CellRangeAddressList cellRangeAddressList1 = new CellRangeAddressList(1, 2000, 4, 4); |
| | | CellRangeAddressList cellRangeAddressList2 = new CellRangeAddressList(1, 2000, 6, 6); |
| | | CellRangeAddressList cellRangeAddressList3 = new CellRangeAddressList(1, 2000, 13, 13); |
| | | CellRangeAddressList cellRangeAddressList4 = new CellRangeAddressList(1, 2000, 14, 14); |
| | | DataValidationHelper helper = writeSheetHolder.getSheet().getDataValidationHelper(); |
| | | DataValidationConstraint constraint = helper.createExplicitListConstraint(new String[] {"男", "女","未知"}); |
| | | DataValidationConstraint constraint1 = helper.createExplicitListConstraint(new String[] {"中共党员","中共预备党员","共青团员","民革党员","民盟盟员","民建会员","农工党党员","致公党党员","九三学社社员","台盟盟员","无党派人士","群众"}); |
| | | DataValidationConstraint constraint = helper.createExplicitListConstraint(new String[] {"男", "女", "未知"}); |
| | | DataValidationConstraint constraint1 = helper.createExplicitListConstraint(new String[] {"中共党员", "中共预备党员", |
| | | "共青团员", "民革党员", "民盟盟员", "民建会员", "农工党党员", "致公党党员", "九三学社社员", "台盟盟员", "无党派人士", "群众"}); |
| | | DataValidationConstraint constraint2 = helper.createExplicitListConstraint(new String[] {"本地", "外地"}); |
| | | DataValidationConstraint constraint3 = helper.createExplicitListConstraint(new String[] {"未婚", "已婚", "初婚", "再婚", "复婚", "丧偶", "离婚", "未说明的婚育状况"}); |
| | | DataValidationConstraint constraint4 = helper.createExplicitListConstraint(new String[] {"很好", "较好", "一般", "较差", "很差"}); |
| | | DataValidationConstraint constraint3 = |
| | | helper.createExplicitListConstraint(new String[] {"未婚", "已婚", "初婚", "再婚", "复婚", "丧偶", "离婚", "未说明的婚育状况"}); |
| | | DataValidationConstraint constraint4 = |
| | | helper.createExplicitListConstraint(new String[] {"很好", "较好", "一般", "较差", "很差"}); |
| | | DataValidation dataValidation = helper.createValidation(constraint2, cellRangeAddressList); |
| | | DataValidation dataValidation1 = helper.createValidation(constraint, cellRangeAddressList1); |
| | | DataValidation dataValidation2= helper.createValidation(constraint1, cellRangeAddressList2); |
| | | DataValidation dataValidation2 = helper.createValidation(constraint1, cellRangeAddressList2); |
| | | DataValidation dataValidation3 = helper.createValidation(constraint3, cellRangeAddressList3); |
| | | DataValidation dataValidation4= helper.createValidation(constraint4, cellRangeAddressList4); |
| | | DataValidation dataValidation4 = helper.createValidation(constraint4, cellRangeAddressList4); |
| | | |
| | | writeSheetHolder.getSheet().addValidationData(dataValidation); |
| | | writeSheetHolder.getSheet().addValidationData(dataValidation1); |
| | |
| | | package com.panzhihua.common.excel; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| | | import org.apache.poi.ss.usermodel.DataValidation; |
| | | import org.apache.poi.ss.usermodel.DataValidationConstraint; |
| | | import org.apache.poi.ss.usermodel.DataValidationHelper; |
| | | import org.apache.poi.ss.util.CellRangeAddressList; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import com.alibaba.excel.write.handler.SheetWriteHandler; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; |
| | | |
| | | /** |
| | | * 自定义拦截器.对第一列第一行和第二行的数据新增下拉框,显示 测试1 测试2 |
| | |
| | | |
| | | // 区间设置 第一列第一行和第二行的数据。由于第一行是头,所以第一、二行的数据实际上是第二三行 |
| | | CellRangeAddressList cellRangeAddressList1 = new CellRangeAddressList(1, 5000, 3, 3); |
| | | CellRangeAddressList cellRangeAddressList2 = new CellRangeAddressList(1, 5000, 4 ,4); |
| | | CellRangeAddressList cellRangeAddressList3 = new CellRangeAddressList(1, 5000, 25 ,25); |
| | | CellRangeAddressList cellRangeAddressList2 = new CellRangeAddressList(1, 5000, 4, 4); |
| | | CellRangeAddressList cellRangeAddressList3 = new CellRangeAddressList(1, 5000, 25, 25); |
| | | DataValidationHelper helper = writeSheetHolder.getSheet().getDataValidationHelper(); |
| | | DataValidationConstraint constraint1 = helper.createExplicitListConstraint(new String[] {"中共党员","中共预备党员","共青团员","民革党员","民盟盟员","民建会员","农工党党员","致公党党员","九三学社社员","台盟盟员","无党派人士","群众"}); |
| | | DataValidationConstraint constraint1 = helper.createExplicitListConstraint(new String[] {"中共党员", "中共预备党员", |
| | | "共青团员", "民革党员", "民盟盟员", "民建会员", "农工党党员", "致公党党员", "九三学社社员", "台盟盟员", "无党派人士", "群众"}); |
| | | DataValidationConstraint constraint2 = helper.createExplicitListConstraint(new String[] {"是", "否"}); |
| | | DataValidationConstraint constraint3 = helper.createExplicitListConstraint(new String[] {"本地", "外地"}); |
| | | DataValidation dataValidation1 = helper.createValidation(constraint1, cellRangeAddressList1); |
| | | DataValidation dataValidation2 = helper.createValidation(constraint2, cellRangeAddressList2); |
| | | DataValidation dataValidation3= helper.createValidation(constraint3, cellRangeAddressList3); |
| | | DataValidation dataValidation3 = helper.createValidation(constraint3, cellRangeAddressList3); |
| | | |
| | | writeSheetHolder.getSheet().addValidationData(dataValidation1); |
| | | writeSheetHolder.getSheet().addValidationData(dataValidation2); |
| | |
| | | package com.panzhihua.common.exceptions; |
| | | |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | import org.springframework.web.bind.annotation.ExceptionHandler; |
| | | import org.springframework.web.bind.annotation.RestControllerAdvice; |
| | | |
| | | import java.util.List; |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | public class GlobalExceptionCapture { |
| | | /** |
| | | * 拦截捕捉自定义异常 TokenException.class |
| | | * @param ex token 异常 |
| | | * |
| | | * @param ex |
| | | * token 异常 |
| | | * @return R 401 |
| | | */ |
| | | @ExceptionHandler(value = TokenException.class) |
| | | public R myErrorHandlerTokenException(TokenException ex) { |
| | | return R.fail(ex.getCode(),ex.getMsg()); |
| | | return R.fail(ex.getCode(), ex.getMsg()); |
| | | } |
| | | |
| | | /** |
| | | * 拦截捕捉自定义异常 PartyBuildingMemberException |
| | | * @param ex 党建异常 |
| | | * |
| | | * @param ex |
| | | * 党建异常 |
| | | * @return 异常信息 |
| | | */ |
| | | @ExceptionHandler(value = PartyBuildingMemberException.class) |
| | |
| | | |
| | | /** |
| | | * 拦截捕捉自定义异常 UnAuthenticationException.class |
| | | * @param ex 认证 异常 |
| | | * |
| | | * @param ex |
| | | * 认证 异常 |
| | | * @return R 401 |
| | | */ |
| | | @ExceptionHandler(value = UnAuthenticationException.class) |
| | | public R myErrorHandlerUnAuthenticationException(UnAuthenticationException ex) { |
| | | return R.fail(ex.getCode(),"没有登录"); |
| | | return R.fail(ex.getCode(), "没有登录"); |
| | | } |
| | | |
| | | /** |
| | | * 拦截捕捉自定义异常 UnAuthorizationException.class |
| | | * @param ex 权限 异常 |
| | | * |
| | | * @param ex |
| | | * 权限 异常 |
| | | * @return R 403 |
| | | */ |
| | | @ExceptionHandler(value = UnAuthorizationException.class) |
| | | public R myErrorHandlerUnAuthorizationException(UnAuthenticationException ex) { |
| | | return R.fail(ex.getCode(),"没有访问权限"); |
| | | return R.fail(ex.getCode(), "没有访问权限"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param ex 数据库异常 |
| | | * @param ex |
| | | * 数据库异常 |
| | | * @return |
| | | */ |
| | | @ExceptionHandler(value = java.sql.SQLSyntaxErrorException.class) |
| | | public R sqlSyntaxExcetption(Exception ex) { |
| | | log.error("数据库异常【{}】",ex.getMessage()); |
| | | log.error("数据库异常【{}】", ex.getMessage()); |
| | | return R.fail("sql语法错误"); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param ex 数据库异常 |
| | | * @param ex |
| | | * 数据库异常 |
| | | * @return |
| | | */ |
| | | @ExceptionHandler(value = java.sql.SQLException.class) |
| | | public R sqlException(Exception ex) { |
| | | log.error("数据库异常【{}】",ex.getMessage()); |
| | | log.error("数据库异常【{}】", ex.getMessage()); |
| | | return R.fail("sql错误"); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param ex 服务层业务异常 |
| | | * @param ex |
| | | * 服务层业务异常 |
| | | * @return |
| | | */ |
| | | @ExceptionHandler(value = ServiceException.class) |
| | | public R serviceException(ServiceException ex) { |
| | | log.error("服务层业务异常【{}】",ex.getMessage()); |
| | | log.error("服务层业务异常【{}】", ex.getMessage()); |
| | | return R.fail(ex.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 校验异常 |
| | | * @param ex valid |
| | | * |
| | | * @param ex |
| | | * valid |
| | | * @return 返回json |
| | | */ |
| | | @ExceptionHandler(value = MethodArgumentNotValidException.class) |
| | |
| | | StringBuilder errorMessage = new StringBuilder(); |
| | | if (result.hasErrors()) { |
| | | List<ObjectError> errors = result.getAllErrors(); |
| | | errors.forEach(p ->{ |
| | | FieldError fieldError = (FieldError) p; |
| | | errors.forEach(p -> { |
| | | FieldError fieldError = (FieldError)p; |
| | | errorMessage.append(fieldError.getDefaultMessage()); |
| | | errorMessage.append(" "); |
| | | }); |
| | | } |
| | | return R.fail(HttpStatus.BAD_REQUEST,errorMessage.toString()); |
| | | return R.fail(HttpStatus.BAD_REQUEST, errorMessage.toString()); |
| | | } |
| | | |
| | | // /** |
| | | // * 全局异常捕捉处理 |
| | | // * @param ex 所有运行时异常 |
| | | // * @return R 500 |
| | | // */ |
| | | // @ExceptionHandler(value = Exception.class) |
| | | // public R errorHandler(Exception ex) { |
| | | // log.error("捕捉到全局异常【{}】",ex.getMessage()); |
| | | // return R.fail("接口请求失败"); |
| | | // } |
| | | // /** |
| | | // * 全局异常捕捉处理 |
| | | // * @param ex 所有运行时异常 |
| | | // * @return R 500 |
| | | // */ |
| | | // @ExceptionHandler(value = Exception.class) |
| | | // public R errorHandler(Exception ex) { |
| | | // log.error("捕捉到全局异常【{}】",ex.getMessage()); |
| | | // return R.fail("接口请求失败"); |
| | | // } |
| | | } |
| | |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-30 11:01 |
| | | **/ |
| | | public class PartyBuildingMemberException extends RuntimeException{ |
| | | public class PartyBuildingMemberException extends RuntimeException { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg="党建异常"; |
| | | private String msg = "党建异常"; |
| | | private int code = 500; |
| | | |
| | | public PartyBuildingMemberException(String msg) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public PartyBuildingMemberException() { |
| | | super(); |
| | | |
| | | } |
| | | |
| | | public PartyBuildingMemberException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-28 14:13 |
| | | **/ |
| | | public class ServiceException extends RuntimeException{ |
| | | public class ServiceException extends RuntimeException { |
| | | |
| | | private String code; |
| | | private String msg; |
| | | private String data; |
| | | |
| | | public ServiceException() { |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | public ServiceException(String errorMsg) { |
| | | super(errorMsg); |
| | |
| | | this.msg = errorMsg; |
| | | } |
| | | |
| | | public ServiceException(String errorCode, String errorMsg,String data) { |
| | | public ServiceException(String errorCode, String errorMsg, String data) { |
| | | super(errorCode); |
| | | this.code = errorCode; |
| | | this.msg = errorMsg; |
| | |
| | | this.code = errorCode; |
| | | this.msg = errorMsg; |
| | | } |
| | | |
| | | |
| | | public String getErrorCode() { |
| | | return code; |
| | |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-24 15:01 |
| | | **/ |
| | | public class TokenException extends RuntimeException{ |
| | | public class TokenException extends RuntimeException { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg="token校验失败"; |
| | | private String msg = "token校验失败"; |
| | | private int code = 401; |
| | | |
| | | public TokenException(String msg) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public TokenException() { |
| | | super(); |
| | | |
| | | } |
| | | |
| | | public TokenException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | |
| | | * @author Mark sunlightcs@gmail.com |
| | | */ |
| | | public class UnAuthenticationException extends RuntimeException { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg="用户未认证"; |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg = "用户未认证"; |
| | | private int code = 401; |
| | | |
| | | public UnAuthenticationException(String msg) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | public UnAuthenticationException() { |
| | | super(); |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | } |
| | | public UnAuthenticationException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public UnAuthenticationException(String msg, int code) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | |
| | | public UnAuthenticationException(String msg, int code, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | public UnAuthenticationException() { |
| | | super(); |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | public UnAuthenticationException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | public UnAuthenticationException(String msg, int code) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | |
| | | public UnAuthenticationException(String msg, int code, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | } |
| | |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-11-24 14:26 |
| | | **/ |
| | | public class UnAuthorizationException extends RuntimeException{ |
| | | public class UnAuthorizationException extends RuntimeException { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg="无权限"; |
| | | private String msg = "无权限"; |
| | | private int code = 403; |
| | | |
| | | public UnAuthorizationException(String msg) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public UnAuthorizationException() { |
| | | super(); |
| | | |
| | | } |
| | | |
| | | public UnAuthorizationException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | |
| | | * @author Mark sunlightcs@gmail.com |
| | | */ |
| | | public class WeiXinException extends RuntimeException { |
| | | private static final long serialVersionUID = 1L; |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String msg="微信调用失败"; |
| | | private String msg = "微信调用失败"; |
| | | private int code = 500; |
| | | |
| | | public WeiXinException(String msg) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | public WeiXinException() { |
| | | super(); |
| | | super(msg); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | } |
| | | public WeiXinException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | } |
| | | public WeiXinException() { |
| | | super(); |
| | | |
| | | public WeiXinException(String msg, int code) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | } |
| | | |
| | | public WeiXinException(String msg, int code, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | public WeiXinException(String msg, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | public WeiXinException(String msg, int code) { |
| | | super(msg); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | public WeiXinException(String msg, int code, Throwable e) { |
| | | super(msg, e); |
| | | this.msg = msg; |
| | | this.code = code; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.interfaces; |
| | | |
| | | import java.lang.annotation.Documented; |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * 自定义操作日志注解 |
| | | * |
| | | * @author wu |
| | | */ |
| | | @Target(ElementType.METHOD) //注解放置的目标位置,METHOD是可注解在方法级别上 |
| | | @Retention(RetentionPolicy.RUNTIME) //注解在哪个阶段执行 |
| | | @Target(ElementType.METHOD) // 注解放置的目标位置,METHOD是可注解在方法级别上 |
| | | @Retention(RetentionPolicy.RUNTIME) // 注解在哪个阶段执行 |
| | | @Documented |
| | | public @interface OperLog { |
| | | String operModul() default ""; // 操作模块 |
| | | int operType() default 0; // 操作类型 业务类型(0其它 1新增 2修改 3删除) |
| | | |
| | | int operType() default 0; // 操作类型 业务类型(0其它 1新增 2修改 3删除) |
| | | } |
| | |
| | | |
| | | /** |
| | | * 商城后台操作日志注解 |
| | | * |
| | | * @author wu |
| | | */ |
| | | @Target(ElementType.METHOD) //注解放置的目标位置,METHOD是可注解在方法级别上 |
| | | @Retention(RetentionPolicy.RUNTIME) //注解在哪个阶段执行 |
| | | @Target(ElementType.METHOD) // 注解放置的目标位置,METHOD是可注解在方法级别上 |
| | | @Retention(RetentionPolicy.RUNTIME) // 注解在哪个阶段执行 |
| | | @Documented |
| | | public @interface ShopOperLog { |
| | | String operModul() default "shop"; |
| | | |
| | | /** |
| | | * 操作类型 |
| | | * 1.登录 |
| | | * 2.修改密码 |
| | | * 3.添加商品 |
| | | * 4.编辑商品 |
| | | * 5.下架商品 |
| | | * 6.上架商品 |
| | | * 7.删除商品 |
| | | * 8.取消订单 |
| | | * 9.发货 |
| | | * 10.配送 |
| | | * 11.查看订单详情 |
| | | * 12.导出订单 |
| | | * 13.导出资金流水 |
| | | * 操作类型 1.登录 2.修改密码 3.添加商品 4.编辑商品 5.下架商品 6.上架商品 7.删除商品 8.取消订单 9.发货 10.配送 11.查看订单详情 12.导出订单 13.导出资金流水 |
| | | * |
| | | * @return |
| | | */ |
| | | int operType() default 0; |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.exception.ExcelDataConvertException; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 便民服务导入监听 |
| | |
| | | @Slf4j |
| | | public class ComCvtServeExcelListen extends AnalysisEventListener<ComCvtServeExcelVO> { |
| | | |
| | | private static final int BATCH_COUNT = 5000; |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | private List<ComCvtServeExcelVO> list = new ArrayList<>(); |
| | | public ComCvtServeExcelListen(CommunityService communityService, Long communityId) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 5000; |
| | | private List<ComCvtServeExcelVO> list = new ArrayList<>(); |
| | | |
| | | @Override |
| | | public void invoke(ComCvtServeExcelVO comCvtServeExcelVO, AnalysisContext analysisContext) { |
| | |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | //清空list |
| | | // 清空list |
| | | list.clear(); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | R r = this.communityService.listSaveConvenientServeExcelVO(list, this.communityId);//确保最后遗留的数据保存在数据库中 |
| | | R r = this.communityService.listSaveConvenientServeExcelVO(list, this.communityId);// 确保最后遗留的数据保存在数据库中 |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 在转换异常 |
| | | * |
| | | * @param exception |
| | | * @param context |
| | | * @throws Exception |
| | |
| | | if (exception instanceof ExcelDataConvertException) { |
| | | ExcelDataConvertException excelDataConvertException = (ExcelDataConvertException)exception; |
| | | log.error("第{}行,第{}列解析异常,数据为:{}", excelDataConvertException.getRowIndex(), |
| | | excelDataConvertException.getColumnIndex(), excelDataConvertException.getCellData()); |
| | | }else{ |
| | | excelDataConvertException.getColumnIndex(), excelDataConvertException.getCellData()); |
| | | } else { |
| | | throw new ServiceException(exception.getMessage()); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.enums.EldersAuthLevelEnum; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 高龄老人导入监听 |
| | |
| | | @Slf4j |
| | | public class ComEldersAuthElderlyExcelListen extends AnalysisEventListener<EldersAuthElderlyExcelVO> { |
| | | |
| | | private static final int BATCH_COUNT = 3000; |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | private Long createBy; |
| | | private List<EldersAuthElderlyExcelVO> list = new ArrayList<>(); |
| | | |
| | | public ComEldersAuthElderlyExcelListen(CommunityService communityService, Long communityId, Long createBy){ |
| | | public ComEldersAuthElderlyExcelListen(CommunityService communityService, Long communityId, Long createBy) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 3000; |
| | | private List<EldersAuthElderlyExcelVO> list = new ArrayList<>(); |
| | | |
| | | /** |
| | | * @author cedoo |
| | |
| | | List<T> repeatEles = new ArrayList<T>(); |
| | | for (T t : datas) { |
| | | if (set.contains(t)) { |
| | | if(!repeatEles.contains(t)) { |
| | | if (!repeatEles.contains(t)) { |
| | | repeatEles.add(t); |
| | | } |
| | | } else { |
| | |
| | | |
| | | @Override |
| | | public void invoke(EldersAuthElderlyExcelVO eldersAuthElderlyExcelVO, AnalysisContext analysisContext) { |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getName())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getName())) { |
| | | throw new ServiceException("姓名不可为空"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsExist())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsExist())) { |
| | | eldersAuthElderlyExcelVO.setIsExist("是"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsBigAge())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsBigAge())) { |
| | | eldersAuthElderlyExcelVO.setIsBigAge("是"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIdCard())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIdCard())) { |
| | | throw new ServiceException("身份证号错误"); |
| | | } |
| | | |
| | | String idCard = eldersAuthElderlyExcelVO.getIdCard(); |
| | | if(idCard!=null && idCard.contains("x")){ |
| | | if (idCard != null && idCard.contains("x")) { |
| | | idCard = idCard.replaceAll("x", "X"); |
| | | } |
| | | eldersAuthElderlyExcelVO.setIdCard(idCard); |
| | |
| | | |
| | | list.add(eldersAuthElderlyExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if(list.size() >= BATCH_COUNT){ |
| | | if (list.size() >= BATCH_COUNT) { |
| | | doAfterAllAnalysed(analysisContext); |
| | | list.clear(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | //去重 |
| | | List<String> idcardList = new ArrayList<>(); |
| | | // 去重 |
| | | List<String> idcardList = new ArrayList<>(); |
| | | list.forEach(voInList -> { |
| | | idcardList.add(voInList.getIdCard()); |
| | | }); |
| | | List<String> repeatList = findRepeat(idcardList); |
| | | if(repeatList!=null && repeatList.size()>0){ |
| | | if (repeatList != null && repeatList.size() > 0) { |
| | | String repeatedId = StringUtils.join(repeatList, ","); |
| | | throw new ServiceException(repeatedId + " 身份证号码存在多条"); |
| | | } |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream().filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList,this.communityId,this.createBy); |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream() |
| | | .filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList, this.communityId, this.createBy); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 高龄老人导入监听 |
| | |
| | | @Slf4j |
| | | public class ComEldersAuthRecordExcelListen extends AnalysisEventListener<EldersAuthElderlyExcelVO> { |
| | | |
| | | private static final int BATCH_COUNT = 500; |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | private Long createBy; |
| | | private List<EldersAuthElderlyExcelVO> list = new ArrayList<>(); |
| | | |
| | | public ComEldersAuthRecordExcelListen(CommunityService communityService, Long communityId, Long createBy){ |
| | | public ComEldersAuthRecordExcelListen(CommunityService communityService, Long communityId, Long createBy) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 500; |
| | | private List<EldersAuthElderlyExcelVO> list = new ArrayList<>(); |
| | | |
| | | @Override |
| | | public void invoke(EldersAuthElderlyExcelVO eldersAuthElderlyExcelVO, AnalysisContext analysisContext) { |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getName())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getName())) { |
| | | throw new ServiceException("姓名不可为空"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsExist())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsExist())) { |
| | | eldersAuthElderlyExcelVO.setIsExist("是"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsBigAge())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIsBigAge())) { |
| | | eldersAuthElderlyExcelVO.setIsBigAge("是"); |
| | | } |
| | | if(StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIdCard())){ |
| | | if (StringUtils.isEmpty(eldersAuthElderlyExcelVO.getIdCard())) { |
| | | throw new ServiceException("身份证号错误"); |
| | | } |
| | | |
| | | eldersAuthElderlyExcelVO.setBirthday(DateUtils.getDateStringYMD(IdcardUtil.getBirthDate(eldersAuthElderlyExcelVO.getIdCard()))); |
| | | eldersAuthElderlyExcelVO.setLevel(EldersAuthLevelEnum.getCode(IdcardUtil.getAgeByIdCard(eldersAuthElderlyExcelVO.getIdCard()))); |
| | | eldersAuthElderlyExcelVO |
| | | .setBirthday(DateUtils.getDateStringYMD(IdcardUtil.getBirthDate(eldersAuthElderlyExcelVO.getIdCard()))); |
| | | eldersAuthElderlyExcelVO |
| | | .setLevel(EldersAuthLevelEnum.getCode(IdcardUtil.getAgeByIdCard(eldersAuthElderlyExcelVO.getIdCard()))); |
| | | list.add(eldersAuthElderlyExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if(list.size() >= BATCH_COUNT){ |
| | | if (list.size() >= BATCH_COUNT) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream().filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList,this.communityId,this.createBy); |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream() |
| | | .filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList, this.communityId, this.createBy); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | list.clear(); //清空list |
| | | list.clear(); // 清空list |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream().filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList,this.communityId,this.createBy); |
| | | List<EldersAuthElderlyExcelVO> newVoList = list.stream() |
| | | .filter(ListUtils.distinctByKey(EldersAuthElderlyExcelVO::getIdCard)).collect(Collectors.toList()); |
| | | R r = this.communityService.listSaveEldersAuthElderlyExcelVO(newVoList, this.communityId, this.createBy); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSON; |
| | |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 社区楼栋导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngBuildingExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private GridService gridService; |
| | | |
| | | private Long communityId; |
| | | |
| | | 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 GridService gridService; |
| | | private Long communityId; |
| | | private Map<Integer, String> headData; |
| | | |
| | | |
| | | public ComMngBuildingExcelListen(CommunityService communityService, Long communityId) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | |
| | | vo.setBuildFloorSum(0); |
| | | } |
| | | |
| | | |
| | | try { |
| | | vo.setEveryFloorSum(oneData.get(9) == null ? 0 : Integer.valueOf(oneData.get(9))); |
| | | } catch (Exception e1) { |
| | |
| | | R r = communityService.listSaveBuildingExcelVO(voList, communityId); |
| | | if (!R.isOk(r)) { |
| | | String errMsg = r.getMsg(); |
| | | List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg, ComMngPopulationImportErrorVO.class); |
| | | List<ComMngPopulationImportErrorVO> errorList = |
| | | JSON.parseArray(errMsg, ComMngPopulationImportErrorVO.class); |
| | | if (!errorList.isEmpty()) { |
| | | populationImportErrorVOList.addAll(errorList); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | }catch (NumberFormatException e){ |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 车辆导入监听 |
| | |
| | | @Slf4j |
| | | public class ComMngCarExcelListen extends AnalysisEventListener<ComMngCarExcelVO> { |
| | | |
| | | private static final int BATCH_COUNT = 100; |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | private List<ComMngCarExcelVO> list = new ArrayList<>(); |
| | | |
| | | public ComMngCarExcelListen(CommunityService communityService, Long communityId){ |
| | | public ComMngCarExcelListen(CommunityService communityService, Long communityId) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | private static final int BATCH_COUNT = 100; |
| | | private List<ComMngCarExcelVO> list = new ArrayList<>(); |
| | | @Override |
| | | public void invoke(ComMngCarExcelVO comMngCarExcelVO, AnalysisContext analysisContext) { |
| | | list.add(comMngCarExcelVO); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |
| | | if(list.size() >= BATCH_COUNT){ |
| | | if (list.size() >= BATCH_COUNT) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | R r = this.communityService.listSaveMngCarExcelVO(list,this.communityId); |
| | | R r = this.communityService.listSaveMngCarExcelVO(list, this.communityId); |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | | list.clear(); //清空list |
| | | list.clear(); // 清空list |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext analysisContext) { |
| | | log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); |
| | | R r = this.communityService.listSaveMngCarExcelVO(list,this.communityId);//确保最后遗留的数据保存在数据库中 |
| | | R r = this.communityService.listSaveMngCarExcelVO(list, this.communityId);// 确保最后遗留的数据保存在数据库中 |
| | | if (!R.isOk(r)) { |
| | | throw new ServiceException(r.getMsg()); |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.common.collect.Lists; |
| | | import com.panzhihua.common.constants.BcDictionaryConstants; |
| | | import com.panzhihua.common.enums.*; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationImportErrorVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngRealAssetsExcelVO; |
| | | 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 java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 实有人口导入监听 |
| | |
| | | @Slf4j |
| | | public class ComMngPopulationConfirmServeExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | private static int headSize = 0; |
| | | |
| | | private Map<Integer, String> headData; |
| | | |
| | | |
| | | public ComMngPopulationConfirmServeExcelListen(CommunityService communityService, Long communityId) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | /** |
| | | * 每隔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 Map<Integer, String> headData; |
| | | public ComMngPopulationConfirmServeExcelListen(CommunityService communityService, Long communityId) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | |
| | | 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())); |
| | | // } |
| | | |
| | | 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 { |
| | |
| | | List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationServeExcelVO vo = new ComMngPopulationServeExcelVO(); |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isNotEmpty(oneData.get(0)) || StringUtils.isNotEmpty(oneData.get(1))) { |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | |
| | | continue; |
| | | } |
| | | |
| | | //判断身份证号码位数 |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorPosition("第" + index + "行,第2列" + oneData.get(1)); |
| | |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(1)); |
| | | //根据身份证号码解析年龄以及性别 |
| | | //获取用户生日 |
| | | // 根据身份证号码解析年龄以及性别 |
| | | // 获取用户生日 |
| | | String birthday = vo.getCardNo().substring(6, 14); |
| | | if (StringUtils.isNotEmpty(birthday)) { |
| | | String year = birthday.substring(0, 4); |
| | |
| | | String day = birthday.substring(6, 8); |
| | | vo.setBirthday(year + "-" + month + "-" + day); |
| | | } |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | //获取用户性别 |
| | | // //设置用户年龄 |
| | | // vo.setAge(AgeUtils.getAgeFromBirthTime(birthday)); |
| | | // 获取用户性别 |
| | | int sex = Integer.parseInt(vo.getCardNo().substring(16, 17)); |
| | | if (sex % 2 == 1) { |
| | | vo.setSex(PopulSexEnum.nan.getCode()); |
| | |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(2))) { |
| | | // String nation = oneData.get(2); |
| | | // if(!nation.contains("族")){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第3列"); |
| | | // importErrorVO.setErrorMsg("您填写的民族格式有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } |
| | | // String nation = oneData.get(2); |
| | | // if(!nation.contains("族")){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第3列"); |
| | | // importErrorVO.setErrorMsg("您填写的民族格式有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } |
| | | vo.setNation(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | |
| | | // String ra = convertRelation(oneData.get(5)); |
| | | // String ra = convertRelation(oneData.get(5)); |
| | | |
| | | // String relation = dictMap.get(oneData.get(5)); |
| | | // if (StringUtils.isEmpty(relation)) { |
| | | //// vo.setRelationStr(ra); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } else { |
| | | // vo.setRelation(Integer.valueOf(relation)); |
| | | // } |
| | | // String relation = dictMap.get(oneData.get(5)); |
| | | // if (StringUtils.isEmpty(relation)) { |
| | | //// vo.setRelationStr(ra); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } else { |
| | | // vo.setRelation(Integer.valueOf(relation)); |
| | | // } |
| | | Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | vo.setRelation(6); |
| | | } else { |
| | | vo.setRelation(isOk); |
| | |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | // String ma = convertMarriage(oneData.get(19)); |
| | | // String ma = convertMarriage(oneData.get(19)); |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(19)); |
| | | if (isOk.equals(-1)) { |
| | | // vo.setMarriageStr(ma); |
| | | // vo.setMarriageStr(ma); |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorPosition("第" + index + "行,第20列"); |
| | | importErrorVO.setErrorMsg("您填写的婚姻状况有误"); |
| | |
| | | } |
| | | } |
| | | |
| | | //将重复的数据进行MD5加密实现去重 |
| | | String distinct = vo.getName() + vo.getCardNo() + vo.getRoad() + vo.getDoorNo() + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | // 将重复的数据进行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)) { |
| | |
| | | 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<ComMngPopulationServeExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationServeExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | // 客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationServeExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationServeExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | R r = communityService.listSavePopulationConfirm(newVoList, communityId); |
| | | if (!R.isOk(r)) { |
| | | String errMsg = r.getMsg(); |
| | | List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg, ComMngPopulationImportErrorVO.class); |
| | | List<ComMngPopulationImportErrorVO> errorList = |
| | | JSON.parseArray(errMsg, ComMngPopulationImportErrorVO.class); |
| | | if (!errorList.isEmpty()) { |
| | | populationImportErrorVOList.addAll(errorList); |
| | | } |
| | |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")) { |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.ComMngPopulationCorrectExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationCorrectMistakeExcelVO; |
| | | 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 cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 社区矫正人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationCorrectExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationCorrectExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationCorrectExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入社区矫正人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.CORRECT_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | 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<ComMngPopulationCorrectExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationCorrectMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationCorrectExcelVO vo = new ComMngPopulationCorrectExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(3))){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入社区矫正人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.CORRECT_POPULATION_ERROR_LIST; |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(3).length() != 18){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))){ |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(5))){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if(StringUtils.isEmpty(oneData.get(6))){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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 = PopulHouseUseEnum.getCodeByName(oneData.get(10)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(11).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(13)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | vo.setCensusRegister(oneData.get(15).trim()); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(16))){ |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(16)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的学历有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setCorrectPersonCode(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setOriginalCustodyplace(oneData.get(18).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | vo.setCorrectType(oneData.get(19).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setCaseType(oneData.get(20).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setSpecificCharge(oneData.get(21).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setOriginalTerm(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setOriginalTermBegin(DateUtil.parse(oneData.get(23).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(24))){ |
| | | vo.setOriginalTermEnd(DateUtil.parse(oneData.get(24).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(25))){ |
| | | vo.setCorrectBegin(DateUtil.parse(oneData.get(25).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setCorrectEnd(DateUtil.parse(oneData.get(26).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setReceiveMethod(oneData.get(27).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setReceiveMethod(oneData.get(27).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(28))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(28)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否累惯犯有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRecidivist(isOk); |
| | | }else { |
| | | vo.setIsRecidivist(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(29))){ |
| | | vo.setFourHistory(oneData.get(29).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(30))){ |
| | | vo.setThreeInvovle(oneData.get(30).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(31))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(31)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否建立矫正小组有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsCorrectGroup(isOk); |
| | | }else { |
| | | vo.setIsCorrectGroup(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(32))){ |
| | | vo.setCorrectGroupConstitute(oneData.get(32).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(33))){ |
| | | vo.setCorrectRelieveType(oneData.get(33).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(34))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(34)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否有脱管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsOutControl(isOk); |
| | | }else { |
| | | vo.setIsOutControl(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(35))){ |
| | | vo.setOutControlReason(oneData.get(35).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(36))){ |
| | | vo.setOutControlCorrect(oneData.get(36).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(37))){ |
| | | vo.setInspectOutControl(oneData.get(37).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(38))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(38)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否有漏管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsMissControl(isOk); |
| | | }else { |
| | | vo.setIsMissControl(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(39))){ |
| | | vo.setMissControlReason(oneData.get(39).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(40))){ |
| | | vo.setMissControlCorrect(oneData.get(40).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(41))){ |
| | | vo.setInspectMissControl(oneData.get(41).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(42))){ |
| | | vo.setRewardAndPunishiment(oneData.get(42).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(43))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(43)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否重新犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAgainCrime(isOk); |
| | | }else { |
| | | vo.setIsAgainCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(44))){ |
| | | vo.setAgainCrimeName(oneData.get(44).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(45))){ |
| | | vo.setPubishmentChange(oneData.get(45).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(46))){ |
| | | vo.setRemark(oneData.get(46).trim()); |
| | | } |
| | | vo.getUserTagStr().add("社区矫正"); |
| | | for (int i = 47; 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); |
| | | 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<ComMngPopulationCorrectExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationCorrectMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationCorrectExcelVO vo = new ComMngPopulationCorrectExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationCorrectExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationCorrectExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationCorrectExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationCorrectMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationCorrectMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(3).length() != 18) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))) { |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(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 = PopulHouseUseEnum.getCodeByName(oneData.get(10)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(11).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(13)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | vo.setCensusRegister(oneData.get(15).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | // Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(16)); |
| | | // if (isOk.equals(-1)) { |
| | | // index++; |
| | | // ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("您填写的学历有误"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | 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); |
| | | vo.setCultureLevel(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setCorrectPersonCode(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setOriginalCustodyplace(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setCorrectType(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setCaseType(oneData.get(20).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setSpecificCharge(oneData.get(21).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setOriginalTerm(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setOriginalTermBegin(DateUtil.parse(oneData.get(23).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setOriginalTermEnd(DateUtil.parse(oneData.get(24).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | vo.setCorrectBegin(DateUtil.parse(oneData.get(25).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setCorrectEnd(DateUtil.parse(oneData.get(26).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | vo.setReceiveMethod(oneData.get(27).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | vo.setReceiveMethod(oneData.get(27).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(28)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否累惯犯有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRecidivist(isOk); |
| | | } else { |
| | | vo.setIsRecidivist(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(29))) { |
| | | vo.setFourHistory(oneData.get(29).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(30))) { |
| | | vo.setThreeInvovle(oneData.get(30).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(31))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(31)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否建立矫正小组有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsCorrectGroup(isOk); |
| | | } else { |
| | | vo.setIsCorrectGroup(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(32))) { |
| | | vo.setCorrectGroupConstitute(oneData.get(32).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(33))) { |
| | | vo.setCorrectRelieveType(oneData.get(33).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(34))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(34)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否有脱管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsOutControl(isOk); |
| | | } else { |
| | | vo.setIsOutControl(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(35))) { |
| | | vo.setOutControlReason(oneData.get(35).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(36))) { |
| | | vo.setOutControlCorrect(oneData.get(36).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(37))) { |
| | | vo.setInspectOutControl(oneData.get(37).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(38))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(38)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否有漏管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsMissControl(isOk); |
| | | } else { |
| | | vo.setIsMissControl(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(39))) { |
| | | vo.setMissControlReason(oneData.get(39).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(40))) { |
| | | vo.setMissControlCorrect(oneData.get(40).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(41))) { |
| | | vo.setInspectMissControl(oneData.get(41).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(42))) { |
| | | vo.setRewardAndPunishiment(oneData.get(42).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(43))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(43)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否重新犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAgainCrime(isOk); |
| | | } else { |
| | | vo.setIsAgainCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(44))) { |
| | | vo.setAgainCrimeName(oneData.get(44).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(45))) { |
| | | vo.setPubishmentChange(oneData.get(45).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(46))) { |
| | | vo.setRemark(oneData.get(46).trim()); |
| | | } |
| | | vo.getUserTagStr().add("社区矫正"); |
| | | for (int i = 47; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationCorrectExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationCorrectExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationCorrectExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationCorrectMistakeExcelVO> list = JSONArray |
| | | .parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationCorrectMistakeExcelVO.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 setMistake(Map<Integer, String> map, ComMngPopulationCorrectMistakeExcelVO vo){ |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationCorrectMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(3)); |
| | |
| | | vo.setRemark(map.get(46)); |
| | | } |
| | | |
| | | private R mistakeExportPopulation(List<ComMngPopulationMistakeExcelVO> vo) { |
| | | //生成动态模板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 { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(vo, 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(); |
| | | } |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | return ma; |
| | | } |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | 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; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | |
| | | 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; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 邪教人员导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationCultExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationCultExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationCultExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入邪教人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.CULT_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.CULT_POPULATION_ERROR_LIST; |
| | | |
| | | 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<ComMngPopulationCultExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationCultMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationCultExcelVO vo = new ComMngPopulationCultExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(2))){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(2).length() != 18){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))){ |
| | | vo.setNation(oneData.get(3)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(4))){ |
| | | vo.setProfession(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(5)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setMarriage(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(6))){ |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(6)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(7))){ |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(7)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的政治面貌有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPoliticalOutlook(isOk); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(8))){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(8)); |
| | | if(StringUtils.isEmpty(oneData.get(9))){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(9).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setFloor(oneData.get(10).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setUnitNo(oneData.get(11).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(12))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))) { |
| | | vo.setHouseNo(oneData.get(12).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(13)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(14).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(15).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(15).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(16)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(17)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setCensusRegister(oneData.get(18).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | vo.setCultName(oneData.get(19).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setBasicSituation(oneData.get(20).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setJoinCultDate(DateUtil.parse(oneData.get(21).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(22)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否对外宣传有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsExternalPublicity(isOk); |
| | | }else { |
| | | vo.setIsExternalPublicity(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setRemark(oneData.get(23).trim()); |
| | | } |
| | | vo.getUserTagStr().add("邪教人员"); |
| | | for (int i = 24; 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); |
| | | 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<ComMngPopulationCultExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationCultMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationCultExcelVO vo = new ComMngPopulationCultExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationCultExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationCultExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationCultExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationCultMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationCultMistakeExcelVO.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); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(2).length() != 18) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))) { |
| | | vo.setNation(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | vo.setProfession(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(5)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setMarriage(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(6)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(7)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的政治面貌有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPoliticalOutlook(isOk); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(8))) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(8)); |
| | | if (StringUtils.isEmpty(oneData.get(9))) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(9).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setFloor(oneData.get(10).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setUnitNo(oneData.get(11).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(12))){ |
| | | // index++; |
| | | // ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | vo.setHouseNo(oneData.get(12).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(13)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(14).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(15).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(15).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(16)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(17)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setCensusRegister(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setCultName(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setBasicSituation(oneData.get(20).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setJoinCultDate(DateUtil.parse(oneData.get(21).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(22)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否对外宣传有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsExternalPublicity(isOk); |
| | | } else { |
| | | vo.setIsExternalPublicity(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setRemark(oneData.get(23).trim()); |
| | | } |
| | | vo.getUserTagStr().add("邪教人员"); |
| | | for (int i = 24; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationCultExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationCultExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationCultExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationCultMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationCultMistakeExcelVO.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 setMistake(Map<Integer, String> map, ComMngPopulationCultMistakeExcelVO vo){ |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationCultMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(2)); |
| | |
| | | vo.setRemark(map.get(23)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | return ma; |
| | | } |
| | | |
| | | return ra; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | 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; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | |
| | | 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.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | 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; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 残疾人导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationDisabilityExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationDisabilityExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationDisabilityExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入残疾人数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String Disability = Constants.DISABILITY_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String Disability = Constants.DISABILITY_POPULATION_ERROR_LIST; |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationDisabilityExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationDisabilityMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationDisabilityExcelVO vo = new ComMngPopulationDisabilityExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(2))){ |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(2).length() != 18){ |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))){ |
| | | vo.setCertificateSituation(oneData.get(3)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(4))){ |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(4)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | vo.setNation(oneData.get(5)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(6))){ |
| | | vo.setDisType(oneData.get(6)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(7))){ |
| | | vo.setDisLevel(oneData.get(7)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))){ |
| | | vo.setPhone(oneData.get(8)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(9))){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(9)); |
| | | if(StringUtils.isEmpty(oneData.get(10))){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(10).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setFloor(oneData.get(11).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(12))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))) { |
| | | vo.setUnitNo(oneData.get(12).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(13))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))) { |
| | | vo.setHouseNo(oneData.get(13).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(15).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(16).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(16).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(17)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(18)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(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))){ |
| | | vo.setRemark(oneData.get(20).trim()); |
| | | } |
| | | vo.getUserTagStr().add("残疾人"); |
| | | for (int i = 21; 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); |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationDisabilityExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationDisabilityMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationDisabilityExcelVO vo = new ComMngPopulationDisabilityExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationDisabilityExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationDisabilityExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationDisabilityExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationDisabilityMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationDisabilityMistakeExcelVO.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(Disability,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", Disability); |
| | | }else{ |
| | | log.info("业务层处理逻辑失败"); |
| | | if(!mistakes.isEmpty()){ |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(Disability,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", Disability); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(2).length() != 18) { |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))) { |
| | | vo.setCertificateSituation(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(4)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setNation(oneData.get(5)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setDisType(oneData.get(6)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setDisLevel(oneData.get(7)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setPhone(oneData.get(8)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(9))) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(9)); |
| | | if (StringUtils.isEmpty(oneData.get(10))) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(10).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setFloor(oneData.get(11).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(12))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | vo.setUnitNo(oneData.get(12).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(13))){ |
| | | // index++; |
| | | // ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | // setDisabilityMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | vo.setHouseNo(oneData.get(13).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | index++; |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(15).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(16).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(16).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(17)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(18)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDisabilityMistakeExcelVO mistake = |
| | | new ComMngPopulationDisabilityMistakeExcelVO(); |
| | | setDisabilityMistake(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))) { |
| | | vo.setRemark(oneData.get(20).trim()); |
| | | } |
| | | vo.getUserTagStr().add("残疾人"); |
| | | for (int i = 21; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationDisabilityExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationDisabilityExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationDisabilityExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationDisabilityMistakeExcelVO> list = JSONArray |
| | | .parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationDisabilityMistakeExcelVO.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(Disability, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", Disability); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(Disability, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", Disability); |
| | | } |
| | | } |
| | | } 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 setDisabilityMistake(Map<Integer, String> map, ComMngPopulationDisabilityMistakeExcelVO vo){ |
| | | private void setDisabilityMistake(Map<Integer, String> map, ComMngPopulationDisabilityMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(2)); |
| | |
| | | vo.setRemark(map.get(20)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | return ma; |
| | | } |
| | | |
| | | return ra; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.ComMngPopulationDrugExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDrugMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.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 cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 吸毒人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationDrugExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationDrugExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationDrugExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | 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.DRUG_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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.DRUG_POPULATION_ERROR_LIST; |
| | | |
| | | 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<ComMngPopulationDrugExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationDrugMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationDrugExcelVO vo = new ComMngPopulationDrugExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(3))){ |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(3).length() != 18){ |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))){ |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(5))){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if(StringUtils.isEmpty(oneData.get(6))){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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 = PopulHouseUseEnum.getCodeByName(oneData.get(10)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(11).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(13)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | vo.setCensusRegister(oneData.get(15).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | vo.setFirstDate(DateUtil.parse(oneData.get(16).trim(), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setControlSituation(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setControlPerson(oneData.get(18).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | vo.setControlPersonPhone(oneData.get(19).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setHelpSituation(oneData.get(20).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setHelpPerson(oneData.get(21).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setHelpPersonPhone(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setDrugReason(oneData.get(23).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(24))){ |
| | | vo.setDrugResult(oneData.get(24).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(25))){ |
| | | vo.setHaveCrime(oneData.get(25).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setCrimeSutiation(oneData.get(26).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setRemark(oneData.get(27).trim()); |
| | | } |
| | | vo.getUserTagStr().add("吸毒人员"); |
| | | for (int i = 28; 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); |
| | | 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<ComMngPopulationDrugExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationDrugMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationDrugExcelVO vo = new ComMngPopulationDrugExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationDrugExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationDrugExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationDrugExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationDrugMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationDrugMistakeExcelVO.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); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(3).length() != 18) { |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))) { |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(5))) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(5)); |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(6).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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++; |
| | | // ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | // setDrugMistake(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 = PopulHouseUseEnum.getCodeByName(oneData.get(10)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | index++; |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(11).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(12).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(13)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO(); |
| | | setDrugMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | vo.setCensusRegister(oneData.get(15).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setFirstDate(DateUtil.parse(oneData.get(16).trim(), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setControlSituation(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setControlPerson(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setControlPersonPhone(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setHelpSituation(oneData.get(20).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setHelpPerson(oneData.get(21).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setHelpPersonPhone(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setDrugReason(oneData.get(23).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setDrugResult(oneData.get(24).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | vo.setHaveCrime(oneData.get(25).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setCrimeSutiation(oneData.get(26).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | vo.setRemark(oneData.get(27).trim()); |
| | | } |
| | | vo.getUserTagStr().add("吸毒人员"); |
| | | for (int i = 28; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationDrugExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationDrugExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationDrugExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationDrugMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationDrugMistakeExcelVO.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 setDrugMistake(Map<Integer, String> map, ComMngPopulationDrugMistakeExcelVO vo){ |
| | | private void setDrugMistake(Map<Integer, String> map, ComMngPopulationDrugMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(3)); |
| | |
| | | vo.setRemark(map.get(27)); |
| | | } |
| | | |
| | | private R mistakeExportPopulation(List<ComMngPopulationMistakeExcelVO> vo) { |
| | | //生成动态模板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 { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(vo, 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(); |
| | | } |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | return ma; |
| | | } |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.ComMngPopulationMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationKeyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationKeyMistakeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.ComMngPopulationKeyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationKeyMistakeExcelVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @description: 重点上访人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationKeyExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationKeyExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationKeyExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入重点上访人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.KEY_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.KEY_POPULATION_ERROR_LIST; |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationKeyExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationKeyMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationKeyExcelVO vo = new ComMngPopulationKeyExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(3))){ |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(3).length() != 18){ |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))){ |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | vo.setNativePlace(oneData.get(5)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(6))){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(6)); |
| | | if(StringUtils.isEmpty(oneData.get(7))){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(11)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(12).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(15)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | vo.setCensusRegister(oneData.get(16).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setRemark(oneData.get(17).trim()); |
| | | } |
| | | vo.getUserTagStr().add("重点人员"); |
| | | for (int i = 18; 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); |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationKeyExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationKeyMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationKeyExcelVO vo = new ComMngPopulationKeyExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationKeyExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationKeyExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationKeyExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationKeyMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationKeyMistakeExcelVO.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); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(3).length() != 18) { |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))) { |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setNativePlace(oneData.get(5)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(6)); |
| | | if (StringUtils.isEmpty(oneData.get(7))) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | // setKeyMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(11)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | index++; |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(12).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO(); |
| | | setKeyMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setCensusRegister(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setRemark(oneData.get(17).trim()); |
| | | } |
| | | vo.getUserTagStr().add("重点人员"); |
| | | for (int i = 18; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationKeyExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationKeyExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationKeyExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationKeyMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationKeyMistakeExcelVO.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 setKeyMistake(Map<Integer, String> map, ComMngPopulationKeyMistakeExcelVO vo){ |
| | | private void setKeyMistake(Map<Integer, String> map, ComMngPopulationKeyMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(3)); |
| | |
| | | vo.setRemark(map.get(17)); |
| | | } |
| | | |
| | | private R mistakeExportPopulation(List<ComMngPopulationMistakeExcelVO> vo) { |
| | | //生成动态模板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 { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(vo, 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(); |
| | | } |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | return ma; |
| | | } |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | 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; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.fastjson.JSONArray; |
| | |
| | | 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.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | 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; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 低保户导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationLowSecurityExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationLowSecurityExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationLowSecurityExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入低保户数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String LowSecurity = Constants.LOWSECURITY_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String LowSecurity = Constants.LOWSECURITY_POPULATION_ERROR_LIST; |
| | | |
| | | 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", "yyyy/MM", "yyyy/M", "yyyy-M", "yyyy-MM"}; |
| | | ArrayList<ComMngPopulationLowSecurityExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationLowSecurityMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationLowSecurityExcelVO vo = new ComMngPopulationLowSecurityExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(2))){ |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(2).length() != 18){ |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))){ |
| | | vo.setPhone(oneData.get(3)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(4))){ |
| | | vo.setRegion(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | vo.setFamilyCode(oneData.get(5)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(6))){ |
| | | vo.setGroupName(oneData.get(6)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(7))){ |
| | | vo.setClassifiedRescueCategory(oneData.get(7)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))){ |
| | | vo.setApplyDate(DateUtil.parse(oneData.get(8), parsePatterns)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))){ |
| | | vo.setHouseHolderName(oneData.get(9)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))){ |
| | | vo.setHouseHolderCardNo(oneData.get(10)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | vo.setHouseHolderCode(oneData.get(11)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(12))){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(12)); |
| | | if(StringUtils.isEmpty(oneData.get(13))){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(13).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(14))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))) { |
| | | vo.setFloor(oneData.get(14).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(15))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))) { |
| | | vo.setUnitNo(oneData.get(15).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(16))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setHouseNo(oneData.get(16).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(17)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(18).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(19).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(19).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(20)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(21)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setCensusRegister(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setResidencePostalCode(oneData.get(23).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(24))){ |
| | | vo.setSalvageCertificateNo(oneData.get(24).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(25))){ |
| | | vo.setGuaranteedPopulationNumber(Integer.valueOf(oneData.get(25).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setFamilyPopulationNumber(Integer.valueOf(oneData.get(26).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setAccountPerson(oneData.get(27).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(28))){ |
| | | vo.setAccountBank(oneData.get(28).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(29))){ |
| | | vo.setAccountCardNo(oneData.get(29).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(30))){ |
| | | vo.setBankAccount(oneData.get(30).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(31))){ |
| | | vo.setSupportInstitutions(oneData.get(31).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(32))){ |
| | | vo.setDistributionMethod(oneData.get(32).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(33))){ |
| | | vo.setGuaranteedAmount(new BigDecimal(oneData.get(33).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(34))){ |
| | | vo.setReallocationAmount(new BigDecimal(oneData.get(34).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(35))){ |
| | | vo.setDifferenceReliefAmount(new BigDecimal(oneData.get(35).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(36))){ |
| | | vo.setClassifiedInsuredAmount(new BigDecimal(oneData.get(36).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(37))){ |
| | | vo.setTotalMonthlyFamilyIncome(new BigDecimal(oneData.get(37).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(38))){ |
| | | vo.setAverageMonthlyFamilyIncome(new BigDecimal(oneData.get(38).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(39))){ |
| | | vo.setTotalMonthlyFamilyExpenditure(new BigDecimal(oneData.get(39).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(40))){ |
| | | vo.setLng(oneData.get(40).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(41))){ |
| | | vo.setLat(oneData.get(41).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(42))){ |
| | | vo.setOriginateDate(oneData.get(42).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(43))){ |
| | | vo.setNursingFee(new BigDecimal(oneData.get(43).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(44))){ |
| | | vo.setApplyReason(oneData.get(44).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(45))){ |
| | | vo.setReviewComment(oneData.get(45).trim()); |
| | | } |
| | | vo.getUserTagStr().add("低保户"); |
| | | for (int i = 46; 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); |
| | | 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", "yyyy/MM", "yyyy/M", "yyyy-M", "yyyy-MM"}; |
| | | ArrayList<ComMngPopulationLowSecurityExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationLowSecurityMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationLowSecurityExcelVO vo = new ComMngPopulationLowSecurityExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationLowSecurityExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationLowSecurityExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationLowSecurityExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationLowSecurityMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationLowSecurityMistakeExcelVO.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(LowSecurity,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", LowSecurity); |
| | | }else{ |
| | | log.info("业务层处理逻辑失败"); |
| | | if(!mistakes.isEmpty()){ |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(LowSecurity,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", LowSecurity); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(2).length() != 18) { |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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(3))) { |
| | | vo.setPhone(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(4))) { |
| | | vo.setRegion(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setFamilyCode(oneData.get(5)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setGroupName(oneData.get(6)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setClassifiedRescueCategory(oneData.get(7)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setApplyDate(DateUtil.parse(oneData.get(8), parsePatterns)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setHouseHolderName(oneData.get(9)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseHolderCardNo(oneData.get(10)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setHouseHolderCode(oneData.get(11)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(12))) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(12)); |
| | | if (StringUtils.isEmpty(oneData.get(13))) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(13).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(14))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | vo.setFloor(oneData.get(14).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(15))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | vo.setUnitNo(oneData.get(15).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(16))){ |
| | | // index++; |
| | | // ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | // setLowSecurityMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setHouseNo(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(17)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = |
| | | new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | index++; |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(18).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = |
| | | new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(19).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = |
| | | new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(19).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(20)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = |
| | | new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(21)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationLowSecurityMistakeExcelVO mistake = |
| | | new ComMngPopulationLowSecurityMistakeExcelVO(); |
| | | setLowSecurityMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setCensusRegister(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setResidencePostalCode(oneData.get(23).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setSalvageCertificateNo(oneData.get(24).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | vo.setGuaranteedPopulationNumber(Integer.valueOf(oneData.get(25).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setFamilyPopulationNumber(Integer.valueOf(oneData.get(26).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | vo.setAccountPerson(oneData.get(27).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | vo.setAccountBank(oneData.get(28).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(29))) { |
| | | vo.setAccountCardNo(oneData.get(29).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(30))) { |
| | | vo.setBankAccount(oneData.get(30).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(31))) { |
| | | vo.setSupportInstitutions(oneData.get(31).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(32))) { |
| | | vo.setDistributionMethod(oneData.get(32).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(33))) { |
| | | vo.setGuaranteedAmount(new BigDecimal(oneData.get(33).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(34))) { |
| | | vo.setReallocationAmount(new BigDecimal(oneData.get(34).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(35))) { |
| | | vo.setDifferenceReliefAmount( |
| | | new BigDecimal(oneData.get(35).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(36))) { |
| | | vo.setClassifiedInsuredAmount( |
| | | new BigDecimal(oneData.get(36).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(37))) { |
| | | vo.setTotalMonthlyFamilyIncome( |
| | | new BigDecimal(oneData.get(37).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(38))) { |
| | | vo.setAverageMonthlyFamilyIncome( |
| | | new BigDecimal(oneData.get(38).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(39))) { |
| | | vo.setTotalMonthlyFamilyExpenditure( |
| | | new BigDecimal(oneData.get(39).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(40))) { |
| | | vo.setLng(oneData.get(40).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(41))) { |
| | | vo.setLat(oneData.get(41).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(42))) { |
| | | vo.setOriginateDate(oneData.get(42).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(43))) { |
| | | vo.setNursingFee(new BigDecimal(oneData.get(43).trim()).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(44))) { |
| | | vo.setApplyReason(oneData.get(44).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(45))) { |
| | | vo.setReviewComment(oneData.get(45).trim()); |
| | | } |
| | | vo.getUserTagStr().add("低保户"); |
| | | for (int i = 46; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationLowSecurityExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationLowSecurityExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationLowSecurityExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationLowSecurityMistakeExcelVO> list = JSONArray |
| | | .parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationLowSecurityMistakeExcelVO.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(LowSecurity, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", LowSecurity); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(LowSecurity, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", LowSecurity); |
| | | } |
| | | } |
| | | } 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 setLowSecurityMistake(Map<Integer, String> map, ComMngPopulationLowSecurityMistakeExcelVO vo){ |
| | | private void setLowSecurityMistake(Map<Integer, String> map, ComMngPopulationLowSecurityMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(2)); |
| | |
| | | vo.setReviewComment(map.get(45)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | return ma; |
| | | } |
| | | |
| | | return ra; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.ComMngPopulationMajorExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMajorMistakeExcelVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @description: 重精人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationMajorExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationMajorExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationMajorExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入重精人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.MAJOR_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.MAJOR_POPULATION_ERROR_LIST; |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationMajorExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationMajorMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationMajorExcelVO vo = new ComMngPopulationMajorExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(2))){ |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(2).length() != 18){ |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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.isEmpty(oneData.get(3))){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(3)); |
| | | if(StringUtils.isEmpty(oneData.get(4))){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(4).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(5))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setFloor(oneData.get(5).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(6))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setUnitNo(oneData.get(6).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setHouseNo(oneData.get(7).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(8)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(9).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(10).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(10).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(11)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(12)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | vo.setCensusRegister(oneData.get(13).trim()); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | vo.setEconomicCondition(oneData.get(15).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | vo.setPersonType(oneData.get(16).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setFamilySituation(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setCustodyPerson(oneData.get(18).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(19)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的与监护人关系有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCustodyRelation(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setCustodyCardNo(oneData.get(20).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setCustodyPersonPhone(oneData.get(21).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setCustodyAddress(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setHelpPerson(oneData.get(23).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(24))){ |
| | | vo.setHelpPersonPhone(oneData.get(24).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(25))){ |
| | | vo.setHelpMethod(oneData.get(25).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setHelpSituation(oneData.get(26).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(27)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否违法犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsCrime(isOk); |
| | | }else { |
| | | vo.setIsCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(28))){ |
| | | vo.setCrimeSutiation(oneData.get(28).trim()); |
| | | } |
| | | vo.getUserTagStr().add("精神障碍患者"); |
| | | for (int i = 29; 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); |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationMajorExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationMajorMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationMajorExcelVO vo = new ComMngPopulationMajorExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationMajorExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationMajorExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationMajorExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationMajorMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationMajorMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(2))) { |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(2).length() != 18) { |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(2).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.isEmpty(oneData.get(3))) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(3)); |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(4).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(5))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setFloor(oneData.get(5).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(6))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setUnitNo(oneData.get(6).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(7))) { |
| | | vo.setHouseNo(oneData.get(7).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(8)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(9).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(10).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(10).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(11)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(12)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | vo.setCensusRegister(oneData.get(13).trim()); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | vo.setEconomicCondition(oneData.get(15).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setPersonType(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setFamilySituation(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setCustodyPerson(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | // Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(19)); |
| | | // if (isOk.equals(-1)) { |
| | | // index++; |
| | | // ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("您填写的与监护人关系有误"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | 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); |
| | | vo.setCustodyRelation(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setCustodyCardNo(oneData.get(20).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setCustodyPersonPhone(oneData.get(21).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setCustodyAddress(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setHelpPerson(oneData.get(23).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setHelpPersonPhone(oneData.get(24).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | vo.setHelpMethod(oneData.get(25).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setHelpSituation(oneData.get(26).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(27)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO(); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否违法犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsCrime(isOk); |
| | | } else { |
| | | vo.setIsCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | vo.setCrimeSutiation(oneData.get(28).trim()); |
| | | } |
| | | vo.getUserTagStr().add("精神障碍患者"); |
| | | for (int i = 29; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | // 将重复的数据进行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<ComMngPopulationMajorExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationMajorExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationMajorExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationMajorMistakeExcelVO> list = JSONArray |
| | | .parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationMajorMistakeExcelVO.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 setMistake(Map<Integer, String> map, ComMngPopulationMajorMistakeExcelVO vo){ |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationMajorMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(2)); |
| | |
| | | vo.setCrimeSutiation(map.get(28)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | return ma; |
| | | } |
| | | |
| | | return ra; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import cn.hutool.core.date.DateException; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.ComMngPopulationRehabilitationExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationRehabilitationMistakeExcelVO; |
| | | 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.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.ComMngPopulationRehabilitationExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationRehabilitationMistakeExcelVO; |
| | | 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 cn.hutool.core.date.DateException; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 刑释人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationRehabilitationExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationRehabilitationExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationRehabilitationExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入刑释人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.REHABILITATION_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.REHABILITATION_POPULATION_ERROR_LIST; |
| | | |
| | | 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<ComMngPopulationRehabilitationExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationRehabilitationMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationRehabilitationExcelVO vo = new ComMngPopulationRehabilitationExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(3))){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(3).length() != 18){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))){ |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | vo.setNativePlace(oneData.get(5)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(6))){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(6)); |
| | | if(StringUtils.isEmpty(oneData.get(7))){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(11)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(12).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(14)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(15)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | vo.setCensusRegister(oneData.get(16).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setMainRelatives(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(18)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的与人员关系有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPatientRelation(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | vo.setRehabReasonAndType(oneData.get(19).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(20)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否列管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRehab(isOk); |
| | | }else { |
| | | vo.setIsRehab(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(21)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否累惯犯有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRecidivist(isOk); |
| | | }else { |
| | | vo.setIsRecidivist(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setOriginalTerm(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setSentenceBegin(DateUtil.parse(oneData.get(23).trim())); |
| | | } |
| | | 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())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setSentencePlace(oneData.get(26).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(27))){ |
| | | vo.setRiskAssessment(oneData.get(27).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(28))){ |
| | | vo.setJoinDate(DateUtil.parse(oneData.get(28).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(29))){ |
| | | vo.setJoinSituation(oneData.get(29).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(30))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(30)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否重新犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAgainCrime(isOk); |
| | | }else { |
| | | vo.setIsAgainCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(31))){ |
| | | vo.setAgainCrimeName(oneData.get(31).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(32))){ |
| | | vo.setPlaceSituation(oneData.get(32).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(33))){ |
| | | vo.setPlaceDate(DateUtil.parse(oneData.get(33).trim())); |
| | | } |
| | | 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())); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的帮教开始日期有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(36))){ |
| | | try { |
| | | vo.setHelpEnd(DateUtil.parse(oneData.get(36).trim())); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的帮教结束日期有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(37))){ |
| | | vo.setHelpSituation(oneData.get(37).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(38))){ |
| | | vo.setRemark(oneData.get(38).trim()); |
| | | } |
| | | vo.getUserTagStr().add("刑满释放"); |
| | | for (int i = 39; 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); |
| | | 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<ComMngPopulationRehabilitationExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationRehabilitationMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationRehabilitationExcelVO vo = new ComMngPopulationRehabilitationExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationRehabilitationExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationRehabilitationExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationRehabilitationExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationRehabilitationMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationRehabilitationMistakeExcelVO.class); |
| | | // String errMsg = r.getMsg(); |
| | | // List<ComMngPopulationImportErrorVO> errorList = JSON.parseArray(errMsg,ComMngPopulationImportErrorVO.class); |
| | | // if(!errorList.isEmpty()){ |
| | | // populationImportErrorVOList.addAll(errorList); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(3).length() != 18) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))) { |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setNativePlace(oneData.get(5)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(6)); |
| | | if (StringUtils.isEmpty(oneData.get(7))) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new |
| | | // ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new |
| | | // ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = new |
| | | // ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(11)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(12).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(13).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(14)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setCensusRegister(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setMainRelatives(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | // Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(18)); |
| | | // if (isOk.equals(-1)) { |
| | | // index++; |
| | | // ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | // new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | // setRehabilitationMistake(oneData, mistake); |
| | | // mistake.setMistake("您填写的与人员关系有误"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | 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); |
| | | vo.setPatientRelation(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setRehabReasonAndType(oneData.get(19).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(20)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否列管有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRehab(isOk); |
| | | } else { |
| | | vo.setIsRehab(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(21)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否累惯犯有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRecidivist(isOk); |
| | | } else { |
| | | vo.setIsRecidivist(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setOriginalTerm(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setSentenceBegin(DateUtil.parse(oneData.get(23).trim())); |
| | | } |
| | | 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())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setSentencePlace(oneData.get(26).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(27))) { |
| | | vo.setRiskAssessment(oneData.get(27).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | vo.setJoinDate(DateUtil.parse(oneData.get(28).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(29))) { |
| | | vo.setJoinSituation(oneData.get(29).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(30))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(30)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否重新犯罪有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsAgainCrime(isOk); |
| | | } else { |
| | | vo.setIsAgainCrime(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(31))) { |
| | | vo.setAgainCrimeName(oneData.get(31).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(32))) { |
| | | vo.setPlaceSituation(oneData.get(32).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(33))) { |
| | | vo.setPlaceDate(DateUtil.parse(oneData.get(33).trim())); |
| | | } |
| | | 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())); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的帮教开始日期有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | } |
| | | } 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"); |
| | | if (StringUtils.isNotEmpty(oneData.get(36))) { |
| | | try { |
| | | vo.setHelpEnd(DateUtil.parse(oneData.get(36).trim())); |
| | | } catch (DateException e) { |
| | | log.info("处理数据时失败"); |
| | | e.printStackTrace(); |
| | | ComMngPopulationRehabilitationMistakeExcelVO mistake = |
| | | new ComMngPopulationRehabilitationMistakeExcelVO(); |
| | | index++; |
| | | setRehabilitationMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的帮教结束日期有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(37))) { |
| | | vo.setHelpSituation(oneData.get(37).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(38))) { |
| | | vo.setRemark(oneData.get(38).trim()); |
| | | } |
| | | vo.getUserTagStr().add("刑满释放"); |
| | | for (int i = 39; 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<ComMngPopulationRehabilitationExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationRehabilitationExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationRehabilitationExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationRehabilitationMistakeExcelVO> list = JSONArray.parseArray( |
| | | JSONArray.toJSONString(r.getData()), ComMngPopulationRehabilitationMistakeExcelVO.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 setRehabilitationMistake(Map<Integer, String> map, ComMngPopulationRehabilitationMistakeExcelVO vo){ |
| | | private void setRehabilitationMistake(Map<Integer, String> map, ComMngPopulationRehabilitationMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(3)); |
| | |
| | | vo.setRemark(map.get(38)); |
| | | } |
| | | |
| | | private R mistakeExportPopulation(List<ComMngPopulationMistakeExcelVO> vo) { |
| | | //生成动态模板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 { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(vo, 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(); |
| | | } |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | return ma; |
| | | } |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.ComMngPopulationSentenceExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationSentenceMistakeExcelVO; |
| | | 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.SFTPUtil; |
| | | 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.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | 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.ComMngPopulationSentenceExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationSentenceMistakeExcelVO; |
| | | 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; |
| | | |
| | | /** |
| | | * @description: 服刑人员导入监听 |
| | | * @author: txb |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationSentenceExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationSentenceExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationSentenceExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl, StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入服刑人员数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String Sentence = Constants.SENTENCE_POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @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("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String Sentence = Constants.SENTENCE_POPULATION_ERROR_LIST; |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationSentenceExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationSentenceMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationSentenceExcelVO vo = new ComMngPopulationSentenceExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))){ |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(1)); |
| | | if(StringUtils.isEmpty(oneData.get(3))){ |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | 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())); |
| | | // } |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(3).length() != 18){ |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))){ |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | vo.setSpouse(oneData.get(5)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(6))){ |
| | | vo.setProfession(oneData.get(6)); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(7))){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(7)); |
| | | if(StringUtils.isEmpty(oneData.get(8))){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(8).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setFloor(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setUnitNo(oneData.get(10).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setHouseNo(oneData.get(11).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(12)); |
| | | if(isOk.equals(-1)){ |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(13).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim()); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(15)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(16)); |
| | | if(isOk.equals(-1)){ |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setCensusRegister(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setSentencePlace(oneData.get(18).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | vo.setSentenceBegin(new SimpleDateFormat("yyyy-MM-dd").parse(oneData.get(19))); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setSentenceEnd(new SimpleDateFormat("yyyy-MM-dd").parse(oneData.get(20))); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setCharge(oneData.get(21).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setRemark(oneData.get(22).trim()); |
| | | } |
| | | vo.getUserTagStr().add("服刑人员"); |
| | | for (int i = 23; 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); |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationSentenceExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationSentenceMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationSentenceExcelVO vo = new ComMngPopulationSentenceExcelVO(); |
| | | if (StringUtils.isNotEmpty(oneData.get(0))) { |
| | | vo.setSerialNumber(oneData.get(0)); |
| | | } |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationSentenceExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationSentenceExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationSentenceExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationSentenceMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationSentenceMistakeExcelVO.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(Sentence,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", Sentence); |
| | | }else{ |
| | | log.info("业务层处理逻辑失败"); |
| | | if(!mistakes.isEmpty()){ |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(Sentence,JSONArray.toJSONString(mistakes),1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", Sentence); |
| | | vo.setName(oneData.get(1)); |
| | | if (StringUtils.isEmpty(oneData.get(3))) { |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(3).length() != 18) { |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCardNo(oneData.get(3).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(4))) { |
| | | vo.setPhone(oneData.get(4)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | vo.setSpouse(oneData.get(5)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(6))) { |
| | | vo.setProfession(oneData.get(6)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(7))) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(7)); |
| | | if (StringUtils.isEmpty(oneData.get(8))) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(8).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setFloor(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setUnitNo(oneData.get(10).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(11))){ |
| | | // index++; |
| | | // ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | // setSentenceMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setHouseNo(oneData.get(11).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | Integer isOk = PopulHouseUseEnum.getCodeByName(oneData.get(12)); |
| | | if (isOk.equals(-1)) { |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | index++; |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(13).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim()); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(16)); |
| | | if (isOk.equals(-1)) { |
| | | index++; |
| | | ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO(); |
| | | setSentenceMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setCensusRegister(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setSentencePlace(oneData.get(18).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | vo.setSentenceBegin(new SimpleDateFormat("yyyy-MM-dd").parse(oneData.get(19))); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setSentenceEnd(new SimpleDateFormat("yyyy-MM-dd").parse(oneData.get(20))); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setCharge(oneData.get(21).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setRemark(oneData.get(22).trim()); |
| | | } |
| | | vo.getUserTagStr().add("服刑人员"); |
| | | for (int i = 23; i < headSize; i++) { |
| | | if (oneData.get(i) != null && oneData.get(i).equals("是")) { |
| | | vo.getUserTagStr().add(headData.get(i).substring(0, headData.get(i).indexOf("("))); |
| | | } |
| | | } |
| | | } 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"); |
| | | } catch (ParseException e1) { |
| | | log.info("处理数据时失败2"); |
| | | e1.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", "导入失败222"); |
| | | // 将重复的数据进行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<ComMngPopulationSentenceExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationSentenceExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationSentenceExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationSentenceMistakeExcelVO> list = JSONArray |
| | | .parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationSentenceMistakeExcelVO.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(Sentence, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("将错误数据存入redis中成功"); |
| | | throw new ServiceException("500", Sentence); |
| | | } else { |
| | | log.info("业务层处理逻辑失败"); |
| | | if (!mistakes.isEmpty()) { |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中"); |
| | | valueOperations.set(Sentence, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS); |
| | | log.info("业务层处理逻辑失败,将错误数据缓存到redis中成功"); |
| | | throw new ServiceException("500", Sentence); |
| | | } |
| | | } |
| | | } 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"); |
| | | } catch (ParseException e1) { |
| | | log.info("处理数据时失败2"); |
| | | e1.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", "导入失败222"); |
| | | } |
| | | } |
| | | |
| | | private void setSentenceMistake(Map<Integer, String> map, ComMngPopulationSentenceMistakeExcelVO vo){ |
| | | private void setSentenceMistake(Map<Integer, String> map, ComMngPopulationSentenceMistakeExcelVO vo) { |
| | | vo.setSerialNumber(map.get(0)); |
| | | vo.setName(map.get(1)); |
| | | vo.setCardNo(map.get(3)); |
| | |
| | | vo.setRemark(map.get(22)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | return ma; |
| | | } |
| | | |
| | | return ra; |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.common.listen; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | 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; |
| | | |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | | 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.excel.CustomSheetWriteHandler; |
| | | 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.ComMngPopulationImportErrorVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | import com.panzhihua.common.utlis.ListUtils; |
| | | import com.panzhihua.common.utlis.PayUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 实有人口导入监听 |
| | |
| | | */ |
| | | @Slf4j |
| | | public class ComMngPopulationServeExcelListen extends AnalysisEventListener<Map<Integer, String>> { |
| | | private CommunityService communityService; |
| | | |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 每隔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 String userName; |
| | | // FTP 登录密码 |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | private String host; |
| | | // FTP 端口 |
| | | private int port; |
| | | private String excelUrl; |
| | | |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | public static String loadUrl; |
| | | public ComMngPopulationServeExcelListen(CommunityService communityService, Long communityId, Long userId, |
| | | StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userId = userId; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | public ComMngPopulationServeExcelListen(CommunityService communityService, Long communityId, String userName, String password, String host, int port, String excelUrl,StringRedisTemplate stringRedisTemplate) { |
| | | this.communityService = communityService; |
| | | this.communityId = communityId; |
| | | this.userName = userName; |
| | | this.password = password; |
| | | this.host = host; |
| | | this.port = port; |
| | | this.excelUrl = excelUrl; |
| | | this.stringRedisTemplate = stringRedisTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 |
| | | */ |
| | | private static final int BATCH_COUNT = 5000; |
| | | List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>(); |
| | | |
| | | @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) { |
| | | @Override |
| | | public void invoke(Map<Integer, String> data, AnalysisContext context) { |
| | | list.add(data); |
| | | if (list.size() >= BATCH_COUNT) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入人口数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.POPULATION_ERROR_LIST; |
| | | /** |
| | | * 这里会一行行的返回头 |
| | | * |
| | | * @param headMap |
| | | * @param context |
| | | */ |
| | | @Override |
| | | public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
| | | headSize = headMap.size(); |
| | | headData = headMap; |
| | | } |
| | | |
| | | 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())); |
| | | // } |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | saveData(); |
| | | log.info("所有数据解析完成!"); |
| | | } |
| | | |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationServeExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationServeExcelVO vo = new ComMngPopulationServeExcelVO(); |
| | | //姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if(StringUtils.isNotEmpty(oneData.get(0)) || StringUtils.isNotEmpty(oneData.get(1))){ |
| | | if(StringUtils.isEmpty(oneData.get(0))){ |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第1列"); |
| | | // importErrorVO.setErrorMsg("名字不可为空,请填写姓名"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if(StringUtils.isEmpty(oneData.get(1))){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第2列"+oneData.get(1)); |
| | | // importErrorVO.setErrorMsg("身份证号不可为空,请填写身份证号"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证号"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | /** |
| | | * 不是固定的列只能手动处理 |
| | | */ |
| | | private void saveData() { |
| | | R<List<BcDictionaryVO>> dictionaryR = communityService.listDictionaryByKey(BcDictionaryConstants.FAMILY); |
| | | log.info("开始导入人口数据"); |
| | | log.info("表格总数据:" + list.size()); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("000", "导入数据为空!"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | String key = Constants.POPULATION_ERROR_LIST; |
| | | |
| | | //判断身份证号码位数 |
| | | if(oneData.get(1).length() != 18){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第2列"+oneData.get(1)); |
| | | // importErrorVO.setErrorMsg("身份证号位数有误,请检查身份证号码是否正确"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(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))){ |
| | | // String nation = oneData.get(2); |
| | | // if(!nation.contains("族")){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第3列"); |
| | | // importErrorVO.setErrorMsg("您填写的民族格式有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } |
| | | vo.setNation(oneData.get(2)); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(3))){ |
| | | vo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3))); |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3)); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第4列"); |
| | | // importErrorVO.setErrorMsg("您填写的政治面貌有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(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)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第5列"); |
| | | // importErrorVO.setErrorMsg("您填写的是否租住有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | }else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(5))){ |
| | | 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())); |
| | | // } |
| | | |
| | | // String ra = convertRelation(oneData.get(5)); |
| | | // |
| | | // String relation = dictMap.get(ra); |
| | | // if(StringUtils.isEmpty(relation)){ |
| | | //// vo.setRelationStr(ra); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // }else{ |
| | | // vo.setRelation(Integer.valueOf(relation)); |
| | | // } |
| | | // String relation = convertMarriage(oneData.get(5)); |
| | | Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(5)); |
| | | |
| | | if(isOk.equals(-1)){ |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的与户主关系有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | }else{ |
| | | vo.setRelation(isOk); |
| | | } |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(6))){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第7列"); |
| | | // importErrorVO.setErrorMsg("街路巷不可为空"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | int index = 2; |
| | | try { |
| | | ArrayList<ComMngPopulationServeExcelVO> voList = Lists.newArrayList(); |
| | | // List<ComMngPopulationImportErrorVO> populationImportErrorVOList = new ArrayList<>(); |
| | | ArrayList<ComMngPopulationMistakeExcelVO> mistakes = Lists.newArrayList(); |
| | | for (Map<Integer, String> oneData : list) { |
| | | ComMngPopulationServeExcelVO vo = new ComMngPopulationServeExcelVO(); |
| | | // 姓名和身份证都为空,为空户,无需操作,否则就解析年龄,性别,出生年月日 |
| | | if (StringUtils.isNotEmpty(oneData.get(0)) || StringUtils.isNotEmpty(oneData.get(1))) { |
| | | if (StringUtils.isEmpty(oneData.get(0))) { |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第1列"); |
| | | // importErrorVO.setErrorMsg("名字不可为空,请填写姓名"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistake.setMistake("名字不可为空,请填写姓名"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setRoad(oneData.get(6)); |
| | | if(StringUtils.isEmpty(oneData.get(7))){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第8列"); |
| | | // importErrorVO.setErrorMsg("小区号不可为空"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第2列"+oneData.get(1)); |
| | | // importErrorVO.setErrorMsg("身份证号不可为空,请填写身份证号"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistake.setMistake("身份证号不可为空,请填写身份证号"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第9列"); |
| | | //// importErrorVO.setErrorMsg("楼排号不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第10列"); |
| | | //// importErrorVO.setErrorMsg("单元号不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第11列"); |
| | | //// importErrorVO.setErrorMsg("户室不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if(StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(11))){ |
| | | vo.setBuildPurpose(oneData.get(11).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(12))){ |
| | | vo.setBuildArea(oneData.get(12).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(13))){ |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(13).trim()); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第14列"); |
| | | // importErrorVO.setErrorMsg("您填写的房屋状态有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(14))){ |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim()); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第15列"); |
| | | // importErrorVO.setErrorMsg("您填写的房屋用途有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(15))){ |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(15)); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第16列"); |
| | | // importErrorVO.setErrorMsg("您填写的管控状态有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | |
| | | if(StringUtils.isNotEmpty(oneData.get(16))){ |
| | | vo.setPhone(oneData.get(16).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(17))){ |
| | | vo.setNativePlace(oneData.get(17).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(18))){ |
| | | vo.setCultureLevel(PopulCultureLevelEnum.getCodeByName(oneData.get(18))); |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(18)); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第19列"); |
| | | // importErrorVO.setErrorMsg("您填写的文化程度有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(19))){ |
| | | // String ma = convertMarriage(oneData.get(19)); |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(19)); |
| | | if(isOk.equals(-1)){ |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第20列"); |
| | | // importErrorVO.setErrorMsg("您填写的婚姻状况有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | }else{ |
| | | vo.setMarriage(isOk); |
| | | } |
| | | |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(20))){ |
| | | vo.setHealthy(oneData.get(20).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(21))){ |
| | | vo.setBloodType(oneData.get(21).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(22))){ |
| | | vo.setReligion(oneData.get(22).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(23))){ |
| | | vo.setProfession(oneData.get(23).trim()); |
| | | } |
| | | |
| | | if(StringUtils.isNotEmpty(oneData.get(24))){ |
| | | vo.setWorkCompany(oneData.get(24).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(25))){ |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(25)); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第26列"); |
| | | // importErrorVO.setErrorMsg("您填写的本地/外地有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | }else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(26))){ |
| | | vo.setCensusRegister(oneData.get(26).trim()); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(27))){ |
| | | vo.setResidence(0); |
| | | }else{ |
| | | vo.setResidence(PopulIsOkEnum.getCodeByName(oneData.get(27).trim())); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(28))){ |
| | | Integer isOk = PopulPersonTypeEnum.getCodeByName(oneData.get(28)); |
| | | if(isOk.equals(-1)){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第29列"); |
| | | // importErrorVO.setErrorMsg("您填写的人员类型有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的人员类型有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPersonType(isOk); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(29))){ |
| | | vo.setCountry(oneData.get(29).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(30))){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss"); |
| | | vo.setDateOfDeparture(simpleDateFormat.parse(oneData.get(30))); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(31))){ |
| | | vo.setPersonStatus(oneData.get(31).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(32))){ |
| | | vo.setMonthlyIncome(oneData.get(32).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(33))){ |
| | | vo.setFamilyStatus(oneData.get(33).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(34))){ |
| | | vo.setGoalInChina(oneData.get(34).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(35))){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss"); |
| | | vo.setDateOfArrival(simpleDateFormat.parse(oneData.get(35))); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(36))){ |
| | | vo.setRemark(oneData.get(36).trim()); |
| | | } |
| | | |
| | | if(StringUtils.isNotEmpty(oneData.get(37))){ |
| | | vo.setIdCardPositive(oneData.get(37).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(38))){ |
| | | vo.setIdCardBack(oneData.get(38).trim()); |
| | | } |
| | | if(StringUtils.isNotEmpty(oneData.get(39))){ |
| | | vo.setHouseHold(oneData.get(39).trim()); |
| | | } |
| | | if(StringUtils.isEmpty(oneData.get(40))){ |
| | | vo.setDeath(0); |
| | | }else{ |
| | | vo.setDeath(PopulIsOkEnum.getCodeByName(oneData.get(40).trim())); |
| | | } |
| | | for (int i = 41; 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); |
| | | // 判断身份证号码位数 |
| | | if (oneData.get(1).length() != 18) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第2列"+oneData.get(1)); |
| | | // importErrorVO.setErrorMsg("身份证号位数有误,请检查身份证号码是否正确"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("身份证号位数有误,请检查身份证号码是否正确"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | voList.add(vo); |
| | | 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))) { |
| | | // String nation = oneData.get(2); |
| | | // if(!nation.contains("族")){ |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第3列"); |
| | | // importErrorVO.setErrorMsg("您填写的民族格式有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // } |
| | | vo.setNation(oneData.get(2)); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3))); |
| | | Integer isOk = PopulPoliticalOutlookEnum.getCodeByName(oneData.get(3)); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第4列"); |
| | | // importErrorVO.setErrorMsg("您填写的政治面貌有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(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)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第5列"); |
| | | // importErrorVO.setErrorMsg("您填写的是否租住有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的是否租住有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setIsRent(isOk); |
| | | } else { |
| | | vo.setIsRent(PopulHouseUseEnum.getCodeByName("否")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(5))) { |
| | | |
| | | // String ra = convertRelation(oneData.get(5)); |
| | | // |
| | | // String relation = dictMap.get(ra); |
| | | // if(StringUtils.isEmpty(relation)){ |
| | | //// vo.setRelationStr(ra); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // continue; |
| | | // }else{ |
| | | // vo.setRelation(Integer.valueOf(relation)); |
| | | // } |
| | | // String relation = convertMarriage(oneData.get(5)); |
| | | Integer isOk = PopulRelationEnum.getCodeByName(oneData.get(5)); |
| | | |
| | | if (isOk.equals(-1)) { |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第6列"); |
| | | // importErrorVO.setErrorMsg("您填写的与户主关系有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的与户主关系有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } else { |
| | | vo.setRelation(isOk); |
| | | } |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(6))) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第7列"); |
| | | // importErrorVO.setErrorMsg("街路巷不可为空"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("街路巷不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | //客户需要暂时注释,等客户处理完成需要恢复 |
| | | // 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<ComMngPopulationServeExcelVO> newVoList = voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationServeExcelVO::getDistinctPass)).collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationServeExcelVO(newVoList, communityId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationMistakeExcelVO> list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationMistakeExcelVO.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中成功"); |
| | | vo.setRoad(oneData.get(6)); |
| | | if (StringUtils.isEmpty(oneData.get(7))) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第8列"); |
| | | // importErrorVO.setErrorMsg("小区号不可为空"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("小区号不可为空"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setDoorNo(oneData.get(7).trim()); |
| | | // if(StringUtils.isEmpty(oneData.get(8))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第9列"); |
| | | //// importErrorVO.setErrorMsg("楼排号不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("楼排号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(8))) { |
| | | vo.setFloor(oneData.get(8).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(9))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第10列"); |
| | | //// importErrorVO.setErrorMsg("单元号不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("单元号不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(9))) { |
| | | vo.setUnitNo(oneData.get(9).trim()); |
| | | } |
| | | // if(StringUtils.isEmpty(oneData.get(10))){ |
| | | //// ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | //// importErrorVO.setErrorPosition("第" + index + "行,第11列"); |
| | | //// importErrorVO.setErrorMsg("户室不可为空"); |
| | | //// populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | | // ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | // setMistake(oneData, mistake); |
| | | // mistake.setMistake("户室不可为空"); |
| | | // mistakes.add(mistake); |
| | | // continue; |
| | | // } |
| | | if (StringUtils.isNotEmpty(oneData.get(10))) { |
| | | vo.setHouseNo(oneData.get(10).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(11))) { |
| | | vo.setBuildPurpose(oneData.get(11).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(12))) { |
| | | vo.setBuildArea(oneData.get(12).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(13))) { |
| | | Integer isOk = PopulHouseStatusEnum.getCodeByName(oneData.get(13).trim()); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第14列"); |
| | | // importErrorVO.setErrorMsg("您填写的房屋状态有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHouseStatus(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(14))) { |
| | | Integer isOk = PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim()); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第15列"); |
| | | // importErrorVO.setErrorMsg("您填写的房屋用途有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的房屋用途有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setHousePurpose(PopulHousePurposeEnum.getCodeByName(oneData.get(14).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(15))) { |
| | | Integer isOk = PopulHouseControlStatusEnum.getCodeByName(oneData.get(15)); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第16列"); |
| | | // importErrorVO.setErrorMsg("您填写的管控状态有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的管控状态有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setControlStatus(isOk); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(16))) { |
| | | vo.setPhone(oneData.get(16).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(17))) { |
| | | vo.setNativePlace(oneData.get(17).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(18))) { |
| | | vo.setCultureLevel(PopulCultureLevelEnum.getCodeByName(oneData.get(18))); |
| | | Integer isOk = PopulCultureLevelEnum.getCodeByName(oneData.get(18)); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第19列"); |
| | | // importErrorVO.setErrorMsg("您填写的文化程度有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的文化程度有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setCultureLevel(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(19))) { |
| | | // String ma = convertMarriage(oneData.get(19)); |
| | | Integer isOk = PopulMarriageEnum.getCodeByName(oneData.get(19)); |
| | | if (isOk.equals(-1)) { |
| | | // vo.setMarriageStr(ma); |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第20列"); |
| | | // importErrorVO.setErrorMsg("您填写的婚姻状况有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的婚姻状况有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } else { |
| | | vo.setMarriage(isOk); |
| | | } |
| | | |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(20))) { |
| | | vo.setHealthy(oneData.get(20).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(21))) { |
| | | vo.setBloodType(oneData.get(21).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(22))) { |
| | | vo.setReligion(oneData.get(22).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(23))) { |
| | | vo.setProfession(oneData.get(23).trim()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(24))) { |
| | | vo.setWorkCompany(oneData.get(24).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(25))) { |
| | | Integer isOk = PopulOutOrLocalEnum.getCodeByName(oneData.get(25)); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第26列"); |
| | | // importErrorVO.setErrorMsg("您填写的本地/外地有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的本地/外地有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setOutOrLocal(isOk); |
| | | } else { |
| | | vo.setOutOrLocal(PopulOutOrLocalEnum.getCodeByName("本地")); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(26))) { |
| | | vo.setCensusRegister(oneData.get(26).trim()); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(27))) { |
| | | vo.setResidence(0); |
| | | } else { |
| | | vo.setResidence(PopulIsOkEnum.getCodeByName(oneData.get(27).trim())); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(28))) { |
| | | Integer isOk = PopulPersonTypeEnum.getCodeByName(oneData.get(28)); |
| | | if (isOk.equals(-1)) { |
| | | // ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | // importErrorVO.setErrorPosition("第" + index + "行,第29列"); |
| | | // importErrorVO.setErrorMsg("您填写的人员类型有误"); |
| | | // populationImportErrorVOList.add(importErrorVO); |
| | | index++; |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | setMistake(oneData, mistake); |
| | | mistake.setMistake("您填写的人员类型有误"); |
| | | mistakes.add(mistake); |
| | | continue; |
| | | } |
| | | vo.setPersonType(isOk); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(29))) { |
| | | vo.setCountry(oneData.get(29).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(30))) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss"); |
| | | vo.setDateOfDeparture(simpleDateFormat.parse(oneData.get(30))); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(31))) { |
| | | vo.setPersonStatus(oneData.get(31).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(32))) { |
| | | vo.setMonthlyIncome(oneData.get(32).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(33))) { |
| | | vo.setFamilyStatus(oneData.get(33).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(34))) { |
| | | vo.setGoalInChina(oneData.get(34).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(35))) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss"); |
| | | vo.setDateOfArrival(simpleDateFormat.parse(oneData.get(35))); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(36))) { |
| | | vo.setRemark(oneData.get(36).trim()); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(oneData.get(37))) { |
| | | vo.setIdCardPositive(oneData.get(37).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(38))) { |
| | | vo.setIdCardBack(oneData.get(38).trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(39))) { |
| | | vo.setHouseHold(oneData.get(39).trim()); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(40))) { |
| | | vo.setDeath(0); |
| | | } else { |
| | | vo.setDeath(PopulIsOkEnum.getCodeByName(oneData.get(40).trim())); |
| | | } |
| | | for (int i = 41; 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<ComMngPopulationServeExcelVO> newVoList = |
| | | voList.stream().filter(ListUtils.distinctByKey(ComMngPopulationServeExcelVO::getDistinctPass)) |
| | | .collect(Collectors.toList()); |
| | | log.info("开始进入业务层处理逻辑"); |
| | | R r = communityService.listSavePopulationServeExcelVO(newVoList, communityId, userId); |
| | | log.info("业务层处理逻辑完成"); |
| | | if (!R.isOk(r)) { |
| | | log.info("业务层处理成功"); |
| | | List<ComMngPopulationMistakeExcelVO> list = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComMngPopulationMistakeExcelVO.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); |
| | | }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"); |
| | | } catch (ParseException e1) { |
| | | log.info("处理数据时失败2"); |
| | | e1.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", "导入失败222"); |
| | | } |
| | | } 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"); |
| | | } catch (ParseException e1) { |
| | | log.info("处理数据时失败2"); |
| | | e1.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", "导入失败222"); |
| | | } |
| | | } |
| | | |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationMistakeExcelVO 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.setRelation(map.get(5)); |
| | | vo.setRoad(map.get(6)); |
| | | vo.setDoorNo(map.get(7)); |
| | | vo.setFloor(map.get(8)); |
| | | vo.setUnitNo(map.get(9)); |
| | | vo.setHouseNo(map.get(10)); |
| | | vo.setBuildPurpose(map.get(11)); |
| | | vo.setBuildArea(map.get(12)); |
| | | vo.setHouseStatus(map.get(13)); |
| | | vo.setHousePurpose(map.get(14)); |
| | | vo.setControlStatus(map.get(15)); |
| | | vo.setPhone(map.get(16)); |
| | | vo.setNativePlace(map.get(17)); |
| | | vo.setCultureLevel(map.get(18)); |
| | | vo.setMarriage(map.get(19)); |
| | | vo.setHealthy(map.get(20)); |
| | | vo.setBloodType(map.get(21)); |
| | | vo.setReligion(map.get(22)); |
| | | vo.setProfession(map.get(23)); |
| | | vo.setWorkCompany(map.get(24)); |
| | | vo.setOutOrLocal(map.get(25)); |
| | | vo.setCensusRegister(map.get(26)); |
| | | vo.setResidence(map.get(27)); |
| | | // vo.setAddress(map.get(28)); |
| | | vo.setPersonType(map.get(28)); |
| | | vo.setCountry(map.get(29)); |
| | | vo.setStringOfDeparture(map.get(30)); |
| | | vo.setPersonStatus(map.get(31)); |
| | | vo.setMonthlyIncome(map.get(32)); |
| | | vo.setFamilyStatus(map.get(33)); |
| | | vo.setGoalInChina(map.get(34)); |
| | | vo.setStringOfArrival(map.get(35)); |
| | | vo.setRemark(map.get(36)); |
| | | vo.setIdCardPositive(map.get(37)); |
| | | vo.setIdCardBack(map.get(38)); |
| | | vo.setHouseHold(map.get(39)); |
| | | vo.setDeath(map.get(40)); |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if (Objects.equals("已", ma) || Objects.equals("一", ma)) { |
| | | ma = "已婚"; |
| | | } else if (Objects.equals("未", ma) || Objects.equals("未婚婚", ma)) { |
| | | ma = "未婚"; |
| | | } else if (Objects.equals("初", ma)) { |
| | | ma = "初婚"; |
| | | } else if (Objects.equals("再", ma)) { |
| | | ma = "再婚"; |
| | | } else if (Objects.equals("复", ma)) { |
| | | ma = "复婚"; |
| | | } else if (Objects.equals("丧", ma) || Objects.equals("丧偶偶", ma)) { |
| | | ma = "丧偶"; |
| | | } else if (Objects.equals("离", ma) || Objects.equals("离异", ma) || Objects.equals("离异婚", ma)) { |
| | | ma = "离婚"; |
| | | } else if (Objects.equals("分", ma)) { |
| | | ma = "分居"; |
| | | } |
| | | |
| | | private void setMistake(Map<Integer, String> map, ComMngPopulationMistakeExcelVO 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.setRelation(map.get(5)); |
| | | vo.setRoad(map.get(6)); |
| | | vo.setDoorNo(map.get(7)); |
| | | vo.setFloor(map.get(8)); |
| | | vo.setUnitNo(map.get(9)); |
| | | vo.setHouseNo(map.get(10)); |
| | | vo.setBuildPurpose(map.get(11)); |
| | | vo.setBuildArea(map.get(12)); |
| | | vo.setHouseStatus(map.get(13)); |
| | | vo.setHousePurpose(map.get(14)); |
| | | vo.setControlStatus(map.get(15)); |
| | | vo.setPhone(map.get(16)); |
| | | vo.setNativePlace(map.get(17)); |
| | | vo.setCultureLevel(map.get(18)); |
| | | vo.setMarriage(map.get(19)); |
| | | vo.setHealthy(map.get(20)); |
| | | vo.setBloodType(map.get(21)); |
| | | vo.setReligion(map.get(22)); |
| | | vo.setProfession(map.get(23)); |
| | | vo.setWorkCompany(map.get(24)); |
| | | vo.setOutOrLocal(map.get(25)); |
| | | vo.setCensusRegister(map.get(26)); |
| | | vo.setResidence(map.get(27)); |
| | | // vo.setAddress(map.get(28)); |
| | | vo.setPersonType(map.get(28)); |
| | | vo.setCountry(map.get(29)); |
| | | vo.setStringOfDeparture(map.get(30)); |
| | | vo.setPersonStatus(map.get(31)); |
| | | vo.setMonthlyIncome(map.get(32)); |
| | | vo.setFamilyStatus(map.get(33)); |
| | | vo.setGoalInChina(map.get(34)); |
| | | vo.setStringOfArrival(map.get(35)); |
| | | vo.setRemark(map.get(36)); |
| | | vo.setIdCardPositive(map.get(37)); |
| | | vo.setIdCardBack(map.get(38)); |
| | | vo.setHouseHold(map.get(39)); |
| | | vo.setDeath(map.get(40)); |
| | | return ma; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if (ra.contains("户主")) { |
| | | ra = "户主"; |
| | | } else if (Objects.equals(ra, "女儿")) { |
| | | ra = "女"; |
| | | } else if (Objects.equals(ra, "儿子") || Objects.equals(ra, "儿")) { |
| | | ra = "子"; |
| | | } else if (Objects.equals(ra, "大女")) { |
| | | ra = "长女"; |
| | | } else if (Objects.equals(ra, "二女") || Objects.equals(ra, "此女")) { |
| | | ra = "次女"; |
| | | } else if (Objects.equals(ra, "二子")) { |
| | | ra = "次子"; |
| | | } else if (Objects.equals(ra, "长男") || ra.contains("长子")) { |
| | | ra = "长子"; |
| | | } else if (Objects.equals(ra, "非亲属") || ra.contains("女友") || ra.contains("女朋友") || ra.contains("男友") |
| | | || ra.contains("男朋友")) { |
| | | ra = "其他"; |
| | | } else if (Objects.equals(ra, "姐")) { |
| | | ra = "姐姐"; |
| | | } else if (Objects.equals(ra, "户主")) { |
| | | ra = "本人"; |
| | | } else if (Objects.equals(ra, "妻子") || Objects.equals(ra, "媳妇")) { |
| | | ra = "妻"; |
| | | } else if (Objects.equals(ra, "哥") || Objects.equals(ra, "哥哥")) { |
| | | ra = "兄"; |
| | | } else if (Objects.equals(ra, "丈夫")) { |
| | | ra = "夫"; |
| | | } else if (Objects.equals(ra, "丈母娘")) { |
| | | ra = "岳母"; |
| | | } else if (Objects.equals(ra, "继子") || Objects.equals(ra, "养子")) { |
| | | ra = "养子或继子"; |
| | | } else if (Objects.equals(ra, "继女") || Objects.equals(ra, "养女")) { |
| | | ra = "养女或继女"; |
| | | } else if (ra.contains("儿媳") || ra.contains("长媳")) { |
| | | ra = "儿媳"; |
| | | } else if (Objects.equals(ra, "三姨") || Objects.equals(ra, "姨姨")) { |
| | | ra = "姨母"; |
| | | } else if (Objects.equals(ra, "二外孙女")) { |
| | | ra = "外孙女"; |
| | | } else if (Objects.equals(ra, "外孙")) { |
| | | ra = "外孙子"; |
| | | } else if (Objects.equals(ra, "侄儿")) { |
| | | ra = "侄子"; |
| | | } else if (ra.contains("表")) { |
| | | ra = "表兄弟、表姐妹"; |
| | | } else if (Objects.equals(ra, "继父") || Objects.equals(ra, "养父")) { |
| | | ra = "继父或养父"; |
| | | } else if (Objects.equals(ra, "父")) { |
| | | ra = "父亲"; |
| | | } else if (Objects.equals(ra, "弟弟")) { |
| | | ra = "弟"; |
| | | } else if (Objects.equals(ra, "孙")) { |
| | | ra = "孙子"; |
| | | } else if (Objects.equals(ra, "孙媳妇") || Objects.equals(ra, "外孙媳妇")) { |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | } else if (Objects.equals(ra, "妹")) { |
| | | ra = "妹妹"; |
| | | } else if (Objects.equals(ra, "祖父母")) { |
| | | ra = "祖父母或外祖父母"; |
| | | } else if (Objects.equals(ra, "姐妹") || Objects.equals(ra, "兄弟")) { |
| | | ra = "兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "其他姐妹") || Objects.equals(ra, "其他兄弟")) { |
| | | ra = "其他兄弟姐妹"; |
| | | } else if (Objects.equals(ra, "奶奶")) { |
| | | ra = "祖母"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (Objects.equals(ra, "爷爷")) { |
| | | ra = "祖父"; |
| | | } else if (ra.contains("堂")) { |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | private R mistakeExportPopulation(List<ComMngPopulationMistakeExcelVO> vo) { |
| | | //生成动态模板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 { |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationMistakeExcelVO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("实有人口错误数据").build(); |
| | | excelWriter.write(vo, 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(); |
| | | } |
| | | } |
| | | |
| | | private String convertMarriage(String ma) { |
| | | |
| | | if(Objects.equals("已",ma) || Objects.equals("一",ma)){ |
| | | ma = "已婚"; |
| | | }else if(Objects.equals("未",ma) || Objects.equals("未婚婚",ma)){ |
| | | ma = "未婚"; |
| | | }else if(Objects.equals("初",ma)){ |
| | | ma = "初婚"; |
| | | }else if(Objects.equals("再",ma)){ |
| | | ma = "再婚"; |
| | | }else if(Objects.equals("复",ma)){ |
| | | ma = "复婚"; |
| | | }else if(Objects.equals("丧",ma) || Objects.equals("丧偶偶",ma)){ |
| | | ma = "丧偶"; |
| | | }else if(Objects.equals("离",ma) || Objects.equals("离异",ma) || Objects.equals("离异婚",ma)){ |
| | | ma = "离婚"; |
| | | }else if(Objects.equals("分",ma)){ |
| | | ma = "分居"; |
| | | } |
| | | |
| | | return ma; |
| | | } |
| | | |
| | | private String convertRelation(String ra) { |
| | | if(ra.contains("户主")){ |
| | | ra = "户主"; |
| | | }else if(Objects.equals(ra,"女儿")){ |
| | | ra = "女"; |
| | | }else if(Objects.equals(ra,"儿子") || Objects.equals(ra,"儿")){ |
| | | ra = "子"; |
| | | }else if(Objects.equals(ra,"大女")){ |
| | | ra = "长女"; |
| | | }else if(Objects.equals(ra,"二女") || Objects.equals(ra,"此女")){ |
| | | ra = "次女"; |
| | | }else if(Objects.equals(ra,"二子")){ |
| | | ra = "次子"; |
| | | }else if(Objects.equals(ra,"长男") || ra.contains("长子")){ |
| | | ra = "长子"; |
| | | }else if(Objects.equals(ra,"非亲属") || ra.contains("女友") || ra.contains("女朋友") |
| | | || ra.contains("男友") || ra.contains("男朋友")){ |
| | | ra = "其他"; |
| | | }else if(Objects.equals(ra,"姐")){ |
| | | ra = "姐姐"; |
| | | }else if(Objects.equals(ra,"户主")){ |
| | | ra = "本人"; |
| | | }else if(Objects.equals(ra,"妻子") || Objects.equals(ra,"媳妇")){ |
| | | ra = "妻"; |
| | | }else if(Objects.equals(ra,"哥") || Objects.equals(ra,"哥哥")){ |
| | | ra = "兄"; |
| | | }else if(Objects.equals(ra,"丈夫")){ |
| | | ra = "夫"; |
| | | }else if(Objects.equals(ra,"丈母娘")){ |
| | | ra = "岳母"; |
| | | }else if(Objects.equals(ra,"继子") || Objects.equals(ra,"养子")){ |
| | | ra = "养子或继子"; |
| | | }else if(Objects.equals(ra,"继女") || Objects.equals(ra,"养女")){ |
| | | ra = "养女或继女"; |
| | | }else if(ra.contains("儿媳")||ra.contains("长媳")){ |
| | | ra = "儿媳"; |
| | | }else if(Objects.equals(ra,"三姨") || Objects.equals(ra,"姨姨")){ |
| | | ra = "姨母"; |
| | | }else if(Objects.equals(ra,"二外孙女")){ |
| | | ra = "外孙女"; |
| | | }else if(Objects.equals(ra,"外孙")){ |
| | | ra = "外孙子"; |
| | | }else if(Objects.equals(ra,"侄儿")){ |
| | | ra = "侄子"; |
| | | }else if(ra.contains("表")){ |
| | | ra = "表兄弟、表姐妹"; |
| | | }else if(Objects.equals(ra,"继父") || Objects.equals(ra,"养父")){ |
| | | ra = "继父或养父"; |
| | | }else if(Objects.equals(ra,"父")){ |
| | | ra = "父亲"; |
| | | }else if(Objects.equals(ra,"弟弟")){ |
| | | ra = "弟"; |
| | | }else if(Objects.equals(ra,"孙")){ |
| | | ra = "孙子"; |
| | | }else if(Objects.equals(ra,"孙媳妇") || Objects.equals(ra,"外孙媳妇")){ |
| | | ra = "孙媳妇或外孙媳妇"; |
| | | }else if(Objects.equals(ra,"妹")){ |
| | | ra = "妹妹"; |
| | | }else if(Objects.equals(ra,"祖父母")){ |
| | | ra = "祖父母或外祖父母"; |
| | | }else if(Objects.equals(ra,"姐妹") || Objects.equals(ra,"兄弟")){ |
| | | ra = "兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"其他姐妹") || Objects.equals(ra,"其他兄弟")){ |
| | | ra = "其他兄弟姐妹"; |
| | | }else if(Objects.equals(ra,"奶奶")){ |
| | | ra = "祖母"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(Objects.equals(ra,"爷爷")){ |
| | | ra = "祖父"; |
| | | }else if(ra.contains("堂")){ |
| | | ra = "堂兄弟、堂姐妹"; |
| | | } |
| | | |
| | | return ra; |
| | | } |
| | | return ra; |
| | | } |
| | | } |
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationVeteransExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngRealAssetsExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngRealCompanyExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVillageServeExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComSwRotaExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/AppletesBackstageConfigDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/EventResourceDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/IdDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/PageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/ComOpsAdvJumpDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/advertisement/PageComOpsAdvDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/api/EventFile.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/api/EventInfo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/api/GridMemberPageListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/api/LcGridMember.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/api/PartiesBody.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/AddComActDynTypeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/CascadeHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussCommentDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussCommentUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussOptionUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActEasyPhotoCommentDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActEasyPhotoCommentUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActQuestnaireAnswerContentDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActQuestnaireDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActQuestnaireSubDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActWorkGuideDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComCvtBusinessDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComCvtCategoryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComCvtServeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComExServicemanDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngCarAppletDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngCarSaveDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationHouseAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationHouseEditAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationHouseEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationTagCardNoDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngPopulationTagDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComOpsHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwDangerReportHandleDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwDangerReportRectifyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwPatrolRecordAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwPatrolRecordPageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwRotaPageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComSwRotaSaveDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/DisabledPersonsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EditComActDynTypeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthAddByFamilyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthElderlyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthFeedbackAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthFeedbackDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthFeedbackEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/EldersAuthTypeQueryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExcelElderAuthDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExcelHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExcelQuestnaireAnswersDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExportComMngCarExcelDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExportRealAssetsExcelDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExportRealCompanyExcelDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExportSpecialUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ExportUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/GrantRewardDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/KeyPersonInfoDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/NoticeReadDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageActWorkGuideDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComActDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComActDiscussCommentDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComActDiscussDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComActDynTypeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComActEasyPhotoCommentDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComCvtBusinessAppletsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComCvtBusinessDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComCvtCategoryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComCvtServeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersAuthElderlyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersAuthHistoryRecordDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersAuthStatisticsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersAuthUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersRecordsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComMngCarDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComMngRealAssetsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComMngRealCompanyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComMngVillageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComOpsHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComStreetDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageCommunityQuestnaireDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageEldersAuthDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageEldersAuthElderlyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageEldersAuthFeedbackDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageEldersAuthHistoryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageEldersAuthRecordDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageQuestnaireDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageQuestnaireSubDetailsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageSysConfDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageVolunteerDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/QuestnaireAnswersDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenStatisticAgeGenderDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenStatisticPartyActivityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/PageBigScreenStatisticPartyOrg.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/event/ScreenDrawEventListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/event/ScreenDrawLngLatDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/event/ScreenEventListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/work/ScreenActActivityListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/work/ScreenActActivityPeopleListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/work/ScreenDiscussListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/work/ScreenMicroListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/AddEasyPhotoActivityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/AddEasyPhotoClassifyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/EditEasyPhotoActivityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/ExportEasyPhotoDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/integral/ComActIntegralCommunityRankDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/integral/admin/AddComActIntegralUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/integral/admin/PageComActIntegralRuleDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/integral/admin/PageComActIntegralTradeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/switchs/SearchCommunityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/ComActWalletDetailDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/ComActWalletSettlementAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletTradeAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletTradeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/elders/ComEldersAuthGetResultDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/elders/ComEldersAuthPageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/elders/ComEldersAuthUserAddAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/AddComMngHousePopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoEditAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoHandleDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoTypeAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoTypeDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComActEasyPhotoTypeEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/ComMngVillageListAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventBatchRepublishDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventCommunityAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventDealDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventDirectReportDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventPublicDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventReportDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventRepublishDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventVerifyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommunityRepublishEventDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/DelComMngHousePopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationAppReleaseAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationAppReleaseDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationAppReleaseEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationUserNoticeAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationUserNoticeDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventApplicationUserNoticeEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventBatchRevokeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventDeleteSingleDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridCascadeListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridDataAddAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridDataAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridDataDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridDataEditAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridDataEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberEditAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberEditStatusDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberGpsLogAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberGpsLogDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberGpsLogEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberPassResetDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberRelationDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberWainDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberWarnLogAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberWarnLogDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberWarnLogEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridMemberWorkTrajectoryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridStatisticsDataDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventGridTodoDataDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventMainMemberAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventMainMemberDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventMainMemberEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventResourceAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventResourceDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventResourceEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventRevokeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventTransferRecordAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventTransferRecordDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventTransferRecordEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventVisitingTasksAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventVisitingTasksDeleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/EventVisitingTasksEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/LcEventVisitingTasksListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/MemberStatisticsAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageComActEasyPhotoDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageComActEasyPhotoTypeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageComMngPopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageComMngVillageBuildHouseAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEasyAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEasyAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventApplicationAppReleaseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventApplicationUserNoticeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridDataAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridDataDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridMemberGpsLogDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridMemberRelationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridMemberWarnLogDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridNearbyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventMainMemberDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventManageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventResourceDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventSpecialPopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventTransferRecordDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventVisitingTasksDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePopulationListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePublicityEventCommunityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePublicityEventDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PublicityEventAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PublicityEventEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/SpecialEventAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/SpecialEventEditDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/SpecialPopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/ComMngPopulationExportDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/ComMngPopulationListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/ComMngPopulationRelationHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/ComMngPopulationSubordinateDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/ComMngVillageListExportAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/EventGridMemberCascadeAddDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/LcGridMemberDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/PageComMngVillagePopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/admin/PageComMngVillagePopulationHouseDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddNeighborCircleTopicAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborAddBrowseAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleDetailAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleTopicAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCommentAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCommentReplyAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborFabulousAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborForwardAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborReplyAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/DetailNeighborAllCommentByAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/DetailNeighborCommentReplyByAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ActivitySignUpDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComListPartyDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComPbActivityDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/ComPbServiceTeamDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/partybuilding/PageComPbServiceTeamDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopAddressDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopCartDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopEditNubCartDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopFundsExportDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopGoodsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopOrderCreateDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopOrderDeliverDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopOrderExportDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopOrderPreviewDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopOrderQueryDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ExcelShopFundsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ExcelShopOrderDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/OrderPayDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComOrderListDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopAddressDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopFundsSearchDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopOrderSearchDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopStoreDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/ComMngUserTagDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/EexcelUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/InputUserTagsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageFeedBackDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageInputUserDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageUserAppletsBackstageDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/SysUserEditTipsDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/SysUserFeedbackDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/EnrollUserByAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/VaccinesByAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/VaccinesEnrollByAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/VaccinesEnrollByAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/VaccinesEnrollUserByAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/vaccines/VaccinesInoculationByAdminDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/visit/EventVisitCompleteDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/wx/TemplateData.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/wx/TemplateParam.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/wx/WxSubscribeDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/AESUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/SerializerBigDecimal.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/DoEncrytDecrypt.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/EncryptDecryptClass.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/EncryptDecryptField.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/EncryptQuery.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/EncryptQueryClass.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/encrypt/IEncryptDecrypt.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/sensitive/Desensitizer.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/helper/sensitive/SensitiveStrategy.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/query/visit/EventTasksQuery.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/query/visit/EventVisitListQuery.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/AppletUserInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/AppletesBackstageConfigVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/BcDictionaryItemVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/BcDictionaryVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/DictionaryVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/EditUserInfoPassAppDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/IPageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/IndexDataKanbanVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/IndexDataVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LiveVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginUserInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/MenuVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/R.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/SystemmanagementConfigVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/WeatherVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvJumpVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvPosVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/advertisement/ComOpsAdvVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/area/AreaInfoVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ActivitySignVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/BatchhouseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActEvaluateExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActEvaluateVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActPictureVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActRegistVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActSignExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActActivityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDiscussCommentVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDiscussOptionVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDiscussVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDynTypeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDynVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoActivityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoCommentVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoFeedbackVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoRewardVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMessageBackVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMessageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishFeedbackVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishOperationRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActQuestnaireAnswerContentVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActQuestnaireAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActReserveCommitVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActUserWalletTradeRewardExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActWorkGuideVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCorrectPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCultPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtBusinessCategoryServeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtBusinessDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtBusinessVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtCategoryVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtServeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComCvtServeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComDisabilityPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComDrugPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthElderlyDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthElderlyVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthHistoryRecordDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthHistoryRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthHistoryVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthRecordForCommunityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthStatisticsDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComEldersAuthUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComExServicemanVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComKeyPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComLowSecurityPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMajorPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngAreaVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngBuildingExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngCarExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngCarVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngCascadeHouseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngCityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationCarVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationCorrectExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationCorrectMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationCultExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationCultMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationDisabilityExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationDisabilityMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationDrugExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationDrugMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationExcelVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationHouseAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationHouseDetailAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationHouseUserAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationImportErrorVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationKeyExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationKeyMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationLowSecurityExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationLowSecurityMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationMajorExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationMajorMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationRehabilitationExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationRehabilitationMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationSentenceExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationSentenceMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationVeteransExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationVeteransMistakeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngProvinceVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealAssetsExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealAssetsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealCompanyBelongsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealCompanyExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealCompanyVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaCityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaProvinceVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructAreaVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructBuildTypeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructHouseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructOtherBuildVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageServeExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageTotalVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngAppletsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComOpsHouseUndercarriageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComOpsHouseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComRehabilitationPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComStreetVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwDangerReportExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwDangerReportVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwPatrolRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwRotaExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwRotaPersonVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwRotaVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComSwSafetyWorkRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComVeteransPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityActivitiesVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/CommunityGovernanceTrendsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EditComMngPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthElderlyExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthFeedbackDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthFeedbackVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthRecordExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/EldersAuthVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/PageComActMessageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ResetComActMessageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/SignactivityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/SysConfVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticAgeGender.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyActivity.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyActivityTopUser.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyBuild.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyDyn.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyMemeber.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyOrg.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/PagePartyOrganizationMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/PartyBuildingMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ExportEasyPhotoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/ComActIntegralCommunityRankVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/ComActIntegralCommunityTradeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/ComActIntegralUserRuleVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/ComActIntegralUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/admin/ComActIntegralUserRuleAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/admin/ComActIntegralUserTradeAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/integral/admin/IntegralUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/EditComActQuestnaireVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireAnswerStatVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireDetailAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireListAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireListVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireStatisticsSummaryAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireStatisticsSummaryExcelAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireStatisticsSummaryHeaderAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaireWriteListAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/QuestnaiteSubVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/UserSubAnswerSelectionStatVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/UsersAnswerQuestnaireVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/UsersAnswerVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/UsersSubAnswerStatVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/questnaire/UsersSubAnswerVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilVillageStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridIncidentStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftDownStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventLeftTopStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventNewStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventTransferRecordDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventTransferRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexDynamicStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexEventGridStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexEventListStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexGridStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/work/ActActivityListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/work/ActActivityPeopleListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/work/DiscussListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/work/MicroListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/switchs/StreetAllAppletsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletRankingVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeStatisticsAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/elders/ComElderAuthUserAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComActEasyPhotoAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComActEasyPhotoDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComActEasyPhotoTypeDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComActEasyPhotoTypeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComActEasyPhotoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComGridActVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComMapGridDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComMngVillageBuildingHouseDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComMngVillageBuildingHouseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/ComMngVillageBuildingVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventApplicationAppReleaseDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventApplicationAppReleaseVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventApplicationUserNoticeDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventApplicationUserNoticeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridCommunityAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridDataAreaVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridDataDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridDataVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberGpsLogDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberGpsLogVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberRelationDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberRelationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberWarnLogAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberWarnLogDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridMemberWarnLogVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventLcGridAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventMainMemberDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventMainMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventMapGridCascadeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventResourceDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventResourceVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventSpecialPopulationDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventSpecialPopulationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventTransferRecordDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventTransferRecordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventVisitingTasksDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventVisitingTasksVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/GridEventStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/GridMemberPositionDTO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/GridMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/PageComMngVillageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/PopulationDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/PopulationListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/UserEventGridDataVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/ComMngPopulationListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/ComMngPopulationVillageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/ComMngSubordinateVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/ComMngVillagePopulationHouseListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/ComMngVillagePopulationListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/GridMemberBuildingVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/GridMemberCascadeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/GridMemberLcListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/PopulationStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/excel/ComMngPopulationExportExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/excel/ComMngVillageExportExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/admin/excel/GridMemberWorkExportExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/integral/ComOpsAccUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/AddNeighborCircleAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ChangeCommentStatusByAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleCommentAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleCommentReplyAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleDetailAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCommentByAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCommentReplyAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCommentReplyByAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/DetailNeighborCircleAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/EditNeighborCircleAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ActivityManagerVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComEldersAuthHistoryExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbDynUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbMemberExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/ComPbServiceTeamVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PageActivityMembersVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyBuildingMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PagePartyOrganizationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingActivityVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberExcelVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingMemberVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyCommitteeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyOrganizationVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/CarouselInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActActivityScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActDiscussScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActEasyPhotoScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActMicroWishScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActNeighborCircleScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActPopulationCultureVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActPopulationScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComActWorkScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComDynamicWorkScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComMngPopulationAgeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ComPbWorkScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/DateScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/DynamicWorkVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EastPhotoTypeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EastPhotoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EventDetailWorkVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EventTypeWorkVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EventWorkScreenVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/EventWorkVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/PbWorkVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/PieElementVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ScreenDrawEventVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopGoodsAttrVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopGoodsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/CapitalDetailVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/CapitalPageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopCartListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopCartStoreVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopCartVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopFundsOrderVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopFundsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopGoodsAttrVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopGoodsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderGoodsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderOperateVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderPageVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderPreviewVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderSearchVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopOrderVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopSysConfVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopUserAddressVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/LoginStoreUserInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/OrderStatisticsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/PageShopGoodsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/PageShopStoreVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ShopOperLogVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ShopStoreVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AdministratorsUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ChangePasswordVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComHouseMemberVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngFamilyInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngHouseVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngTagVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngUserTagVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/CommunityUserInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/InputUserInfoVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/MenuRoleVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/NoticeUnReadVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/RoleVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysMenuVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysOperLogVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserAgreementVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserFeedbackVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserNoticeVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/SysUserVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/UpdateUserArchivesVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/UserArchivesVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/UserPhoneVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/ComMngVaccinesEnrollExcelVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/ComMngVaccinesInoculationExcelVo.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/VaccinesByAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/VaccinesEnrollByAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/VaccinesEnrollUserByAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/VaccinesInoculationByAdminVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/vaccines/VaccinesUserInoculationByAppVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/AppVisitTasksVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitCountVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitListVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitingTasksDetailsVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/visit/EventVisitingTasksVO.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/HanyuPinyinHelper.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/api/ApiServiceFeign.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/grid/GridService.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/partybuilding/PartyBuildingService.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AES.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AddressUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AgeUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/CharsetKit.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ClazzUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Convert.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/CopyUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DifferentLongListUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/EscapeUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ExcelSelectListUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ExcelSelectObject.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ExcelUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FileUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/GisPointUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/HTMLFilter.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/HttpClientFactory.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/HttpClientUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/HttpHelper.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/HttpUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/IPUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/IdCard.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/IdCardUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/IpUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/JWTTokenUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/LngLatUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/LogUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/MessageUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/OrderNoUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ParamRegularUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/PayUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/QRCodeUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RealNameUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ResultUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/RichTextUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SFTPUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ServletUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Snowflake.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SpringUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/StrFormatter.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/StringUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/TencentUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/Threads.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/ValidableList.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxPayUtils.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/validated/AddGroup.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/validated/PageGroup.java
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/validated/PutGroup.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/pom.xml
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/CommunityBackstageApplication.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/aop/OperLogAspect.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ActDynTypeApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BuildingApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActIntegralUserApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActUserWalletApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommonDataApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityConvenientApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityManagerApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityQuestnaireApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/DictionaryApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/DisablePersonApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/DiscussApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EasyPhotoActivityApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EldersAuthApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EldersAuthElderlyApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EldersAuthHistoryApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EldersAuthRecordsApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/HouseApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/IndexApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/LoginApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/MainMemberApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/NeighborApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/PopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ScreenPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ScreenWorkApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/TestApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/UserApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/VaccinesApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/VillageApi.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/biz/KeyPersonBizServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/config/MinioConfig.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/config/MinioUtil.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/config/SFTPConfig.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/easyexcel/UploadEexcelUserDTOListener.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/excel/CustomSheetWriteHandler.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/listen/DisablePersonExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/listen/KeyPersonInfoExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/listen/PartyBuildingMemberExcelListen.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/model/dto/ExcelExportDto.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/model/dto/KeyPersonExcelExportDto.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/model/dto/PartyBuildingMemberDTO.java
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/resources/bootstrap.yml
springcloud_k8s_panzhihuazhihuishequ/grid_app/grid_app.iml
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/GridAppApplication.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/aop/OperLogAspect.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EasyPhotoApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventGridDataApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/LoginApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/MapApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/PopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/PublicityEventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/StatisticsApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/UserApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/VillageApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/VisitingTasksApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/config/SFTPConfig.java
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/GridBackstageApplication.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/aop/OperLogAspect.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/CommonApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EasyPhotoApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventGridDataApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventGridMemberRelationApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventManageApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventVisitingTasksApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/LoginApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/PopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/PublicityEventApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/StatisticsApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/SystemApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/UserApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/VillageApi.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/config/SFTPConfig.java
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/pom.xml
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/ServiceApiApplication.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/aop/OperLogAspect.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/api/LcEventApi.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/api/TokenApi.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/biz/LcApiService.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/biz/impl/LcApiServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/ComMngPopulationDTO.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/GridMemberPageListDTO.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/LcFlowPersonVisitRecordDTO.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/LcGridData.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/LcKeyPersonVisitRecordDTO.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/model/dto/LcKeyPersonVisitRecordQueryDTO.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/test/java/com/panzhihua/serviceapi/biz/impl/DictionData.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/test/java/com/panzhihua/serviceapi/biz/impl/DictionValueData.java
springcloud_k8s_panzhihuazhihuishequ/service_api/src/test/java/com/panzhihua/serviceapi/biz/impl/LcApiServiceImplTest.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/ServiceCommunityApplication.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ActDynTypeApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/AdvertisementApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BuildingApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActIntegralUserApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActMicroWishOperationRecordApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActUserWalletApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComCorrectPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComCultPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComDisabilityPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComDrugPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComKeyPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComLowSecurityPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMajorPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComRehabilitationPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSentencePopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComVeteransPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunitySwitchApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/DictionaryApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/DisablePersonApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/DiscussApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EasyPhotoActivityApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EasyPhotoClassifyApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EldersAuthElderlyApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/HouseApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MainMemberApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/PopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ScreenPopulationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ScreenWorkApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/StreetApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VaccinesApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/WalletApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/WorkGuideApi.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MyMetaObjectHandler.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MybatisPlusConfig.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BcDictionaryDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BcDictionaryItemDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActEvaluateDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActPictureDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActPrizeDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActRegistDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussCommentUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynTypeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoActivityMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoActivityRecordMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoClassifyMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoFeedbackMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoRewardMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActIntegralRuleMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActIntegralUserChangeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActIntegralUserMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActIntegralUserTradeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageBackDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishFeedbackMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishOperationRecordMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleBrowseDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleCommentDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleCommentReplyDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleFabulousDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireAnswerContentDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireSubDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireSubSelectionDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireUserAnswerMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveAnswerContentMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletChangeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletTradeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWorkGuideDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWorkGuideMaterialDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCorrectPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCultPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtBusinessAreaDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtBusinessDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtBusinessIntroduceDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtCategoryDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtServeDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComDisabilityPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComDrugPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEldersAuthElderlyMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEldersAuthHistoryRecordMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEldersAuthStatisticsMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEldersAuthUserMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComExServicemanDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComKeyPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComLowSecurityPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMajorPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngBuildingDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCityDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngDistrictDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationCommunityTagsDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngProvinceDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealAssetsDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDistrictDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructBuildTypeDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructHouseDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructHouseUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngUserTagDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesEnrollRecordDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesInoculationRecordDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVillageDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVolunteerMngDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAccRuleDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAccRuleFuncDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAccUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvJumpDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsAdvPosDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbDynDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComRehabilitationPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSentencePopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopCartDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsAttrDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopGoodsDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOperLogDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderGoodsDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderOperateDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderPayDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopSysConfDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopUserAddressDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComStreetDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSwDangerReportDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSwPatrolRecordDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSwPatrolRecordReportDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSwRotaDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSwSafetyWorkRecordDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComVeteransPopulationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/DisablePersonDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthElderlyDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthFeedbackDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EventResourceMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/GridBuildRelationDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/KeyPersonInfoDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/SysConfMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/BaseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/BcDictionaryDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/BcDictionaryItemDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActEvaluateDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActPictureDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActPrizeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActRegistDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActSignDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActActivityDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussCommentDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussCommentUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussOptionDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussOptionUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDynDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDynTypeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDynUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoActivityDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoActivityRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoClassifyDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoCommentDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoCommentUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoFeedbackDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoRewardDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActEasyPhotoUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActIntegralRuleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActIntegralUserChangeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActIntegralUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActIntegralUserTradeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMessageBackDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMessageDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishFeedbackDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishOperationRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleBrowseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleCommentDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleCommentReplyDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleFabulousDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleTopicDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActQuestnaireAnswerContentDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActQuestnaireDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActQuestnaireSubDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActQuestnaireSubSelectionDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActQuestnaireUserAnswerDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActUserWalletChangeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActUserWalletDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActUserWalletTradeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActWorkGuideDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActWorkGuideMaterialDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCorrectPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCultPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCvtBusinessAreaDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCvtBusinessDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCvtBusinessIntroduceDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCvtCategoryDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComCvtServeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComDisabilityPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComDrugPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthElderlyDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthHistoryRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthStatisticsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComExServicemanDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComKeyPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComLowIncomePeopleCopyDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComLowSecurityPeopleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComLowSecurityPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMajorPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngBuildingDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngCarDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngCityDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngDistrictDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationCommunityTagsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationHouseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationHouseUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngProvinceDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngRealAssetsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngRealCompanyDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructAreaDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructAreaDistrictDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructBuildTypeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructHouseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructHouseUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngStructOtherBuildDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngUserTagDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVaccinesDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVaccinesEnrollRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVaccinesInoculationRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVillageDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngVolunteerMngDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAccRuleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAccRuleFuncDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAccUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvJumpDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsAdvPosDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComOpsHouseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComRehabilitationPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSentencePopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopCartDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopGoodsAttrDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopGoodsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOperLogDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOrderDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOrderGoodsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOrderOperateDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOrderPayDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopStoreDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopSysConfDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopUserAddressDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComStreetDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSwDangerReportDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSwPatrolRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSwPatrolRecordReportDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSwRotaDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComSwSafetyWorkRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComVeteransPopulationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/DisabledPersonsDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EldersAuthDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EldersAuthFeedbackDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/EventResourceDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/GridBuildRelationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/KeyPersonInfoDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/SysConfDO.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ParammeterInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/encrypt/ResultInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/helper/sensitive/SensitiveInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BcDictionaryService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActEvaluateService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActPictureService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActPrizeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActRegistService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActActivityService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActBuildingService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDiscussOptionService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDiscussService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDynService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActDynTypeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoActivityService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoClassifyService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActIntegralRuleService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActIntegralUserChangeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActIntegralUserService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActIntegralUserTradeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActMessageService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActMicroWishOperationRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActMicroWishService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleBrowseService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActQuestnaireService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletChangeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletTradeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActWorkGuideService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComCvtBusinessAreaService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComCvtBusinessIntroduceService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComCvtBusinessService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComCvtCategoryService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComCvtServeService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComEldersAuthElderlyService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComEldersAuthUserService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComExServicemanService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngCarService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationCommunityTagsService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationHouseService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationHouseUserService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngProvinceService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngRealAssetsService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngRealCompanyService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructAreaDistrictService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructAreaService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructHouseService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngStructOtherBuildService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVaccinesEnrollRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVaccinesInoculationRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVaccinesService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVillageService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVolunteerMngService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAccRuleService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsAdvService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComOpsHouseService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopCartService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopGoodsService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopOperLogService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopOrderGoodsService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopOrderOperateService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopOrderService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopStoreService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopSysConfService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopUserAddressService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComStreetService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwDangerReportService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwPatrolRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwSafetyWorkRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/DisabledPersonsService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/EldersAuthFeedbackService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/EldersAuthService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/EventResourceService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/GridBuildRelationService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/KeyPersonInfoService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ScreenWorkService.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcDictionaryServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActPictureServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActPrizeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActRegistServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussOptionServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynTypeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoClassifyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoFeedbackServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoRewardServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralRuleServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserChangeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMessageServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishOperationRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleBrowseServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleCommentReplyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleCommentServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleFabulousServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireAnswerContentServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireSubSelectionServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireSubServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActQuestnaireUserAnswerServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletTradeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCorrectPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCultPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCvtBusinessAreaServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCvtBusinessIntroduceServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCvtBusinessServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCvtCategoryServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComCvtServeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComDisabilityPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComDrugPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthUserServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComExServicemanServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComKeyPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComLowSecurityPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMajorPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationCommunityTagsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseUserServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealAssetsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaDistrictServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructHouseServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructOtherBuildServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVaccinesEnrollRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVaccinesInoculationRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVaccinesServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVolunteerMngServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAccRuleServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsAdvServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComOpsHouseServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComRehabilitationPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSentencePopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopCartServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopGoodsAttrServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopGoodsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOperLogServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderGoodsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderOperateServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderPayServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopSysConfServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopUserAddressServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwDangerReportServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwPatrolRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwSafetyWorkRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComVeteransPopulationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/DisabledPersonsServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthFeedbackServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EventResourceServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/GridBuildRelationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/KeyPersonInfoServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ScreenWorkServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActEvaluateMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActPictureMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActRegistMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActSignMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishFeedbackMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveRecordMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationCommunityTagsMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwDangerReportMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_community/src/test/java/com/panzhihua/service_community/ServiceCommunityApplicationTests.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/ServiceGridApplication.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/BigScreenApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EasyPhotoApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventApplicationAppReleaseApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventApplicationUserNoticeApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventGridDataApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventGridMemberGpsLogApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventGridMemberRelationApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventGridMemberWarnLogApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventMainMemberApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventResourceApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventTransferRecordApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventVisitingTasksApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/LcCompareCodeApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/MapApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/StatisticsApi.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MyMetaObjectHandler.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MybatisPlusConfig.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/ApplicationAppReleaseMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/ComActEasyPhotoMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/ComActEasyPhotoTypeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/ComActEasyPhotoTypeRelationMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventApplicationAppReleaseMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventApplicationUserNoticeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventGridDataMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventGridMemberGpsLogMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventGridMemberRelationMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventGridMemberWarnLogMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMainMemberMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventResourceMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventSpecialCrowdRecordMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventTransferRecordMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventVisitingTasksMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/LcCompareCodeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/LcCompareMemberCodeMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/ApplicationAppRelease.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/BaseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/ComActEasyPhotoDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/ComActEasyPhotoTypeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/ComActEasyPhotoTypeRelationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventApplicationAppReleaseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventApplicationUserNoticeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventGridDataDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventGridMemberGpsLogDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventGridMemberRelationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventGridMemberWarnLogDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventMainMemberDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventResourceDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventSpecialCrowdRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventTransferRecordDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventVisitingTasksDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/LcCompareCodeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/LcCompareCodeMemberDO.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/helper/encrypt/ParammeterInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/helper/encrypt/ResultInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/helper/sensitive/SensitiveInterceptor.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/ComActEasyPhotoService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/ComActEasyPhotoTypeRelationService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/ComActEasyPhotoTypeService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventApplicationAppReleaseService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventApplicationUserNoticeService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventGridDataService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventGridMemberGpsLogService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventGridMemberRelationService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventGridMemberWarnLogService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventMainMemberService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventResourceService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventSpecialCrowdRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventTransferRecordService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventVisitingTasksService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/LcCompareCodeService.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoTypeRelationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoTypeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventApplicationAppReleaseServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventApplicationUserNoticeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventGridDataServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventGridMemberGpsLogServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventGridMemberRelationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventGridMemberWarnLogServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventMainMemberServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventResourceServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventSpecialCrowdRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventTransferRecordServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventVisitingTasksServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/LcCompareCodeServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventSpecialCrowdRecordDOMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventVisitingTasksMapper.xml
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/test/java/com/panzhihua/service_grid/service/impl/EventServiceImplTest.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/test/java/com/panzhihua/service_grid/service/impl/EventVisitingTasksServiceImplTest.java
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/test/java/com/panzhihua/service_grid/service/impl/LcCompareCodeServiceImplTest.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/ServiceDangjianApplication.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/api/PartyBuildIngApi.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MyMetaObjectHandler.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MybatisPlusConfig.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbActivityMemberDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynUserDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberRoleDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbOrgDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbServiceTeamDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbActivityDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbActivityMemberDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbDynDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbDynUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbMemberDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbMemberRoleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbOrgDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbServiceTeamDO.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComBpActivityService.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbMemberService.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/ComPbServiceTeamService.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/PartyOrganizationService.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComBpActivityServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/PartyOrganizationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/ServiceUserApplication.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/config/MyMetaObjectHandler.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/config/MybatisPlusConfig.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/ComMngFamilyInfoDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/ComMngStructHouseDAO.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/EventGridMemberBuildingRelationMapper.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/LcCompareMemberCodeMapper.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/SysMenuDAO.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/SysRoleMenuDAO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/SysUserAgreementDAO.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/SysUserRoleDAO.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/model/dos/ComMngFamilyInfoDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/ComMngStructHouseDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/ComMngUserTagDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/EventGridMemberBuildingRelationDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/LcCompareCodeMemberDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysDeptDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysMenuDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysOperLogDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysRoleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysRoleMenuDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserAgreementDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserFeedbackDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserInputDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserNoticeDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/model/dos/SysUserRoleDO.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/RoleService.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/SysUserInputService.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/EventGridMemberBuildingRelationServiceImpl.java
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/RoleServiceImpl.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/test/java/com/panzhihua/service_user/ServiceUserApplicationTests.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/ShopBackstageApplication.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/aop/OperLogAspect.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/FundsApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/GoodsApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/LogApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/LoginApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/OrderApi.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/config/SFTPConfig.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/filter/StoreValidFilter.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/TimejobApplication.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/config/XxlJobConfig.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/EasyPhotoActivityJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/GridMemberJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/LangChaoEventUploadJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/NeighborCircleJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/PartyBuildingJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/UserJobHandler.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/ZuulApplication.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/AppletWebSecurityConfigurationAdapter.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/RealNamedConfig.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SpringSecurityConfig.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SwaggerConfig.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/AppletAuthenticationFilter.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/SafeboxRequestWrapper.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/SercuritFilter.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/handles/FileUploadExceptionAdvice.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/handles/UserAuthAccessDeniedHandler.java
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/manager/RoleAccessDecisionManager.java |