springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java
New file @@ -0,0 +1,61 @@ package com.panzhihua.common.listen; 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.ComMngPopulationServeExcelVO; import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; import com.panzhihua.common.service.community.CommunityService; import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; import java.util.List; /** * @description: 实有人口导入监听 * @author: llming */ @Slf4j public class ComMngPopulationServeExcelListen extends AnalysisEventListener<ComMngPopulationServeExcelVO> { private CommunityService communityService; private Long communityId; public ComMngPopulationServeExcelListen(CommunityService communityService, Long communityId) { this.communityService = communityService; this.communityId = communityId; } private static final int BATCH_COUNT = 100; private List<ComMngPopulationServeExcelVO> list = new ArrayList<>(); @Override public void invoke(ComMngPopulationServeExcelVO comMngPopulationServeExcelVO, AnalysisContext analysisContext) { list.add(comMngPopulationServeExcelVO); // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM if (list.size() >= BATCH_COUNT) { log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); R r = communityService.listSavePopulationServeExcelVO(list, this.communityId); if (!R.isOk(r)) { throw new ServiceException(r.getMsg()); } //清空list list.clear(); } } @Override public void doAfterAllAnalysed(AnalysisContext analysisContext) { log.info("excel导入数据【{}】", JSONObject.toJSONString(list)); //确保最后遗留的数据保存在数据库中 R r = this.communityService.listSavePopulationServeExcelVO(list, this.communityId); if (!R.isOk(r)) { throw new ServiceException(r.getMsg()); } } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComMngRealCompanyBelongsDTO.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.common.model.dtos.community; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @description: 实有单位归属请求参数 * @author: Null * @date: 2021/3/11 10:36 */ @Data @ApiModel("实有单位归属请求参数") public class ComMngRealCompanyBelongsDTO { @ApiModelProperty(value = "社区名称") private String actName; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java
New file @@ -0,0 +1,59 @@ package com.panzhihua.common.model.vos.community; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; import java.io.Serializable; /** * @description: 批量导入实有人口 * @author: llming */ @Data public class ComMngPopulationServeExcelVO implements Serializable { @ExcelProperty(value = "家庭成员(姓名)" ,index = 0) private String name; @ExcelProperty(value = "性别(1.男 2.女 3.未知)" ,index = 1) private Integer sex; @ExcelProperty(value = "年龄" ,index = 2) private Integer age; @ExcelProperty(value = "是否租住" ,index = 3) private Integer adsf; @ExcelProperty(value = "街路巷" ,index = 4) private String road; @ExcelProperty(value = "门牌号" ,index = 5) private Integer doorNo; @ExcelProperty(value = "楼排号" ,index = 6) private String floor; @ExcelProperty(value = "单元号" ,index = 7) private Integer unitNo; @ExcelProperty(value = "户室(房间号)" ,index = 8) private Integer houseNo; @ExcelProperty(value = "民族" ,index = 9) private String nation; @ExcelProperty(value = "政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)" ,index = 10) private Integer politicalOutlook; @ExcelProperty(value = "身份证号码" ,index = 11) private String cardNo; @ExcelProperty(value = "联系方式" ,index = 12) private String phone; @ExcelProperty(value = "籍贯" ,index = 13) private String nativePlace; @ExcelProperty(value = "工作单位" ,index = 14) private String workCompany; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngRealCompanyBelongsVO.java
New file @@ -0,0 +1,50 @@ package com.panzhihua.common.model.vos.community; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * @description: 实有单位归属 * @author: Null * @date: 2021/3/19 12:02 */ @Data public class ComMngRealCompanyBelongsVO implements Serializable { @ApiModelProperty("省份行政区划代码") private Integer provinceAdcode; @ApiModelProperty("省份行政区划名称") private String provinceName; @ApiModelProperty("城市行政区划代码") private Integer cityAdcode; @ApiModelProperty("城市行政区划名称") private String cityName; /**区县行政区划代码*/ @ApiModelProperty("区县行政区划代码") private Integer districtAdcode; @ApiModelProperty("区县行政区划名称") private String districtName; @ApiModelProperty("街道标识") private Long streetId; @ApiModelProperty("街道名称") private String streetName; @ApiModelProperty("社区名称") private String communityName; @ApiModelProperty("社区id") private Long communityId; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -1560,6 +1560,16 @@ @PostMapping("/village/import") R listSaveVillageServeExcelVO(@RequestBody List<ComMngVillageServeExcelVO> list, @RequestParam(value = "communityId") Long communityId); /** * 批量导入实有人口 * @param list * @param communityId * @return */ @PostMapping("/population/import") R listSavePopulationServeExcelVO(List<ComMngPopulationServeExcelVO> list,@RequestParam(value = "communityId") Long communityId); /** * 分页查询实有人口 * @param comMngPopulationVO 查询参数 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommonDataApi.java
@@ -10,9 +10,7 @@ import com.jcraft.jsch.SftpException; import com.panzhihua.common.constants.Constants; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.listen.ComMngCarExcelListen; import com.panzhihua.common.listen.ComMngRealAssetsExcelListen; import com.panzhihua.common.listen.ComMngRealCompanyExcelListen; import com.panzhihua.common.listen.*; import com.panzhihua.common.model.dtos.community.*; import com.panzhihua.common.model.dtos.user.*; import com.panzhihua.common.model.vos.LoginUserInfoVO; @@ -75,6 +73,7 @@ private String companyUrl = "http://panzhihua.nhys.cdnhxx.com/web/%e5%ae%9e%e6%9c%89%e5%8d%95%e4%bd%8d%e5%af%bc%e5%85%a5%e6%a8%a1%e6%9d%bf.xlsx"; @Value("${excel.assetsUrl}") private String assetsUrl = "http://panzhihua.nhys.cdnhxx.com/web/%e5%ae%9e%e6%9c%89%e5%8d%95%e4%bd%8d%e5%af%bc%e5%85%a5%e6%a8%a1%e6%9d%bf.xlsx"; private String excelPopulationUrl="http://panzhihua.nhys.cdnhxx.com/web/实有人口导入.xlsx"; // FTP 登录用户名 @Value("${ftp.username}") @@ -536,6 +535,12 @@ } @ApiOperation(value = "实有单位归属地", response = ComMngRealCompanyVO.class) @GetMapping("/company/belongs") public R belongsComMngRealCompany(@RequestBody ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO) { return communityService.belongsComMngRealCompany(comMngRealCompanyBelongsDTO); } ///////////// @ApiOperation(value = "分页查询实有资产列表", response = ComMngRealAssetsVO.class) @@ -682,6 +687,31 @@ return communityService.pagePopulation(comMngPopulationVO); } @ApiOperation(value = "下载模板-实有人口") @GetMapping(value = "/serve/download/population/template") public R downloadPopulationTemplate(HttpServletResponse response) throws IOException, SftpException { return R.ok(excelPopulationUrl); } @ApiOperation(value = "excel导入实有人口") @PostMapping(value = "/serve/population/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") public R downloadPopulationTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { //获取文件名 String fileName = file.getOriginalFilename(); log.info("传入文件名字【{}】", fileName); InputStream inputStream = null; try { inputStream = file.getInputStream(); LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); ComMngPopulationServeExcelListen comMngPopulationServeExcelListen = new ComMngPopulationServeExcelListen(communityService, loginUserInfo.getCommunityId()); EasyExcel.read(inputStream, ComMngPopulationServeExcelVO.class, comMngPopulationServeExcelListen).sheet().doRead(); } catch (IOException e) { log.error("导入模板失败【{}】", e.getMessage()); e.printStackTrace(); } return R.ok(); } @ApiOperation(value = "实有人口详情", response = ComMngPopulationVO.class) @PostMapping("/population/detail") public R detailPopulation(@RequestParam(value = "populationId") Long populationId) { @@ -724,5 +754,5 @@ util.exportExcel("实有人口导入模板", "实有人口导入模板", columnNames, list, response, ExportExcelUtil.EXCEl_FILE_2007); } } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/VillageApi.java
@@ -34,7 +34,6 @@ @RestController @RequestMapping("/villagemanager/") public class VillageApi extends BaseController { @Value("${excel.convenientUrl}") private String excelConvenientUrl = "http://panzhihua.nhys.cdnhxx.com/web/实有房屋导入模板.xlsx"; @Resource private CommunityService communityService; springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
@@ -73,7 +73,7 @@ /** * 社区后台导入实有房屋 * @param list 车辆列表 * @param list 数据 * @param communityId 社区编号 * @return */ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java
@@ -6,6 +6,7 @@ import com.panzhihua.common.service.user.UserService; import com.panzhihua.service_community.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -131,6 +132,10 @@ return comMngRealCompanyService.detailComMngRealCompany(id); } @GetMapping("/company/belongs") public R belongsComMngRealCompany(@RequestBody ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO) { return comMngRealCompanyService.belongsComMngRealCompany(comMngRealCompanyBelongsDTO); } /** * 社区后台导入实有单位 * @param list 车实有单位列表 @@ -259,6 +264,18 @@ } /** * 社区后台导入实有人口 * @param list 数据 * @param communityId 社区编号 * @return */ @PostMapping("/population/import") @Transactional(rollbackFor = Exception.class) public R listSavePopulationExcelVO(@RequestBody List<ComMngPopulationServeExcelVO> list, @RequestParam(value = "communityId") Long communityId){ return comMngPopulationService.listSavePopulation(list,communityId); } /** * 根据实有人口id查询详情 * @param populationId 实有人口id * @return 实有人口详情查询结果 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyBelongsVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; import com.panzhihua.service_community.model.dos.ComMngRealCompanyDO; @@ -74,4 +76,31 @@ " order by t.create_at desc"+ "</script>") List<ComMngRealCompanyExcelVO> exportRealCompanyExcel(@Param(value = "exportRealCompanyExcelDTO") ExportRealCompanyExcelDTO exportRealCompanyExcelDTO); @Select("<script> " + " SELECT distinct " + " act.province_code AS provinceAdcode, " + " act.city_code AS cityAdcode, " + " act.area_code AS districtAdcode, " + " pr.province_name AS provinceName, " + " cty.city_name AS cityName, " + " dis.district_name AS districtName, " + " street.name AS streetName, " + " act.name AS communityName, " + " street.street_id AS streetId, " + " act.community_id AS communityId " + " FROM " + " com_act act " + " LEFT JOIN com_street street ON act.street_id = street.street_id " + " LEFT join com_mng_struct_area_province pr on street.province_code = pr.province_adcode " + " LEFT join com_mng_struct_area_city cty on street.city_code = cty.city_adcode " + " LEFT join com_mng_struct_area_district dis on street.area_code = dis.district_adcode " + " WHERE 1=1 " + "<if test='pageComMngRealCompanyBelongsDTO.actName != null and pageComMngRealCompanyBelongsDTO.actName.trim() != ""'>" + " and act.name = #{pageComMngRealCompanyBelongsDTO.actName} " + " </if> " + " order by act.create_at desc "+ " limit 1 "+ "</script>") ComMngRealCompanyBelongsVO queryComMngRealCompanyBelongs(@Param(value = "pageComMngRealCompanyBelongsDTO") ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
@@ -3,9 +3,12 @@ import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import java.util.List; /** * 实有人口Service @@ -52,6 +55,14 @@ * @return 删除结果 */ R deletePopulation(Long populationId); /** * 导入实有人口 * @param list * @param communityId * @return */ R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId); /** * 根据实有人口id修改用户标签 * @param populationTagDTO 请求参数 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngRealCompanyService.java
@@ -1,6 +1,7 @@ package com.panzhihua.service_community.service; import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; @@ -52,4 +53,12 @@ * @return */ R exportRealCompanyExcel(ExportRealCompanyExcelDTO exportRealCompanyExcelDTO); /** * 实有单位详情 * @param comMngRealCompanyBelongsDTO * @return */ R belongsComMngRealCompany(ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -4,13 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; import com.panzhihua.common.model.dtos.community.PageComActDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActActivityVO; import com.panzhihua.common.model.vos.community.ComActVO; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; import com.panzhihua.service_community.dao.ComActActivityDAO; import com.panzhihua.service_community.dao.ComActDAO; @@ -18,6 +17,7 @@ import com.panzhihua.service_community.model.dos.ComActActivityDO; import com.panzhihua.service_community.model.dos.ComActDO; import com.panzhihua.service_community.model.dos.ComMngPopulationDO; import com.panzhihua.service_community.model.dos.ComMngVillageDO; import com.panzhihua.service_community.service.ComMngPopulationService; import org.springframework.beans.BeanUtils; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; @@ -40,27 +40,30 @@ /** * 新增实有人口 * * @param comMngPopulationVO 新增信息 * @return 新增结果 */ @Override public R addPopulation(ComMngPopulationVO comMngPopulationVO) { ComMngPopulationDO comMngPopulationDO=new ComMngPopulationDO(); ComMngPopulationDO comMngPopulationDO = new ComMngPopulationDO(); Integer integer = populationDAO.selectCount(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getCardNo, comMngPopulationVO.getCardNo())); if (integer>0) { if (integer > 0) { return R.fail("实有人口已经存在"); } BeanUtils.copyProperties(comMngPopulationVO,comMngPopulationDO); BeanUtils.copyProperties(comMngPopulationVO, comMngPopulationDO); int nub = populationDAO.insert(comMngPopulationDO); if(nub < 1){ if (nub < 1) { return R.fail(); } return R.ok(nub); } /** * 编辑实有人口 * * @param comMngPopulationVO 编辑内容 * @return 编辑结果 */ @@ -70,10 +73,10 @@ if (comMngPopulationDO == null) { return R.fail("未查询到人口记录"); } BeanUtils.copyProperties(comMngPopulationVO,comMngPopulationDO); BeanUtils.copyProperties(comMngPopulationVO, comMngPopulationDO); int nub = populationDAO.updateById(comMngPopulationDO); if(nub < 1){ if (nub < 1) { return R.fail(); } return R.ok(); @@ -104,11 +107,11 @@ return R.fail(); } ComMngPopulationVO comMngPopulationVO = new ComMngPopulationVO(); BeanUtils.copyProperties(comMngPopulationDO,comMngPopulationVO); BeanUtils.copyProperties(comMngPopulationDO, comMngPopulationVO); //查询家庭成员信息 List<ComMngFamilyInfoVO> comMngFamilyInfoVOS = populationDAO.listFamilyByUserId(comMngPopulationDO.getId()); if(!comMngFamilyInfoVOS.isEmpty()){ if (!comMngFamilyInfoVOS.isEmpty()) { comMngPopulationVO.setComMngFamilyInfoVOS(comMngFamilyInfoVOS); } return R.ok(comMngPopulationVO); @@ -125,10 +128,10 @@ Page page = new Page<>(); Long pageNum = comMngPopulationVO.getPageNum(); Long pageSize = comMngPopulationVO.getPageSize(); if (null==pageNum||0==pageNum) { if (null == pageNum || 0 == pageNum) { pageNum = 1l; } if (null==pageSize||0==pageSize) { if (null == pageSize || 0 == pageSize) { pageSize = 10l; } page.setSize(pageSize); @@ -146,7 +149,7 @@ @Override public R deletePopulation(Long populationId) { int delete = populationDAO.deleteById(populationId); if (delete>0) { if (delete > 0) { return R.ok(); } return R.fail(); @@ -160,17 +163,80 @@ @Override public R listPopulationAll() { List<ComMngPopulationDO> populationDOS = populationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().orderByDesc(ComMngPopulationDO::getCreateAt)); List<ComMngPopulationVO> populationVOS=new ArrayList<>(); List<ComMngPopulationVO> populationVOS = new ArrayList<>(); if (!ObjectUtils.isEmpty(populationDOS)) { populationDOS.forEach(comActDO -> { ComMngPopulationVO populationVO=new ComMngPopulationVO(); BeanUtils.copyProperties(comActDO,populationVO); ComMngPopulationVO populationVO = new ComMngPopulationVO(); BeanUtils.copyProperties(comActDO, populationVO); populationVOS.add(populationVO); }); } return R.ok(populationVOS); } @Override public R listSavePopulation(List<ComMngPopulationServeExcelVO> list, Long communityId) { /* //思路:实有房屋(小区)当前是存在重复人口,打印已经存在的重复数据 List<ComMngPopulationDO> comMngPopulationDOS = populationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId, communityId)); if (list.size() == 0) { return R.fail("数据为空!"); } judgeEmpty(list); ComActDO comActDO = comActDAO.selectById(communityId); ArrayList<ComMngVillageDO> comMngVillageDOS = Lists.newArrayList(); list.forEach(vo -> { ComMngVillageDO comMngVillageDO = new ComMngVillageDO(); BeanUtils.copyProperties(vo, comMngVillageDO); comMngVillageDO.setCommunityId(comActDO.getCommunityId()); comMngVillageDO.setStreetId(comActDO.getStreetId()); comMngVillageDOS.add(comMngVillageDO); }); this.saveBatch(comMngVillageDOS); return R.ok("共计导入实有房屋数量:" + comMngVillageDOS.size());*/ return null; } /** * excel数据校验 * * @param list */ private void judgeEmpty(List<ComMngPopulationServeExcelVO> list) { /*int index = 2; for (ComMngPopulationServeExcelVO vo : list) { ComMngPopulationServeExcelVO comMngPopulationServeExcelVO = new ComMngPopulationServeExcelVO(); comMngPopulationServeExcelVO.setName(""); comMngPopulationServeExcelVO.setSex(0); comMngPopulationServeExcelVO.setAge(0); comMngPopulationServeExcelVO.setAdsf(0); comMngPopulationServeExcelVO.setRoad(""); comMngPopulationServeExcelVO.setDoorNo(0); comMngPopulationServeExcelVO.setFloor(""); comMngPopulationServeExcelVO.setUnitNo(0); comMngPopulationServeExcelVO.setHouseNo(0); comMngPopulationServeExcelVO.setNation(""); comMngPopulationServeExcelVO.setPoliticalOutlook(0); comMngPopulationServeExcelVO.setCardNo(""); comMngPopulationServeExcelVO.setPhone(""); comMngPopulationServeExcelVO.setNativePlace(""); comMngPopulationServeExcelVO.setWorkCompany(""); if (vo.get() == null) { return R.fail("门牌号第" + index + "行为空!"); } if (vo.getAlley() == null) { return R.fail("街路巷第" + index + "行为空!"); } //判断DB和exel数据重复判断 boolean result = comMngVillageDOs.stream().allMatch(village -> village.getAlley().equals(vo.getAlley()) && village.getHouseNum().equals(vo.getHouseNum())); if (result) { return R.fail("导入街路巷已存在(" + vo.getAlley() + ")"); } index++; }*/ } /** * 根据id修改实有人口标签 * @param populationTagDTO 请求参数 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealCompanyServiceImpl.java
@@ -4,10 +4,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngCarVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyBelongsVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO; import com.panzhihua.service_community.dao.ComMngRealCompanyDAO; @@ -132,4 +133,11 @@ List<ComMngRealCompanyExcelVO> list = comMngRealCompanyDAO.exportRealCompanyExcel(exportRealCompanyExcelDTO); return R.ok(list); } @Override public R belongsComMngRealCompany(ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO) { ComMngRealCompanyBelongsVO comMngRealCompanyBelongsVO = comMngRealCompanyDAO.queryComMngRealCompanyBelongs(comMngRealCompanyBelongsDTO); return R.ok(comMngRealCompanyBelongsVO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -109,10 +109,10 @@ @Override public R listSaveVillage(List<ComMngVillageServeExcelVO> list, Long communityId) { //思路:获取社区下所有的实有房屋(小区),打印已经存在的重复数据 List<ComMngVillageDO> comMngVillageDOs = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId, communityId)); if (list.size() == 0) { return R.fail("数据为空!"); } List<ComMngVillageDO> comMngVillageDOs = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId, communityId)); int index = 2; for (ComMngVillageServeExcelVO vo : list) { if (vo.getHouseNum() == null) {