diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/AdminFeignClient.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/AdminFeignClient.java index 6de226a..3046517 100644 --- a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/AdminFeignClient.java +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/AdminFeignClient.java @@ -2,7 +2,9 @@ package com.elink.esua.epdc.modules.feign; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.AllDeptDTO; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.SysSimpleDictDTO; import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; import com.elink.esua.epdc.modules.feign.fallback.AdminFeignClientFallback; @@ -53,4 +55,32 @@ public interface AdminFeignClient { **/ @PostMapping("sys/dict/listPopulationSimple") Result> listPopulationSimple(@RequestBody SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO); + + /** + * 根据数据字典类型获取简版数据字典列表,用于页面下拉菜单 + * @param dictType + * @return + */ + @GetMapping("/sys/dict/listSimple/{dictType}") + Result> listSimpleDictInfo(@PathVariable("dictType") String dictType); + + /** + * @return io.pingyin.modules.sys.dto.AllDeptDTO + * @describe: 根据网格名称获取部门信息 + * @author wgf + * @date 2022/4/25 21:54 + * @params [gridName] + */ + @GetMapping("/sys/dept/getAllDeptInfoByGridName/{gridName}") + Result getAllDeptInfoByGridName(@PathVariable("gridName") String gridName); + + /** + * @return io.pingyin.modules.sys.dto.AllDeptDTO + * @describe: 根据网格gridName获取所有相关部门 + * @author wgf + * @date 2022/4/25 21:54 + * @params [gridName] + */ + @GetMapping("/sys/dept/getAllDeptInfoByName/{gridName}") + Result getAllDeptInfoByName(@PathVariable("gridName") String gridName); } diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/fallback/AdminFeignClientFallback.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/fallback/AdminFeignClientFallback.java index 13f80a9..d5eb6f5 100644 --- a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/fallback/AdminFeignClientFallback.java +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/feign/fallback/AdminFeignClientFallback.java @@ -3,7 +3,9 @@ package com.elink.esua.epdc.modules.feign.fallback; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.AllDeptDTO; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.SysSimpleDictDTO; import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; import com.elink.esua.epdc.modules.feign.AdminFeignClient; @@ -33,4 +35,19 @@ public class AdminFeignClientFallback implements AdminFeignClient { public Result> listPopulationSimple(SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listPopulationSimple", sysPopulationSimpleDictFormDTO); } + + @Override + public Result> listSimpleDictInfo(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listSimple", dictType); + } + + @Override + public Result getAllDeptInfoByGridName(String gridName) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAllDeptInfoByGridName", gridName); + } + + @Override + public Result getAllDeptInfoByName(String gridName) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAllDeptInfoByName", gridName); + } } diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/BuildingUnitController.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/BuildingUnitController.java new file mode 100644 index 0000000..74aceac --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/BuildingUnitController.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.controller; + + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.personroom.EpidemicBuildingUnitDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicBuildingUnitDetailResultDTO; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicBuildingUnitExcel; +import com.elink.esua.epdc.modules.personroom.service.EpidemicBuildingUnitService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@RestController +@RequestMapping("epidemicbuildingunit") +public class BuildingUnitController { + + @Autowired + private EpidemicBuildingUnitService epidemicBuildingUnitService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = epidemicBuildingUnitService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + EpidemicBuildingUnitDetailResultDTO data = epidemicBuildingUnitService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EpidemicBuildingUnitDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + return epidemicBuildingUnitService.saveNew(dto); + } + + @PutMapping + public Result update(@RequestBody EpidemicBuildingUnitDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + return epidemicBuildingUnitService.updateNew(dto); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + epidemicBuildingUnitService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = epidemicBuildingUnitService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EpidemicBuildingUnitExcel.class); + } + + @GetMapping("updateOwner") + public Result updateOwner() { + epidemicBuildingUnitService.updateOwner(); + return new Result(); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/EpidemicPlotBuildingErrorController.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/EpidemicPlotBuildingErrorController.java new file mode 100644 index 0000000..05ff4fa --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/EpidemicPlotBuildingErrorController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingErrorDTO; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicPlotBuildingErrorExcel; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotBuildingErrorService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@RestController +@RequestMapping("epidemicplotbuildingerror") +public class EpidemicPlotBuildingErrorController { + + @Autowired + private EpidemicPlotBuildingErrorService epidemicPlotBuildingErrorService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = epidemicPlotBuildingErrorService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + EpidemicPlotBuildingErrorDTO data = epidemicPlotBuildingErrorService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EpidemicPlotBuildingErrorDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + epidemicPlotBuildingErrorService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EpidemicPlotBuildingErrorDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + epidemicPlotBuildingErrorService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + epidemicPlotBuildingErrorService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = epidemicPlotBuildingErrorService.getErrorExcelList(params); + ExcelUtils.exportExcelToTarget(response, null, list, EpidemicPlotBuildingErrorExcel.class); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotBuildingController.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotBuildingController.java new file mode 100644 index 0000000..dd77262 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotBuildingController.java @@ -0,0 +1,123 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.controller; + + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotBuildingResultDTO; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicPlotBuildingExcel; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotBuildingService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@RestController +@RequestMapping("epidemicplotbuilding") +public class PlotBuildingController { + + @Autowired + private EpidemicPlotBuildingService epidemicPlotBuildingService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = epidemicPlotBuildingService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + EpidemicPlotBuildingResultDTO data = epidemicPlotBuildingService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EpidemicPlotBuildingDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + epidemicPlotBuildingService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody EpidemicPlotBuildingDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + epidemicPlotBuildingService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + return epidemicPlotBuildingService.delete(ids); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = epidemicPlotBuildingService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EpidemicPlotBuildingExcel.class); + } + + /** + * 小区楼栋房间绑定下拉框 + * + * @param formDTO + * @return io.pingyin.common.utils.Result> + * @author zhy + * @date 2022/4/2 14:47 + */ + @GetMapping("getBuildingOption") + public Result> getBuildingOption(EpidemicPlotBuildingDTO formDTO) { + List list = epidemicPlotBuildingService.getBuildingOption(formDTO); + return new Result>().ok(list); + } + + /** + * @describe: 导入房屋信息 + * @author wangtong + * @date 2022/4/25 17:01 + * @params [file] + * @return io.pingyin.common.utils.Result + */ + @PostMapping("importBuilding") + public Result importBuilding(@RequestParam("file") MultipartFile file) { + return epidemicPlotBuildingService.importBuilding(file); + } +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotCoordinateController.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotCoordinateController.java new file mode 100644 index 0000000..c66c441 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/controller/PlotCoordinateController.java @@ -0,0 +1,158 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateDTO; +import com.elink.esua.epdc.dto.personroom.form.EpidemicPlotCoordinateFormDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicPlotCoordinateExcel; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotCoordinateService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@RestController +@RequestMapping("epidemicplotcoordinate") +public class PlotCoordinateController { + + @Autowired + private EpidemicPlotCoordinateService epidemicPlotCoordinateService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = epidemicPlotCoordinateService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + EpidemicPlotCoordinateDTO data = epidemicPlotCoordinateService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody EpidemicPlotCoordinateDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + return epidemicPlotCoordinateService.saveNew(dto); + } + + @PutMapping + public Result update(@RequestBody EpidemicPlotCoordinateDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + epidemicPlotCoordinateService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + return epidemicPlotCoordinateService.delete(ids); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = epidemicPlotCoordinateService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, EpidemicPlotCoordinateExcel.class); + } + + /** + * [补充]根据街道编码查询小区/村庄列表 + * + * @param formDTO + * @return + * @Author wanggongfeng + */ + @GetMapping("simplePlot/getList") + public Result listSimple(EpidemicPlotCoordinateFormDTO formDTO) { + //效验数据 + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); + return epidemicPlotCoordinateService.listSimple(formDTO); + } + + @GetMapping("getList") + public Result> getList() { + List list = epidemicPlotCoordinateService.getList(); + return new Result>().ok(list); + } + + /** + * 小区楼栋房间绑定下拉框 + * + * @param formDTO + * @return io.pingyin.common.utils.Result> + * @author zhy + * @date 2022/4/2 14:47 + */ + @GetMapping("getPlotOption") + public Result> getPlotOption(EpidemicPlotCoordinateDTO formDTO) { + List list = epidemicPlotCoordinateService.getPlotOption(formDTO); + return new Result>().ok(list); + } + + /** + * 更新小区网格关系 + * + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/4/2 14:48 + */ + @GetMapping("updateRelation") + public Result updateRelation() { + epidemicPlotCoordinateService.updateRelation(); + return new Result(); + } + + /** + * 批量导入 + * + * @param file + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/4/6 14:46 + */ + @PostMapping("importExcel") + public Result importExcel(@RequestParam("file") MultipartFile file) { + return epidemicPlotCoordinateService.importExcel(file); + } + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicBuildingUnitDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicBuildingUnitDao.java new file mode 100644 index 0000000..72909c5 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicBuildingUnitDao.java @@ -0,0 +1,78 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.personroom.EpidemicBuildingUnitDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicBuildingUnitDetailResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Mapper +public interface EpidemicBuildingUnitDao extends BaseDao { + + /** + * 查询楼栋关联房屋 + * + * @param buildingId + * @return java.util.List + * @author zhy + * @date 2022/2/15 14:50 + */ + List selectByBuildingId(@Param("buildingId") String buildingId); + + /** + * 获取房屋列表 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/4/6 17:22 + */ + List getUnitPage(Map params); + + /** + * 获取详情 + * + * @param id + * @return io.pingyin.modules.personroom.dto.result.EpidemicBuildingUnitDetailResultDTO + * @author zhy + * @date 2022/4/12 14:54 + */ + EpidemicBuildingUnitDetailResultDTO selectDetailById(String id); + + /** + * 查询旧关系数据 + * + * @param + * @return java.util.List + * @author zhy + * @date 2022/4/12 9:09 + */ + List selectOldData(); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingDao.java new file mode 100644 index 0000000..782f65b --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingDao.java @@ -0,0 +1,134 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotBuildingResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Mapper +public interface EpidemicPlotBuildingDao extends BaseDao { + + /** + * 查询小区关联楼栋 + * + * @param plotId + * @return java.util.List + * @author zhy + * @date 2022/2/15 14:48 + */ + List selectByPlotId(@Param("plotId") String plotId); + + /** + * 获取小区列表 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/4/7 15:23 + */ + List getBuildingPage(Map params); + + /** + * 楼栋列表下拉框 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/2/15 13:38 + */ + List getBuildingOption(EpidemicPlotBuildingDTO formDTO); + + /** + * 查询详情 + * + * @param id + * @return io.pingyin.modules.personroom.dto.result.EpidemicPlotBuildingResultDTO + * @author zhy + * @date 2022/4/12 14:56 + */ + EpidemicPlotBuildingResultDTO selectDetailById(String id); + + /** + * @describe: 通过网格id获取该网格下排序最大的房屋编码 + * @author wangtong + * @date 2022/4/25 14:06 + * @params [gridId] + * @return java.lang.Integer + */ + Integer getMaxIndexByGridId(@Param("gridId") String gridId); + + /** + * @describe: 通过网格id 小区名称 楼栋名称查询 + * @author wangtong + * @date 2022/4/25 20:37 + * @params [record] + * @return io.pingyin.modules.personroom.entity.EpidemicPlotBuildingEntity + */ + EpidemicPlotBuildingEntity selectByGridPlotAndName(@Param("plotId") String plotId, @Param("buildingName") String buildingName + , @Param("gridId") String gridId); + + /** + * @describe: 通过楼栋编码查询 + * @author wangtong + * @date 2022/4/25 22:24 + * @params [buildingCode] + * @return io.pingyin.modules.personroom.entity.EpidemicPlotBuildingEntity + */ + EpidemicPlotBuildingEntity selectByBuildingCode(@Param("buildingCode") String buildingCode); + + /** + * @describe: 更新 确认编码是否重复 + * @author wangtong + * @date 2022/4/27 12:06 + * @params [dto] + * @return java.util.List + */ + List selectExistUpdate(EpidemicPlotBuildingDTO dto); + + /** + * @describe: 更新 确认名称是否重复 + * @author wangtong + * @date 2022/4/27 12:10 + * @params [dto] + * @return java.util.List + */ + List selectExistByName(EpidemicPlotBuildingDTO dto); + + /** + * @describe: 物理删除数据 + * @author wangtong + * @date 2022/4/27 16:47 + * @params [asList] + * @return void + */ + void realDeleteBatchIds(@Param("ids") List ids); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingErrorDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingErrorDao.java new file mode 100644 index 0000000..ba02ed7 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotBuildingErrorDao.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingErrorDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingErrorEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Mapper +public interface EpidemicPlotBuildingErrorDao extends BaseDao { + + /** + * @describe: 导出错误信息 + * @author wangtong + * @date 2022/4/25 20:30 + * @params [params] + * @return java.util.List + */ + List getErrorExcelList(Map params); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateDao.java new file mode 100644 index 0000000..3099be9 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateDao.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateDTO; +import com.elink.esua.epdc.dto.personroom.form.EpidemicPlotCoordinateFormDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Mapper +public interface EpidemicPlotCoordinateDao extends BaseDao { + + /** + * [补充]根据街道编码查询小区/村庄列表 + * + * @param formDTO + * @return Result + * @author wanggongfeng + * @date 2021-07-10 + */ + List listSimple(EpidemicPlotCoordinateFormDTO formDTO); + + /** + * 获取查询列表 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/4/11 16:52 + */ + List getPlotPage(Map params); + + /** + * 获取全部坐标信息 + * + * @param + * @return java.util.List + * @author zhy + * @date 2021/12/3 16:57 + */ + List getList(); + + /** + * 小区列表下拉框 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/2/15 13:38 + */ + List getPlotOption(EpidemicPlotCoordinateDTO formDTO); + + /** + * 获取旧数据 + * + * @return java.util.List + * @author zhy + * @date 2022/2/15 13:38 + */ + List getOldData(); + + /** + * 地理坐标的单条查询 + */ + EpidemicPlotCoordinateResultDTO getCoordinate(String plot, String gridId); + + /** + * @describe: 根据网格id获取所有小区 + * @author wangtong + * @date 2022/4/25 18:47 + * @params [gridId] + * @return java.util.List + */ + List getListByGridId(@Param("gridId") String gridId); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateErrorDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateErrorDao.java new file mode 100644 index 0000000..4649d04 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotCoordinateErrorDao.java @@ -0,0 +1,57 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateErrorDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateErrorEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +@Mapper +public interface EpidemicPlotCoordinateErrorDao extends BaseDao { + + /** + * 根据编号获取最新插入的数据集合 + * + * @param no + * @return java.util.List + * @author zhy + * @date 2021/11/24 9:08 + */ + List getErrorInfoByNo(@Param("no") Long no); + + /** + * 删除数据数据集合 + * + * @param no + * @return void + * @author zhy + * @date 2021/11/24 9:08 + */ + int deleteErrorInfoByNo(@Param("no") Long no); + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotGridDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotGridDao.java new file mode 100644 index 0000000..8aa7533 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicPlotGridDao.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +@Mapper +public interface EpidemicPlotGridDao extends BaseDao { + + /** + * 根据小区ID删除 + * + * @param plotId + * @return int + * @author zhy + * @date 2022/4/2 14:02 + */ + int deleteByPlotId(@Param("plotId") Long plotId); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicUnitOwnerDao.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicUnitOwnerDao.java new file mode 100644 index 0000000..46b0d81 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/dao/EpidemicUnitOwnerDao.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicUnitOwnerEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +@Mapper +public interface EpidemicUnitOwnerDao extends BaseDao { + + /** + * 根据单元ID删除 + * + * @param unitId + * @return int + * @author zhy + * @date 2022/4/2 14:02 + */ + int deleteByUnitId(@Param("unitId") Long unitId); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicBuildingUnitEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicBuildingUnitEntity.java new file mode 100644 index 0000000..e0be48e --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicBuildingUnitEntity.java @@ -0,0 +1,173 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_building_unit") +public class EpidemicBuildingUnitEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小区.村ID + */ + @TableField(strategy = FieldStrategy.IGNORED) + private Long buildingId; + + /** + * 道路名称 + */ + private String roadName; + + /** + * 单元 + */ + private String unit; + + /** + * 房间号 + */ + private String roomNo; + + /** + * 房屋类型 + */ + private String roomType; + + /** + * 房屋用途 + */ + private String roomUse; + + /** + * 房屋状态 + */ + private String roomStatus; + + /** + * 居住情况 + */ + private String livingStatus; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 手机号 + */ + private String mobile; + + /** + * 详细地址 + */ + private String address; + + /** + * 是否出租 + */ + private String isRental; + + /** + * 出租用途 + */ + private String rentalPurpose; + + /** + * 承租人姓名 + */ + private String lesseeName; + + /** + * 承租人身份证 + */ + private String lesseeIdCard; + + /** + * 承租人手机 + */ + private String lesseeMobile; + + /** + * 承租人单位 + */ + private String lesseeUnit; + + /** + * 承租时间(日) + */ + private String lesseeTime; + + /** + * 承租日期 + */ + @TableField(strategy = FieldStrategy.IGNORED) + private Date lesseeDate; + + /** + * 社区/村庄 + */ + private String communityName; + + /** + * 社区/村庄ID + */ + private String communityId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 街道名 + */ + private String streetName; + + /** + * 街道编码 + */ + private String streetId; +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingEntity.java new file mode 100644 index 0000000..05005b9 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingEntity.java @@ -0,0 +1,210 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_plot_building") +public class EpidemicPlotBuildingEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小区/村ID + */ + private Long plotId; + + /** + * 楼栋名称 + */ + private String buildingName; + + /** + * 楼栋类型(字典项building_type) + */ + private String buildingType; + + /** + * 楼层数 + */ + private Integer floorNum; + + /** + * 房间数 + */ + private Integer roomNum; + + /** + * 住户数 + */ + private Integer householdNum; + + /** + * 街道名成 + */ + private String streetName; + + /** + * 街道ID + */ + private String streetId; + + /** + * 街道ID + */ + private String streetDeptId; + + /** + * 社区名称 + */ + private String communityName; + + /** + * 社区ID + */ + private String communityId; + + /** + * 社区ID + */ + private String communityDeptId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格ID + */ + private String gridDeptId; + + /** + * 楼栋唯一编码(网格编码+三位数字) + */ + private String buildingCode; + + /** + * 楼栋经度 + */ + private BigDecimal buildingLongitude; + + /** + * 楼栋纬度 + */ + private BigDecimal buildingLatitude; + + /** + * 楼栋经度第三方 + */ + private BigDecimal buildingLongitudeDsf; + + /** + * 楼栋纬度第三方 + */ + private BigDecimal buildingLatitudeDsf; + + /** + * 楼栋状态(字典项XXX) + */ + private String buildingState; + + /** + * 房屋面积m² + */ + private String buildingArea; + + /** + * 楼长姓名 + */ + private String assisantName; + + /** + * 楼长电话 + */ + private String assisantMobile; + + /** + * 物业公司 + */ + private String propertyName; + + /** + * 物业联系人 + */ + private String propertyUser; + + /** + * 物业联系电话 + */ + private String propertyMobile; + + /** + * 小区性质(字典项XXX) + */ + private String plotNature; + + /** + * 楼栋总人数 + */ + private Integer buildingUserTotal; + + /** + * 地下楼层数 + */ + private Integer undergroundLayerNum; + + /** + * 地下房间数 + */ + private Integer undergroundRoomNum; + + /** + * 供水供电供热单位 + */ + private String serviceSupplyUnit; + + /** + * 消防器材位置 + */ + private String fireControlPosition; + + /** + * 应急物资位置 + */ + private String emergencyPosition; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingErrorEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingErrorEntity.java new file mode 100644 index 0000000..951dd0b --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotBuildingErrorEntity.java @@ -0,0 +1,158 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_plot_building_error") +public class EpidemicPlotBuildingErrorEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小区/村 + */ + private String plotName; + + /** + * 楼栋名称 + */ + private String buildingName; + + /** + * 楼栋名称 + */ + private String buildingCode; + + /** + * 楼栋类型 + */ + private String buildingType; + + /** + * 楼层数 + */ + private Integer floorNum; + + /** + * 单元数 + */ + private Integer roomNum; + + /** + * 住户数 + */ + private Integer householdNum; + + /** + * 楼栋经度 + */ + private String buildingXy; + + /** + * 楼栋状态 + */ + private String buildingState; + + /** + * 房屋面积m² + */ + private String buildingArea; + + /** + * 楼长姓名 + */ + private String assisantName; + + /** + * 楼长电话 + */ + private String assisantMobile; + + /** + * 物业公司 + */ + private String propertyName; + + /** + * 物业联系人 + */ + private String propertyUser; + + /** + * 物业联系电话 + */ + private String propertyMobile; + + /** + * 小区性质 + */ + private String plotNature; + + /** + * 楼栋总人数 + */ + private Integer buildingUserTotal; + + /** + * 地下楼层数 + */ + private Integer undergroundLayerNum; + + /** + * 地下房间数 + */ + private Integer undergroundRoomNum; + + /** + * 供水供电供热单位 + */ + private String serviceSupplyUnit; + + /** + * 消防器材位置 + */ + private String fireControlPosition; + + /** + * 应急物资位置 + */ + private String emergencyPosition; + + /** + * 本次错误信息id + */ + private String errorId; + + /** + * 错误信息 + */ + private String errorInfo; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateEntity.java new file mode 100644 index 0000000..f9237e3 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateEntity.java @@ -0,0 +1,105 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_plot_coordinate") +public class EpidemicPlotCoordinateEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 街道名 + */ + private String streetName; + + /** + * 街道编码 + */ + private String streetId; + + /** + * 小区.村名 + */ + private String mapPlotName; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 社区/村庄 + */ + private String communityName; + + /** + * 社区/村庄ID + */ + private String communityId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小区名称;同网格下不允许重名 + */ + private String plotName; + + /** + * 联系人 + */ + private String contactPerson; + + /** + * 联系电话 + */ + private String contactPhone; + + /** + * 简介 + */ + private String introduce; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateErrorEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateErrorEntity.java new file mode 100644 index 0000000..4dda829 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotCoordinateErrorEntity.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_plot_coordinate_error") +public class EpidemicPlotCoordinateErrorEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 街道名 + */ + private String streetName; + + /** + * 街道编码 + */ + private String streetId; + + /** + * 小区.村名.详细地址 + */ + private String mapPlotName; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 纬度 + */ + private BigDecimal latitude; + + /** + * 社区名称 + */ + private String communityName; + + /** + * 社区ID + */ + private String communityId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小区名称;同网格下不允许重名 + */ + private String plotName; + + /** + * 联系人 + */ + private String contactPerson; + + /** + * 联系电话 + */ + private String contactPhone; + + /** + * 简介 + */ + private String introduce; + + /** + * 错误信息 + */ + private String errorInfo; + + /** + * 插入记录 + */ + private Long insertNo; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotGridEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotGridEntity.java new file mode 100644 index 0000000..aea4989 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicPlotGridEntity.java @@ -0,0 +1,48 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_plot_grid") +public class EpidemicPlotGridEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 小区ID + */ + private Long plotId; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicUnitOwnerEntity.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicUnitOwnerEntity.java new file mode 100644 index 0000000..a2f727c --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/entity/EpidemicUnitOwnerEntity.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.vaccine.common.base.BasePingyinEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epidemic_unit_owner") +public class EpidemicUnitOwnerEntity extends BasePingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小区.村ID + */ + private Long unitId; + + /** + * 房主姓名 + */ + private String ownerName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 手机号 + */ + private String mobile; + + /** + * 详细地址 + */ + private String address; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicBuildingUnitExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicBuildingUnitExcel.java new file mode 100644 index 0000000..db89341 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicBuildingUnitExcel.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-17 + */ +@Data +public class EpidemicBuildingUnitExcel { + + @Excel(name = "主键") + private Long id; + + @Excel(name = "小区.村ID") + private Long buildingId; + + @Excel(name = "单元") + private String unit; + + @Excel(name = "房间号") + private String roomNo; + + @Excel(name = "房屋类型") + private String roomType; + + @Excel(name = "房屋用途") + private String roomUse; + + @Excel(name = "房主姓名") + private String ownerName; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "出租用途") + private String rentalPurpose; + + @Excel(name = "承租人姓名") + private String lesseeName; + + @Excel(name = "承租人身份证") + private String lesseeIdCard; + + @Excel(name = "承租人手机") + private String lesseeMobile; + + @Excel(name = "承租人单位") + private String lesseeUnit; + + @Excel(name = "承租时间(日)") + private String lesseeTime; + + @Excel(name = "承租日期") + private Date lesseeDate; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "社区名称") + private String communityName; + + @Excel(name = "社区ID") + private String communityId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "街道名") + private String streetName; + + @Excel(name = "街道编码") + private String streetId; + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingErrorExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingErrorExcel.java new file mode 100644 index 0000000..2bb7549 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingErrorExcel.java @@ -0,0 +1,169 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Data +public class EpidemicPlotBuildingErrorExcel { + + +// @Excel(name = "小区/村") +// private String plotId; +// +// @Excel(name = "楼栋名称") +// private String buildingName; +// +// @Excel(name = "楼栋类型") +// private String buildingType; +// +// @Excel(name = "楼层数") +// private String floorNum; +// +// @Excel(name = "单元数") +// private String roomNum; +// +// @Excel(name = "住户数") +// private String householdNum; +// +// @Excel(name = "楼栋经度") +// private String buildingXy; +// +// @Excel(name = "楼栋状态") +// private String buildingState; +// +// @Excel(name = "房屋面积m²") +// private String buildingArea; +// +// @Excel(name = "楼长姓名") +// private String assisantName; +// +// @Excel(name = "楼长电话") +// private String assisantMobile; +// +// @Excel(name = "物业公司") +// private String propertyName; +// +// @Excel(name = "物业联系人") +// private String propertyUser; +// +// @Excel(name = "物业联系电话") +// private String propertyMobile; +// +// @Excel(name = "小区性质") +// private String plotNature; +// +// @Excel(name = "楼栋总人数") +// private String buildingUserTotal; +// +// @Excel(name = "地下楼层数") +// private String undergroundLayerNum; +// +// @Excel(name = "地下房间数") +// private String undergroundRoomNum; +// +// @Excel(name = "供水供电供热单位") +// private String serviceSupplyUnit; +// +// @Excel(name = "消防器材位置") +// private String fireControlPosition; +// +// @Excel(name = "应急物资位置") +// private String emergencyPosition; + + @Excel(name = "小区/村") + private String plotName; + + private Long plotId; + + @Excel(name = "楼栋名称") + private String buildingName; + + @Excel(name = "楼栋编码") + private String buildingCode; + +// @Excel(name = "楼栋状态") +// private String buildingState; +// +// @Excel(name = "楼栋类型") +// private String buildingType; +// +// @Excel(name = "地上楼层数") +// private Integer floorNum; +// +// @Excel(name = "地上单元数") +// private Integer roomNum; +// +// @Excel(name = "地上住户数") +// private Integer householdNum; +// +// @Excel(name = "楼栋总人数") +// private Integer buildingUserTotal; +// +// @Excel(name = "地下楼层数") +// private Integer undergroundLayerNum; +// +// @Excel(name = "地下房间数") +// private Integer undergroundRoomNum; +// +// @Excel(name = "房屋面积m²") +// private String buildingArea; +// +// @Excel(name = "楼长姓名") +// private String assisantName; +// +// @Excel(name = "楼长电话") +// private String assisantMobile; +// +// @Excel(name = "物业公司") +// private String propertyName; +// +// @Excel(name = "物业联系人") +// private String propertyUser; +// +// @Excel(name = "物业联系电话") +// private String propertyMobile; +// +// @Excel(name = "小区性质") +// private String plotNature; +// +// @Excel(name = "供水供电供热单位") +// private String serviceSupplyUnit; +// +// @Excel(name = "消防器材位置") +// private String fireControlPosition; +// +// @Excel(name = "应急物资位置") +// private String emergencyPosition; + + @Excel(name = "楼栋经纬度") + private String buildingXy; + + + @Excel(name = "错误信息") + private String errorInfo; + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingExcel.java new file mode 100644 index 0000000..24dc04e --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingExcel.java @@ -0,0 +1,128 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Data +public class EpidemicPlotBuildingExcel { + + +// +// @Excel(name = "楼栋状态") +// private String buildingStateName; +// +// @Excel(name = "楼栋类型") +// private String buildingTypeName; +// +// @Excel(name = "地上楼层数") +// private Integer floorNum; +// +// @Excel(name = "地上单元数") +// private Integer roomNum; +// +// @Excel(name = "地上总户数") +// private Integer householdNum; + + @Excel(name = "街道/镇名称") + private String streetName; + + @Excel(name = "社区名称") + private String communityName; + + @Excel(name = "网格编码") + private String deptCode; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "小区名称或门牌号") + private String buildingNameEx; + + @Excel(name = "楼栋唯一编码") + private String buildingCode; + +// @Excel(name = "经度") +// private BigDecimal buildingLongitudeDsf; +// +// @Excel(name = "纬度") +// private BigDecimal buildingLatitudeDsf; + + @Excel(name = "经度") + private String buildingLongitudeDsfEx; + + @Excel(name = "纬度") + private String buildingLatitudeDsfEx; + + +// @Excel(name = "房屋面积m²") +// private String buildingArea; +// +// @Excel(name = "楼长姓名") +// private String assisantName; +// +// @Excel(name = "楼长电话") +// private String assisantMobile; +// +// @Excel(name = "物业公司") +// private String propertyName; +// +// @Excel(name = "物业联系人") +// private String propertyUser; +// +// @Excel(name = "物业联系电话") +// private String propertyMobile; +// +// @Excel(name = "小区性质") +// private String plotNatureName; +// +// @Excel(name = "楼栋总人数") +// private Integer buildingUserTotal; +// +// @Excel(name = "地下楼层数") +// private Integer undergroundLayerNum; +// +// @Excel(name = "地下房间数") +// private Integer undergroundRoomNum; +// +// @Excel(name = "供水供电供热单位") +// private String serviceSupplyUnit; +// +// @Excel(name = "消防器材位置") +// private String fireControlPosition; +// +// @Excel(name = "应急物资位置") +// private String emergencyPosition; + +// @Excel(name = "经度") +// private BigDecimal buildingLongitude; +// +// @Excel(name = "纬度") +// private BigDecimal buildingLatitude; + +// @Excel(name = "录入时间") +// private String entryTime; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingImportExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingImportExcel.java new file mode 100644 index 0000000..772e97a --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotBuildingImportExcel.java @@ -0,0 +1,100 @@ +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: pingyin-personal + * @description: + * @author: wangtong + * @create: 2022-04-25 17:07 + **/ +@Data +public class EpidemicPlotBuildingImportExcel implements Serializable { + +// @Excel(name = "街道名称") +// private String streetName; +// +// @Excel(name = "社区名称") +// private String communityName; +// +// @Excel(name = "网格名称") +// private String gridName; + + @Excel(name = "小区名称或门牌号") + private String plotName; + + private Long plotId; + + @Excel(name = "楼号") + private String buildingName; + + @Excel(name = "楼栋唯一编码") + private String buildingCode; + + @Excel(name = "楼栋状态", replace = {"常住_1","暂住_2","空置_3"}) + private String buildingState; + + @Excel(name = "楼栋类型", replace = {"商品房_1","自建房_2","别墅_3","场所_4"}) + private String buildingType; + + @Excel(name = "地上楼层数") + private Integer floorNum; + + @Excel(name = "地上单元数") + private Integer roomNum; + + @Excel(name = "地上住户数") + private Integer householdNum; + + @Excel(name = "楼栋总人数") + private Integer buildingUserTotal; + + @Excel(name = "地下楼层数") + private Integer undergroundLayerNum; + + @Excel(name = "地下房间数") + private Integer undergroundRoomNum; + + @Excel(name = "房屋面积m²") + private String buildingArea; + + @Excel(name = "楼长姓名") + private String assisantName; + + @Excel(name = "楼长电话") + private String assisantMobile; + + @Excel(name = "物业公司") + private String propertyName; + + @Excel(name = "物业联系人") + private String propertyUser; + + @Excel(name = "物业联系电话") + private String propertyMobile; + + @Excel(name = "小区性质", replace = {"住宅_1","非住宅_2"}) + private String plotNature; + + @Excel(name = "供水供电供热单位") + private String serviceSupplyUnit; + + @Excel(name = "消防器材位置") + private String fireControlPosition; + + @Excel(name = "应急物资位置") + private String emergencyPosition; + + @Excel(name = "经纬度") + private String buildingXy; + +// @Excel(name = "错误") + private String errorInfo; + +// @Excel(name = "错误信息id") + private String errorId; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateErrorExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateErrorExcel.java new file mode 100644 index 0000000..c8b77aa --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateErrorExcel.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +@Data +public class EpidemicPlotCoordinateErrorExcel { + + @Excel(name = "主键") + private Long id; + + @Excel(name = "街道名") + private String streetName; + + @Excel(name = "街道编码") + private String streetId; + + @Excel(name = "小区.村名.详细地址") + private String mapPlotName; + + @Excel(name = "经度") + private BigDecimal longitude; + + @Excel(name = "纬度") + private BigDecimal latitude; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "社区名称") + private String communityName; + + @Excel(name = "社区ID") + private String communityId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "小区名称;同网格下不允许重名") + private String plotName; + + @Excel(name = "联系人") + private String contactPerson; + + @Excel(name = "联系电话") + private String contactPhone; + + @Excel(name = "简介") + private String introduce; + + @Excel(name = "错误信息") + private String errorInfo; + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateExcel.java new file mode 100644 index 0000000..1bc00cf --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateExcel.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Data +public class EpidemicPlotCoordinateExcel { + + @Excel(name = "主键") + private Long id; + + @Excel(name = "街道名") + private String streetName; + + @Excel(name = "街道编码") + private String streetId; + + @Excel(name = "社区/村庄") + private String communityName; + + @Excel(name = "社区/村庄ID") + private String communityId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "小区名称") + private String plotName; + + @Excel(name = "联系人") + private String contactPerson; + + @Excel(name = "联系电话") + private String contactPhone; + + @Excel(name = "简介") + private String introduce; + + @Excel(name = "户籍地code") + private String plot; + + @Excel(name = "户籍地名称") + private BigDecimal longitude; + + @Excel(name = "户籍地详细地址") + private BigDecimal latitude; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "逻辑删除标识") + private String delFlag; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateImportExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateImportExcel.java new file mode 100644 index 0000000..aef8092 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotCoordinateImportExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Data +public class EpidemicPlotCoordinateImportExcel { + + @Excel(name = "街道名") + private String streetName; + + @Excel(name = "街道编码") + private String streetId; + + @Excel(name = "社区/村庄") + private String communityName; + + @Excel(name = "社区/村庄ID") + private String communityId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "小区名称") + private String plotName; + + @Excel(name = "联系人") + private String contactPerson; + + @Excel(name = "联系电话") + private String contactPhone; + + @Excel(name = "简介") + private String introduce; + + @Excel(name = "错误信息") + private String errorInfo; + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotGridExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotGridExcel.java new file mode 100644 index 0000000..3885cb9 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicPlotGridExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +@Data +public class EpidemicPlotGridExcel { + + @Excel(name = "主键") + private Long id; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "小区ID") + private Long plotId; + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicUnitOwnerExcel.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicUnitOwnerExcel.java new file mode 100644 index 0000000..53bd586 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/excel/EpidemicUnitOwnerExcel.java @@ -0,0 +1,89 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +@Data +public class EpidemicUnitOwnerExcel { + + @Excel(name = "主键") + private Long id; + + @Excel(name = "小区.村ID") + private Long unitId; + + @Excel(name = "房主姓名") + private String ownerName; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "详细地址") + private String address; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "逻辑删除标识") + private String delFlag; + + @Excel(name = "街道名") + private String streetName; + + @Excel(name = "街道编码") + private String streetId; + + @Excel(name = "社区名称") + private String communityName; + + @Excel(name = "社区ID") + private String communityId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "网格ID") + private String gridId; + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicBuildingUnitRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicBuildingUnitRedis.java new file mode 100644 index 0000000..3ddcd36 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicBuildingUnitRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Component +public class EpidemicBuildingUnitRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingErrorRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingErrorRedis.java new file mode 100644 index 0000000..b531d75 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingErrorRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Component +public class EpidemicPlotBuildingErrorRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingRedis.java new file mode 100644 index 0000000..8cdd902 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotBuildingRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Component +public class EpidemicPlotBuildingRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateErrorRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateErrorRedis.java new file mode 100644 index 0000000..8dd5955 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateErrorRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +@Component +public class EpidemicPlotCoordinateErrorRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateRedis.java new file mode 100644 index 0000000..9e91521 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotCoordinateRedis.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisKeys; +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Component +public class EpidemicPlotCoordinateRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + + public String getFile4Import(String fileName) { + String key = RedisKeys.getFileName4Import(fileName); + return (String) redisUtils.get(key); + } + + public void setFile4Import(String fileName) { + String key = RedisKeys.getFileName4Import(fileName); + redisUtils.set(key, fileName ,60); + } + + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotGridRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotGridRedis.java new file mode 100644 index 0000000..3dbb523 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicPlotGridRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +@Component +public class EpidemicPlotGridRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicUnitOwnerRedis.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicUnitOwnerRedis.java new file mode 100644 index 0000000..45a7ec2 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/redis/EpidemicUnitOwnerRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +@Component +public class EpidemicUnitOwnerRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicBuildingUnitService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicBuildingUnitService.java new file mode 100644 index 0000000..f7be0d0 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicBuildingUnitService.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + + +import com.elink.esua.epdc.commons.mybatis.service.CrudService; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.personroom.EpidemicBuildingUnitDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicBuildingUnitDetailResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +public interface EpidemicBuildingUnitService extends CrudService { + + /** + * 单条查询 + * + * @param id + * @return EpidemicBuildingUnitDTO + * @author generator + * @date 2022-02-15 + */ + EpidemicBuildingUnitDetailResultDTO get(String id); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-02-15 + */ + void delete(String[] ids); + + /** + * 修改信息 + * + * @param dto + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/2/15 16:08 + */ + Result updateNew(EpidemicBuildingUnitDTO dto); + + /** + * 保存信息 + * + * @param dto + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/2/15 16:09 + */ + Result saveNew(EpidemicBuildingUnitDTO dto); + + /** + * 更新房主关系 + * + * @param + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/4/12 9:05 + */ + void updateOwner(); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingErrorService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingErrorService.java new file mode 100644 index 0000000..9c44f2e --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingErrorService.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingErrorDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingErrorEntity; + +import java.util.List; +import java.util.Map; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +public interface EpidemicPlotBuildingErrorService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-25 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-25 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EpidemicPlotBuildingErrorDTO + * @author generator + * @date 2022-04-25 + */ + EpidemicPlotBuildingErrorDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-25 + */ + void save(EpidemicPlotBuildingErrorDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-25 + */ + void update(EpidemicPlotBuildingErrorDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-25 + */ + void delete(String[] ids); + + /** + * @describe: 导出错误信息 + * @author wangtong + * @date 2022/4/25 20:29 + * @params [params] + * @return java.util.List + */ + List getErrorExcelList(Map params); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingService.java new file mode 100644 index 0000000..a606153 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotBuildingService.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + +import com.elink.esua.epdc.commons.mybatis.service.CrudService; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotBuildingResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +public interface EpidemicPlotBuildingService extends CrudService { + + /** + * 单条查询 + * + * @param id + * @return EpidemicPlotBuildingDTO + * @author generator + * @date 2022-02-15 + */ + EpidemicPlotBuildingResultDTO get(String id); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-02-15 + */ + Result delete(String[] ids); + + /** + * 楼栋列表下拉框 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/2/15 13:38 + */ + List getBuildingOption(EpidemicPlotBuildingDTO formDTO); + + /** + * @describe: 导入房屋信息 + * @author wangtong + * @date 2022/4/25 17:03 + * @params [file] + * @return io.pingyin.common.utils.Result + */ + Result importBuilding(MultipartFile file); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateErrorService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateErrorService.java new file mode 100644 index 0000000..8d2a469 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateErrorService.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateErrorDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateErrorEntity; + +import java.util.List; +import java.util.Map; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +public interface EpidemicPlotCoordinateErrorService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-07 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-07 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EpidemicPlotCoordinateErrorDTO + * @author generator + * @date 2022-04-07 + */ + EpidemicPlotCoordinateErrorDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-07 + */ + void save(EpidemicPlotCoordinateErrorDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-07 + */ + void update(EpidemicPlotCoordinateErrorDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-07 + */ + void delete(String[] ids); + + /** + * 根据编号获取最新插入的数据集合 + * + * @param no + * @return java.util.List + * @author zhy + * @date 2021/11/24 9:08 + */ + List getErrorInfoByNo(Long no); + + /** + * 删除数据数据集合 + * + * @param no + * @return void + * @author zhy + * @date 2021/11/24 9:08 + */ + void deleteErrorInfoByNo(Long no); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateService.java new file mode 100644 index 0000000..9f2ed35 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotCoordinateService.java @@ -0,0 +1,122 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + +import com.elink.esua.epdc.commons.mybatis.service.CrudService; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateDTO; +import com.elink.esua.epdc.dto.personroom.form.EpidemicPlotCoordinateFormDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +public interface EpidemicPlotCoordinateService extends CrudService { + + /** + * 单条查询 + * + * @param id + * @return EpidemicPlotCoordinateDTO + * @author generator + * @date 2021-07-09 + */ + EpidemicPlotCoordinateDTO get(String id); + + /** + * 保存信息 + * + * @param dto + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/2/15 16:09 + */ + Result saveNew(EpidemicPlotCoordinateDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-07-09 + */ + Result delete(String[] ids); + + /** + * [补充]根据街道编码查询小区/村庄列表 + * + * @param formDTO + * @return Result + * @author wanggongfeng + * @date 2021-07-10 + */ + Result> listSimple(EpidemicPlotCoordinateFormDTO formDTO); + + /** + * 获取全部坐标信息 + * + * @param + * @return java.util.List + * @author zhy + * @date 2021/12/3 16:57 + */ + List getList(); + + /** + * 小区列表下拉框 + * + * @param formDTO + * @return java.util.List + * @author zhy + * @date 2022/2/15 13:38 + */ + List getPlotOption(EpidemicPlotCoordinateDTO formDTO); + + /** + * 更新小区网格关系 + * + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/4/2 14:48 + */ + void updateRelation(); + + /** + * 地理坐标的单条查询 + */ + EpidemicPlotCoordinateResultDTO getCoordinate(String plot, String gridId); + + /** + * 批量导入 + * + * @param file + * @return io.pingyin.common.utils.Result + * @author zhy + * @date 2022/4/6 14:47 + */ + Result importExcel(MultipartFile file); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotGridService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotGridService.java new file mode 100644 index 0000000..e195122 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicPlotGridService.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotGridDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity; + +import java.util.List; +import java.util.Map; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +public interface EpidemicPlotGridService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EpidemicPlotGridDTO + * @author generator + * @date 2022-04-02 + */ + EpidemicPlotGridDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-02 + */ + void save(EpidemicPlotGridDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-02 + */ + void update(EpidemicPlotGridDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-02 + */ + void delete(String[] ids); + + /** + * 批量删除 + * + * @param plotId + * @return void + * @author generator + * @date 2022-04-02 + */ + void deleteByPlotId(Long plotId); + + /** + * 更新小区网格关系 + * + * @param plotId + * @param gridIds + * @return void + * @author zhy + * @date 2022/4/2 13:59 + */ + void saveOrUpdateRelation(Long plotId, List gridIds); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicUnitOwnerService.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicUnitOwnerService.java new file mode 100644 index 0000000..8129f08 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/EpidemicUnitOwnerService.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicUnitOwnerEntity; + +import java.util.List; +import java.util.Map; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +public interface EpidemicUnitOwnerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return EpidemicUnitOwnerDTO + * @author generator + * @date 2022-04-09 + */ + EpidemicUnitOwnerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-09 + */ + void save(EpidemicUnitOwnerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-09 + */ + void update(EpidemicUnitOwnerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-09 + */ + void delete(String[] ids); + + /** + * 批量删除 + * + * @param unitId + * @return void + * @author generator + * @date 2022-04-09 + */ + void deleteByUnitId(Long unitId); +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicBuildingUnitServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicBuildingUnitServiceImpl.java new file mode 100644 index 0000000..9c30267 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicBuildingUnitServiceImpl.java @@ -0,0 +1,205 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.personroom.EpidemicBuildingUnitDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicBuildingUnitDetailResultDTO; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicBuildingUnitDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicUnitOwnerEntity; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicBuildingUnitRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicBuildingUnitService; +import com.elink.esua.epdc.modules.personroom.service.EpidemicUnitOwnerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 楼栋,房屋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Service +public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl implements EpidemicBuildingUnitService { + + @Autowired + private EpidemicBuildingUnitRedis epidemicBuildingUnitRedis; + + @Autowired + private EpidemicUnitOwnerService epidemicUnitOwnerService; + + @Override + public PageData page(Map params) { + IPage page = getPage(params); + List list = baseDao.getUnitPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicBuildingUnitDTO.class); + } + + @Override + public QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String roomNo = (String) params.get("roomNo"); + String type = (String) params.get("roomType"); + String owner = (String) params.get("ownerName"); + String mobile = (String) params.get("mobile"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(roomNo), "ROOM_NO", roomNo); + wrapper.eq(StringUtils.isNotBlank(type), "ROOM_TYPE", type); + wrapper.eq(StringUtils.isNotBlank(owner), "OWNER_NAME", owner); + wrapper.eq(StringUtils.isNotBlank(mobile), "MOBILE", mobile); + + return wrapper; + } + + @Override + public EpidemicBuildingUnitDetailResultDTO get(String id) { + EpidemicBuildingUnitDetailResultDTO entity = baseDao.selectDetailById(id); + Map params = new HashMap<>(2); + params.put("unitId", id); + List owners = epidemicUnitOwnerService.list(params); + entity.setOwners(owners); + return entity; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicBuildingUnitDTO dto) { + EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result saveNew(EpidemicBuildingUnitDTO dto) { + checkData(dto); + EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); + insert(entity); + saveOrUpdateOwners(dto.getOwners(), entity.getId()); + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicBuildingUnitDTO dto) { + EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result updateNew(EpidemicBuildingUnitDTO dto) { + checkData(dto); + EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); + updateById(entity); + saveOrUpdateOwners(dto.getOwners(), entity.getId()); + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + // 删除关系人员 + epidemicUnitOwnerService.deleteByUnitId(Long.parseLong(ids[0])); + } + + @Override + public void updateOwner() { + List list = baseDao.selectOldData(); + List entityList = new ArrayList<>(); + list.forEach(item -> { + EpidemicUnitOwnerEntity entity = new EpidemicUnitOwnerEntity(); + entity.setUnitId(item.getId()); + entity.setIdCard(item.getIdCard()); + entity.setOwnerName(item.getOwnerName()); + entity.setMobile(item.getMobile()); + entity.setAddress(item.getAddress()); + entityList.add(entity); + }); + epidemicUnitOwnerService.insertBatch(entityList); + } + + private void checkData(EpidemicBuildingUnitDTO dto) { + if (dto.getOwners() == null || dto.getOwners().isEmpty()) { + throw new RenException("房主信息不能为空"); + } + for (int i = 0; i < dto.getOwners().size(); i++) { + EpidemicUnitOwnerDTO ownerDTO = dto.getOwners().get(i); + if (StringUtils.isNotBlank(ownerDTO.getIdCard())) { + boolean isIdCard = IdentityNoUtils.isValid(ownerDTO.getIdCard()); + if (!isIdCard) { + throw new RenException("房主身份证号格式不正确"); + } + } + if (StringUtils.isNotBlank(ownerDTO.getMobile())) { + boolean isMobile = IdentityNoUtils.validateMobilePhone(ownerDTO.getMobile()); + if (!isMobile) { + throw new RenException("房主手机号格式不正确"); + } + } + } + if (StringUtils.isNotBlank(dto.getLesseeIdCard())) { + boolean isIdCard = IdentityNoUtils.isValid(dto.getLesseeIdCard()); + if (!isIdCard) { + throw new RenException("承租人身份证号格式不正确"); + } + } + if (StringUtils.isNotBlank(dto.getLesseeMobile())) { + boolean isMobile = IdentityNoUtils.validateMobilePhone(dto.getLesseeMobile()); + if (!isMobile) { + throw new RenException("承租人手机号格式不正确"); + } + } + } + + private void saveOrUpdateOwners(List owners, Long unitId) { + List dtoList = owners.stream().filter(item -> StringUtils.isNotBlank(item.getIdCard())).collect(Collectors.toList()); + List list = ConvertUtils.sourceToTarget(dtoList, EpidemicUnitOwnerEntity.class); + list.forEach(item -> { + item.setUnitId(unitId); + }); + epidemicUnitOwnerService.deleteByUnitId(unitId); + epidemicUnitOwnerService.insertBatch(list); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingErrorServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingErrorServiceImpl.java new file mode 100644 index 0000000..196a1b2 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingErrorServiceImpl.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingErrorDTO; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotBuildingErrorDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingErrorEntity; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicPlotBuildingErrorRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotBuildingErrorService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 小区,楼栋信息 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2022-04-25 + */ +@Service +public class EpidemicPlotBuildingErrorServiceImpl extends BaseServiceImpl implements EpidemicPlotBuildingErrorService { + + @Autowired + private EpidemicPlotBuildingErrorRedis epidemicPlotBuildingErrorRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EpidemicPlotBuildingErrorDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicPlotBuildingErrorDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EpidemicPlotBuildingErrorDTO get(String id) { + EpidemicPlotBuildingErrorEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EpidemicPlotBuildingErrorDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicPlotBuildingErrorDTO dto) { + EpidemicPlotBuildingErrorEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotBuildingErrorEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicPlotBuildingErrorDTO dto) { + EpidemicPlotBuildingErrorEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotBuildingErrorEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getErrorExcelList(Map params) { + return baseDao.getErrorExcelList(params); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingServiceImpl.java new file mode 100644 index 0000000..17f7e6d --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotBuildingServiceImpl.java @@ -0,0 +1,529 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.afterturn.easypoi.exception.excel.ExcelImportException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.StrConstant; +import com.elink.esua.epdc.commons.tools.exception.ErrorCode; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.*; +import com.elink.esua.epdc.dto.AllDeptDTO; +import com.elink.esua.epdc.dto.SysSimpleDictDTO; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotBuildingResultDTO; +import com.elink.esua.epdc.modules.feign.AdminFeignClient; +import com.elink.esua.epdc.modules.personroom.dao.*; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingErrorEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicPlotBuildingImportExcel; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicPlotBuildingRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotBuildingErrorService; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotBuildingService; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotCoordinateService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.File; +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 小区,楼栋信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-02-15 + */ +@Slf4j +@Service +public class EpidemicPlotBuildingServiceImpl extends CrudServiceImpl implements EpidemicPlotBuildingService { + + @Autowired + private EpidemicPlotBuildingRedis epidemicPlotBuildingRedis; + + @Resource + private EpidemicBuildingUnitDao epidemicBuildingUnitDao; + + @Autowired + private AdminFeignClient adminFeignClient; + + @Autowired + public EpidemicPlotBuildingErrorDao epidemicPlotBuildingErrorDao; + + @Autowired + public EpidemicPlotBuildingErrorService epidemicPlotBuildingErrorService; + + @Autowired + public EpidemicPlotCoordinateDao epidemicPlotCoordinateDao; + + @Autowired + public EpidemicPlotGridDao epidemicPlotGridDao; + + @Override + public PageData page(Map params) { + IPage page = getPage(params); + List list = baseDao.getBuildingPage(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + return baseDao.getBuildingPage(params); + } + + @Override + public QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String name = (String) params.get("buildingName"); + String type = (String) params.get("buildingType"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(name), "BUILDING_NAME", name); + wrapper.eq(StringUtils.isNotBlank(type), "BUILDING_TYPE", type); + + return wrapper; + } + + @Override + public EpidemicPlotBuildingResultDTO get(String id) { + return baseDao.selectDetailById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicPlotBuildingDTO dto) { + //生成唯一房屋编码 +// Integer newMaxIndex = getMaxIndexByGridId(dto.getGridId()) + 1; +// dto.setBuildingCode(dto.getGridId()+getNewMaxIndex(newMaxIndex)); + + //检查同一小区/村下,楼栋名称是否重复 + checkInfoByPlotAndName(dto); + + EpidemicPlotBuildingEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotBuildingEntity.class); + if(null != entity.getBuildingLongitude() && null != entity.getBuildingLatitude()){ + double lon = entity.getBuildingLongitude().doubleValue(); + double lat = entity.getBuildingLatitude().doubleValue(); + double[] coordinates = CoordinatesUtils.gcj02_To_Gps84(lat,lon); + entity.setBuildingLongitudeDsf(BigDecimal.valueOf(coordinates[1])); + entity.setBuildingLatitudeDsf(BigDecimal.valueOf(coordinates[0])); + } + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicPlotBuildingDTO dto) { + //检查同一小区/村下,楼栋名称是否重复 + List existList = baseDao.selectExistByName(dto); + if (!existList.isEmpty()) { + throw new RenException("该楼栋已存在"); + } + + if(StringUtils.isBlank(dto.getBuildingCode()) || dto.getBuildingCode().length() != 22){ + throw new RenException("楼栋编码不可为空且必须为22位不重复"); + } + + List existSecList = baseDao.selectExistUpdate(dto); + if (!existSecList.isEmpty()) { + throw new RenException("该楼编码已存在"); + } + + EpidemicPlotBuildingEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotBuildingEntity.class); + + if(null != entity.getBuildingLongitude() && null != entity.getBuildingLatitude()){ + double lon = entity.getBuildingLongitude().doubleValue(); + double lat = entity.getBuildingLatitude().doubleValue(); + double[] coordinates = CoordinatesUtils.gcj02_To_Gps84(lat,lon); + entity.setBuildingLongitudeDsf(BigDecimal.valueOf(coordinates[1])); + entity.setBuildingLatitudeDsf(BigDecimal.valueOf(coordinates[0])); + } + updateById(entity); + } + + private void checkInfoByPlotAndName(EpidemicPlotBuildingDTO dto){ + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("PLOT_ID", dto.getPlotId()); + wrapper.eq("BUILDING_NAME", dto.getBuildingName()); + List existList = baseDao.selectList(wrapper); + if (!existList.isEmpty()) { + throw new RenException("该楼栋已存在"); + } + + if(StringUtils.isBlank(dto.getBuildingCode()) || dto.getBuildingCode().length() != 22){ + throw new RenException("楼栋编码不可为空且必须为22位不重复"); + } + + QueryWrapper wrapperSec = new QueryWrapper<>(); + wrapperSec.eq("BUILDING_CODE", dto.getBuildingCode()); + List existSecList = baseDao.selectList(wrapperSec); + if (!existSecList.isEmpty()) { + throw new RenException("该楼编码已存在"); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result delete(String[] ids) { + // 只有单个删除 + if (!epidemicBuildingUnitDao.selectByBuildingId(ids[0]).isEmpty()) { + return new Result().error("已经被房屋信息关联,不可删除"); + } + //检查楼栋下面是否有人员,有则不能删 + +// baseDao.deleteBatchIds(Arrays.asList(ids)); + baseDao.realDeleteBatchIds(Arrays.asList(ids)); + return new Result(); + } + + @Override + public List getBuildingOption(EpidemicPlotBuildingDTO formDTO) { + return baseDao.getBuildingOption(formDTO); + } + + @Override + public Result importBuilding(MultipartFile file) { + // 文件基本信息检查 + AllDeptDTO allDeptInfo = checkInfo(file); + + //读取文件内容,处理数据 + File f = StreamUtils.conversionFile(file); + try { + // 判断导入文件是否为空 + ImportParams importParams = new ImportParams(); + // excel数据 + List recordList = ExcelImportUtil.importExcel(f, EpidemicPlotBuildingImportExcel.class, importParams); + // 未成功匹配数据 + List nonExistInfoList = new ArrayList<>(); + + //字典类型数据 + // 楼栋状态全部取出 + List buildingStateList = adminFeignClient.listSimpleDictInfo("building_state").getData(); + List buildingStateCodeList = buildingStateList.stream().map(SysSimpleDictDTO::getDictValue).collect(Collectors.toList()); + // 楼栋类型全部取出 + List buildingTypeList = adminFeignClient.listSimpleDictInfo("building_type").getData(); + List buildingTypeCodeList = buildingTypeList.stream().map(SysSimpleDictDTO::getDictValue).collect(Collectors.toList()); + // 小区性质全部取出 + List plotNatureList = adminFeignClient.listSimpleDictInfo("plot_nature").getData(); + List plotNatureCodeList = plotNatureList.stream().map(SysSimpleDictDTO::getDictValue).collect(Collectors.toList()); + + + + //通过网格id获取该网格下排序最大的房屋编码 +// Integer newMaxIndex = getMaxIndexByGridId(allDeptInfo.getGridId()) + 1; + //生成标识,供下载错误信息使用 + String errorId = UUID.randomUUID().toString().replaceAll("-", ""); + //该网格下的小区信息,先把没有的小区新建到数据库里(无除外) + createCoordinate(recordList,allDeptInfo); + List plotList = epidemicPlotCoordinateDao.getListByGridId(allDeptInfo.getGridDeptId()); + EpidemicPlotBuildingImportExcel record; + for (int i = 0; i < recordList.size(); i++) { + record = recordList.get(i); + String errorInfo = ""; + + //必填项 +// String streetName = record.getStreetName(); +// String communityName = record.getCommunityName(); +// String gridName = record.getGridName(); + String plotName = record.getPlotName(); + String buildingName = record.getBuildingName(); + String buildingCode = record.getBuildingCode(); +// String buildingState = record.getBuildingState(); +// String buildingType = record.getBuildingType(); +// Integer floorNum = record.getFloorNum(); +// Integer roomNum = record.getRoomNum(); + String buildingXy = record.getBuildingXy(); + + if(StringUtils.isBlank(plotName) || StringUtils.isBlank(buildingName) + || StringUtils.isBlank(buildingXy) || StringUtils.isBlank(buildingCode)){ + errorInfo += "必填项为空或数字项有汉字,"; + } + + //小区匹配 + for(EpidemicPlotCoordinateEntity plot : plotList){ + if(plotName.equals(plot.getPlotName())){ + record.setPlotId(plot.getId()); + break; + } + } + + //楼栋编码验证 21位且唯一 + EpidemicPlotBuildingEntity codeCheck = baseDao.selectByBuildingCode(buildingCode); + if(StringUtils.isBlank(buildingCode) || buildingCode.length() != 22 || codeCheck != null){ + errorInfo += "楼栋编码不可为空且必须为22位不重复,"; + } + + //字典项匹配 + //匹配楼栋状态 + if(StringUtils.isNotBlank(record.getBuildingState()) && !buildingStateCodeList.contains(record.getBuildingState())){ + errorInfo += "楼栋状态不匹配,"; + } + //匹配楼栋类型 + if(StringUtils.isNotBlank(record.getBuildingType()) && !buildingTypeCodeList.contains(record.getBuildingType())){ + errorInfo += "楼栋类型不匹配,"; + } + //匹配小区性质 + String plotNature = record.getPlotNature(); + if(StringUtils.isNotBlank(plotNature) && !plotNatureCodeList.contains(plotNature)){ + errorInfo += "小区性质不匹配,"; + } + + //获取经纬度 + String[] xy = null; + if(StringUtils.isNotBlank(buildingXy) && buildingXy.contains(",")){ + xy = buildingXy.split(","); + }else{ + errorInfo += "经纬度格式不标准,"; + } + + // 匹配结束,将匹配结果分别保存 + if(StringUtils.isBlank(errorInfo)){ + //判断是更新还是新增 + EpidemicPlotBuildingEntity isExist = baseDao.selectByGridPlotAndName(record.getPlotId() == null?null:record.getPlotId().toString(),record.getBuildingName(),allDeptInfo.getGridDeptId()); + if(null == isExist){ + //数据正常导入 + EpidemicPlotBuildingEntity entity = ConvertUtils.sourceToTarget(record, EpidemicPlotBuildingEntity.class); + //保存部门信息 + entity.setCommunityName(allDeptInfo.getCommunityName()); + entity.setCommunityId(allDeptInfo.getCommunityDeptId()); + entity.setCommunityDeptId(allDeptInfo.getCommunityId()); + entity.setGridId(allDeptInfo.getGridDeptId()); + entity.setGridName(allDeptInfo.getGridName()); + entity.setGridDeptId(allDeptInfo.getGridId()); + entity.setStreetId(allDeptInfo.getStreetDeptId()); + entity.setStreetName(allDeptInfo.getStreetName()); + entity.setStreetDeptId(allDeptInfo.getStreetId()); + //保存经纬度 + if(xy.length > 0){ + //火星GCJ02坐标系 + entity.setBuildingLongitude(new BigDecimal(xy[0].trim())); + entity.setBuildingLatitude(new BigDecimal(xy[1].trim())); + //WGS84坐标系 + double lon = entity.getBuildingLongitude().doubleValue(); + double lat = entity.getBuildingLatitude().doubleValue(); + double[] coordinates = CoordinatesUtils.gcj02_To_Gps84(lat,lon); + entity.setBuildingLongitudeDsf(BigDecimal.valueOf(coordinates[1])); + entity.setBuildingLatitudeDsf(BigDecimal.valueOf(coordinates[0])); + } + //保存楼栋唯一编码 +// entity.setBuildingCode(allDeptInfo.getGridId()+getNewMaxIndex(newMaxIndex)); +// newMaxIndex++; + baseDao.insert(entity); + }else{//更新 +// isExist = ConvertUtils.sourceToTarget(record, EpidemicPlotBuildingEntity.class); + + //保存部门信息 +// isExist.setCommunityName(allDeptInfo.getCommunityDeptId()); +// isExist.setCommunityId(allDeptInfo.getCommunityId()); +// isExist.setCommunityDeptId(allDeptInfo.getCommunityName()); +// isExist.setGridId(allDeptInfo.getGridDeptId()); +// isExist.setGridName(allDeptInfo.getGridName()); +// isExist.setGridDeptId(allDeptInfo.getGridId()); +// isExist.setStreetId(allDeptInfo.getStreetDeptId()); +// isExist.setStreetName(allDeptInfo.getStreetName()); +// isExist.setStreetDeptId(allDeptInfo.getStreetId()); + isExist.setBuildingCode(buildingCode); + //保存经纬度 + if(xy.length > 0){ + //火星GCJ02坐标系 + + isExist.setBuildingLongitude(new BigDecimal(xy[0].trim())); + isExist.setBuildingLatitude(new BigDecimal(xy[1].trim())); + //WGS84坐标系 + double lon = isExist.getBuildingLongitude().doubleValue(); + double lat = isExist.getBuildingLatitude().doubleValue(); + double[] coordinates = CoordinatesUtils.gcj02_To_Gps84(lat,lon); + isExist.setBuildingLongitudeDsf(BigDecimal.valueOf(coordinates[1])); + isExist.setBuildingLatitudeDsf(BigDecimal.valueOf(coordinates[0])); + } + updateById(isExist); + } + }else{ + //保存报错信息以供导出 + record.setErrorInfo(errorInfo); + record.setErrorId(errorId); + nonExistInfoList.add(record); + } + + } + //插入成功 +// insertBatch(successList); + + // 提示报错信息 + if (nonExistInfoList.size() > 0) { + //插入报错信息 + List entityList = ConvertUtils.sourceToTarget(nonExistInfoList, EpidemicPlotBuildingErrorEntity.class); + epidemicPlotBuildingErrorService.insertBatch(entityList); + + Result errorResult = new Result(); + errorResult.setCode(ErrorCode.INTERNAL_SERVER_ERROR); + errorResult.setData("下载未匹配信息"); + errorResult.setMsg(errorId); + return errorResult; + } + + } catch (ExcelImportException e) { + return new Result().error("数据异常,错误原因:" + e.getMessage()); + } catch (RenException e) { + return new Result().error("批量导入失败,错误原因:" + e.getMessage()); + } catch (Exception e) { + return new Result().error("解析excel文件失败,请联系管理员。错误代码:" + e.getMessage()); + } finally { + ExcelUtils.deleteAllFilesOfDir(f); + } + return new Result(); + } + + /** + * @describe: 创建数据库里不存在的小区 + * @author wangtong + * @date 2022/4/26 17:16 + * @params [recordList, allDeptInfo] + * @return void + */ + private void createCoordinate(List recordList, AllDeptDTO allDeptInfo) { + //取出所有的小区名称 + List targetTypeList = recordList.stream().map(EpidemicPlotBuildingImportExcel -> EpidemicPlotBuildingImportExcel.getPlotName()).collect(Collectors.toList()); + + //去重复并不打乱顺序 + List resultList = new ArrayList(); + Set set = new HashSet(); + for (String s : targetTypeList) { + if (set.add(s)) { + resultList.add(s); + } + } + resultList.remove("无"); + resultList.remove(""); + resultList.remove(null); + //查出该网格下已有的小区,然后剔除已经创建的小区 + List plotList = epidemicPlotCoordinateDao.getListByGridId(allDeptInfo.getGridDeptId()); + for(EpidemicPlotCoordinateEntity plot : plotList){ + resultList.removeIf(e -> e.equals(plot.getPlotName())); + } + //创建数据库里不存在的小区 + for(String plotName : resultList){ + if(StringUtils.isNotBlank(plotName)){ + EpidemicPlotCoordinateEntity entity = new EpidemicPlotCoordinateEntity(); + entity.setPlotName(plotName); + entity.setCommunityName(allDeptInfo.getCommunityName()); + entity.setCommunityId(allDeptInfo.getCommunityDeptId()); + entity.setGridId(allDeptInfo.getGridDeptId()); + entity.setGridName(allDeptInfo.getGridName()); + entity.setStreetId(allDeptInfo.getStreetDeptId()); + entity.setStreetName(allDeptInfo.getStreetName()); + epidemicPlotCoordinateDao.insert(entity); + EpidemicPlotGridEntity joinEntity = new EpidemicPlotGridEntity(); + joinEntity.setGridId(allDeptInfo.getGridDeptId()); + joinEntity.setPlotId(entity.getId()); + epidemicPlotGridDao.insert(joinEntity); + } + } + } + + /** + * @describe: 文件预检 + * @author wangtong + * @date 2022/4/25 18:14 + * @params [file] + * @return io.pingyin.modules.sys.dto.AllDeptDTO + */ + private AllDeptDTO checkInfo(MultipartFile file) { + // 防止多次重复导入导致内存无意义消耗 + String originalFilename = file.getOriginalFilename(); + if (StringUtils.isBlank(originalFilename)) { + throw new RenException("文件名不能为空"); + } + + // 判断上传文件类型 + if (!originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2003) && !originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2007)) { + throw new RenException("请选择xls或者xlsx格式文件"); + } + // 判断文件名称 + String fileName = originalFilename.substring(0, originalFilename.lastIndexOf(".")); + if ((!fileName.contains(StrConstant.HYPHEN)) || fileName.split(StrConstant.HYPHEN).length < 2) { + throw new RenException("文件名称格式应为【文件名-网格编码】"); + } + // 获取网格信息 + String[] fileNameArr = fileName.split(StrConstant.HYPHEN); + String gridName = fileNameArr[0]; + //19位370124 + AllDeptDTO allDeptInfo = adminFeignClient.getAllDeptInfoByGridName(gridName).getData(); + if (null == allDeptInfo) { + throw new RenException("网格信息不存在"); + } + //因为现在数据库没有网格编码的档案,所以第一次要更新网格的编码 + String gridCode = fileNameArr[fileNameArr.length - 1]; + if(StringUtils.isNotBlank(gridCode) && gridCode.startsWith("370124") ){ +// SysDeptEntity deptEntity = sysDeptDao.selectById(allDeptInfo.getGridId()); +// if(StringUtils.isBlank(deptEntity.getDeptCode())){ +// deptEntity.setDeptCode(gridCode); +// sysDeptDao.updateById(deptEntity); +// } + }else{ + throw new RenException("网格编码信息错误,请填写370124开头的网格编码!"); + } + return allDeptInfo; + + } + + /** + * @describe: 通过网格id获取该网格下排序最大的房屋编码 + * @author wangtong + * @date 2022/4/25 14:06 + * @params [gridId] + * @return java.lang.Integer + */ + private Integer getMaxIndexByGridId(String gridId){ + Integer maxIndex = baseDao.getMaxIndexByGridId(gridId); + if(null == maxIndex){ + maxIndex = 0; + } + return maxIndex; + } + + /** + * @describe: 把数字转换成3位的字符串,不够的前面补0 + * @author wangtong + * @date 2022/4/25 14:27 + * @params [maxIndex] + * @return java.lang.String + */ + private String getNewMaxIndex(Integer maxIndex){ + String result = maxIndex.toString(); + while(result.length()<3){ + result = "0" + result; + } + return result; + } +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateErrorServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateErrorServiceImpl.java new file mode 100644 index 0000000..5933e96 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateErrorServiceImpl.java @@ -0,0 +1,114 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateErrorDTO; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotCoordinateErrorDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateErrorEntity; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicPlotCoordinateErrorRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotCoordinateErrorService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 小区、村坐标 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-07 + */ +@Service +public class EpidemicPlotCoordinateErrorServiceImpl extends BaseServiceImpl implements EpidemicPlotCoordinateErrorService { + + @Autowired + private EpidemicPlotCoordinateErrorRedis epidemicPlotCoordinateErrorRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EpidemicPlotCoordinateErrorDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicPlotCoordinateErrorDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public EpidemicPlotCoordinateErrorDTO get(String id) { + EpidemicPlotCoordinateErrorEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EpidemicPlotCoordinateErrorDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicPlotCoordinateErrorDTO dto) { + EpidemicPlotCoordinateErrorEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotCoordinateErrorEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicPlotCoordinateErrorDTO dto) { + EpidemicPlotCoordinateErrorEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotCoordinateErrorEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getErrorInfoByNo(Long no) { + return baseDao.getErrorInfoByNo(no); + } + + @Override + public void deleteErrorInfoByNo(Long no) { + baseDao.deleteErrorInfoByNo(no); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateServiceImpl.java new file mode 100644 index 0000000..d232b15 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotCoordinateServiceImpl.java @@ -0,0 +1,409 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.afterturn.easypoi.exception.excel.ExcelImportException; +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.StrConstant; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.utils.StreamUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.AllDeptDTO; +import com.elink.esua.epdc.dto.SysSimpleDictDTO; +import com.elink.esua.epdc.dto.epidemic.DictOptionDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotGridDTO; +import com.elink.esua.epdc.dto.personroom.form.EpidemicPlotCoordinateFormDTO; +import com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO; +import com.elink.esua.epdc.modules.feign.AdminFeignClient; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotBuildingDao; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotCoordinateDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateErrorEntity; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity; +import com.elink.esua.epdc.modules.personroom.excel.EpidemicPlotCoordinateImportExcel; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicPlotCoordinateRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotCoordinateErrorService; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotCoordinateService; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotGridService; +import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInoutRecordDao; +import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInoutRecordService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.File; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 小区、村坐标 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2021-07-09 + */ +@Slf4j +@Service +public class EpidemicPlotCoordinateServiceImpl extends CrudServiceImpl implements EpidemicPlotCoordinateService { + + @Resource + private EpidemicPlotCoordinateDao epidemicPlotCoordinateDao; + + @Resource + private EpidemicPlotBuildingDao epidemicPlotBuildingDao; + + @Autowired + private EpidemicPlotGridService epidemicPlotGridService; + + @Autowired + private EpidemicPlotCoordinateErrorService epidemicPlotCoordinateErrorService; + + @Autowired + private AdminFeignClient adminFeignClient; + + @Autowired + private EpidemicPlotCoordinateRedis epidemicPlotCoordinateRedis; + + @Override + public PageData page(Map params) { + IPage page = getPage(params); + List list = baseDao.getPlotPage(params); + list.forEach(item->{ + + }); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicPlotCoordinateDTO.class); + } + + @Override + public QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String streetId = (String) params.get("streetId"); + String streetName = (String) params.get("streetName"); + String communityName = (String) params.get("communityName"); + String communityId = (String) params.get("communityId"); + String gridName = (String) params.get("gridName"); + String gridId = (String) params.get("gridId"); + String plotName = (String) params.get("plotName"); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.like(StringUtils.isNotBlank(streetName), "STREET_NAME", streetName); + wrapper.eq(StringUtils.isNotBlank(streetId), "STREET_ID", streetId); + wrapper.eq(StringUtils.isNotBlank(communityName), "COMMUNITY_NAME", communityName); + wrapper.eq(StringUtils.isNotBlank(communityId), "COMMUNITY_ID", communityId); + wrapper.eq(StringUtils.isNotBlank(gridName), "GRID_NAME", gridName); + wrapper.eq(StringUtils.isNotBlank(gridId), "GRID_ID", gridId); + wrapper.like(StringUtils.isNotBlank(plotName), "PLOT_NAME", plotName); + + return wrapper; + } + + @Override + public EpidemicPlotCoordinateDTO get(String id) { + EpidemicPlotCoordinateEntity entity = baseDao.selectById(id); + EpidemicPlotCoordinateDTO dto = ConvertUtils.sourceToTarget(entity, EpidemicPlotCoordinateDTO.class); + + Map params = new HashMap<>(2); + params.put("plotId", id); + List relation = epidemicPlotGridService.list(params); + dto.setGridIds(relation.stream().map(EpidemicPlotGridDTO::getGridId).collect(Collectors.toList())); + + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicPlotCoordinateDTO dto) { + EpidemicPlotCoordinateEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotCoordinateEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result saveNew(EpidemicPlotCoordinateDTO dto) { + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("PLOT_NAME", dto.getPlotName()); + List lists = epidemicPlotCoordinateDao.selectList(wrapper); + + if (lists.isEmpty()) { + EpidemicPlotCoordinateEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotCoordinateEntity.class); + insert(entity); + saveOrUpdateRelation(entity.getId(), dto.getGridIds()); +// epidemicUserInoutRecordService.updatePositionInfo(entity); + return new Result(); + } else { + return new Result().error("该小区已存在"); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicPlotCoordinateDTO dto) { + EpidemicPlotCoordinateEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotCoordinateEntity.class); + updateById(entity); + saveOrUpdateRelation(dto.getId(), dto.getGridIds()); +// epidemicUserInoutRecordService.updatePositionInfo(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result delete(String[] ids) { + // 只有单个删除 +// if (!epidemicUserInoutRecordDao.selectByCoordinateId(ids[0]).isEmpty()) { +// return new Result().error("已经被人口信息关联,不可删除"); +// } + if (!epidemicPlotBuildingDao.selectByPlotId(ids[0]).isEmpty()) { + return new Result().error("已经被楼栋信息关联,不可删除"); + } + saveOrUpdateRelation(Long.parseLong(ids[0]), new ArrayList<>()); + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + return new Result(); + } + + @Override + public Result> listSimple(EpidemicPlotCoordinateFormDTO formDTO) { + + List list = baseDao.listSimple(formDTO); + + return new Result>().ok(list); + } + + @Override + public List getList() { + return baseDao.getList(); + } + + @Override + public List getPlotOption(EpidemicPlotCoordinateDTO formDTO) { + return baseDao.getPlotOption(formDTO); + } + + @Override + public void updateRelation() { + List oldRelation = baseDao.getOldData(); + oldRelation.forEach(item -> { + List gridIds = new ArrayList<>(); + gridIds.add(item.getGridId()); + epidemicPlotGridService.saveOrUpdateRelation(item.getId(), gridIds); + }); + } + + @Override + public EpidemicPlotCoordinateResultDTO getCoordinate(String plot, String gridId) { + return baseDao.getCoordinate(plot, gridId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result importExcel(MultipartFile file) { + // 1.防止多次重复导入导致内存无意义消耗 + String originalFilename = file.getOriginalFilename(); + String fileNameList = epidemicPlotCoordinateRedis.getFile4Import(originalFilename); + if (StringUtils.isNotEmpty(fileNameList) && fileNameList.contains(originalFilename)) { + return new Result().error("一分钟内,同一个文件名不允许重复导入"); + } + epidemicPlotCoordinateRedis.setFile4Import(originalFilename); + + // 2.文件基本信息检查 + String errMsg; + + // 3.读取文件内容,处理数据 + StringBuilder checkInfo = new StringBuilder(); + File f = StreamUtils.conversionFile(file); + try { + // 判断导入文件是否为空 + ImportParams importParams = new ImportParams(); +// importParams.setTitleRows(3); + List recordList = ExcelImportUtil.importExcel(f, EpidemicPlotCoordinateImportExcel.class, importParams); + if (CollUtil.isEmpty(recordList)) { + return new Result().error("导入内容不能为空"); + } + if (recordList.size() > 1001) { + return new Result().error("单个文件数据不能超过1000条"); + } + + // 存储批量插入实体 + List addPlotList = new ArrayList<>(); + // 存储错误数据批量插入实体 + List addErrorList = new ArrayList<>(); + + for (int i = 0; i < recordList.size(); i++) { + EpidemicPlotCoordinateImportExcel excelLineData = recordList.get(i); + log.info("data line:" + i); + // 空行校验(错误的EXCEL行删除方式导致的空行处理) + if (checkEmptyLine(excelLineData)) { + continue; + } + + // 校验是否存在空单元格(校验必填) + if (checkBaseInfo(excelLineData)) { + checkInfo.append(i + 1).append("、"); + excelLineData.setErrorInfo("必填项填写不规范或存在空值"); + addErrorList.add(excelLineData); + continue; + } + + AllDeptDTO allDeptInfo = adminFeignClient.getAllDeptInfoByName(excelLineData.getGridName()).getData(); + if (null == allDeptInfo) { + checkInfo.append(i + 1).append("、"); + excelLineData.setErrorInfo("网格不存在"); + addErrorList.add(excelLineData); + continue; + } + excelLineData.setStreetId(allDeptInfo.getStreetId()); + excelLineData.setCommunityId(allDeptInfo.getCommunityId()); + excelLineData.setGridId(allDeptInfo.getGridId()); + + ValidatorUtils.validateEntity(excelLineData, UpdateGroup.class, DefaultGroup.class); + + addPlotList.add(excelLineData); + } + + log.info("insert data."); + // 插入小区数据,因为存在一对多关系表,只能单条插入,效率慢 + if (!addPlotList.isEmpty()) { + List relationList = new ArrayList<>(); + for (EpidemicPlotCoordinateImportExcel userInfoAllExcel : addPlotList) { + EpidemicPlotCoordinateEntity plotEntity = ConvertUtils.sourceToTarget(userInfoAllExcel, EpidemicPlotCoordinateEntity.class); + baseDao.insert(plotEntity); + + EpidemicPlotGridEntity gridEntity = new EpidemicPlotGridEntity(); + gridEntity.setPlotId(plotEntity.getId()); + gridEntity.setGridId(plotEntity.getGridId()); + relationList.add(gridEntity); + } + epidemicPlotGridService.insertBatch(relationList); + } + log.info("insert error data."); + // 批量插入错误数据 + if (!addErrorList.isEmpty()) { + List insertErrorList = ConvertUtils.sourceToTarget(addErrorList, EpidemicPlotCoordinateErrorEntity.class); + epidemicPlotCoordinateErrorService.deleteErrorInfoByNo(SecurityUser.getUserId()); + for (EpidemicPlotCoordinateErrorEntity entity : insertErrorList) { + entity.setInsertNo(SecurityUser.getUserId()); + } + epidemicPlotCoordinateErrorService.insertBatch(insertErrorList); + } + // 提示报错信息 + if (checkInfo.length() > 0) { + errMsg = checkInfo.substring(0, checkInfo.length() - 1); + errMsg = "第 " + errMsg + " 条"; + errMsg += "数据异常,请下载错误数据,将错误数据修正后重新导入!"; + return new Result().ok(errMsg); + } + + } catch (ExcelImportException e) { + return new Result().error("数据异常,错误原因:" + e.getMessage()); + } catch (RenException e) { + return new Result().error("批量导入失败,错误原因:" + e.getMessage()); + } catch (Exception e) { + return new Result().error("解析excel文件失败,请联系管理员。错误代码:" + e.getMessage()); + } finally { + ExcelUtils.deleteAllFilesOfDir(f); + } + return new Result(); + } + + + /** + * 更新小区网格关系 + * + * @param plotId + * @param gridIds + * @return void + * @author zhy + * @date 2022/4/2 14:08 + */ + private void saveOrUpdateRelation(Long plotId, List gridIds) { + epidemicPlotGridService.saveOrUpdateRelation(plotId, gridIds); + } + + /** + * 文件预检 + * + * @param file + * @return java.lang.String + * @author zhy + * @date 2021/11/22 16:47 + */ + private String fileCheckHandle(MultipartFile file, boolean needFileName) { + // 判断上传文件类型 + String originalFilename = file.getOriginalFilename(); + if (StringUtils.isBlank(originalFilename)) { + return "文件名称不能为空"; + } + if (!originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2003) && !originalFilename.endsWith(StrConstant.EXCEL_SUFFIX_2007)) { + return "请选择.xls或者.xlsx格式文件"; + } + // 判断文件名称 + if (needFileName) { + String fileName = originalFilename.substring(0, originalFilename.lastIndexOf(".")); + if ((!fileName.contains(StrConstant.HYPHEN)) || fileName.split(StrConstant.HYPHEN).length < 2) { + return "文件名称格式应为【文件名-网格ID】"; + } + } + return null; + } + + /** + * 校验基本信息 + * + * @param excel + * @return + */ + private boolean checkBaseInfo(EpidemicPlotCoordinateImportExcel excel) { + return StringUtils.isBlank(excel.getPlotName()) || StringUtils.isBlank(excel.getStreetName()) || StringUtils.isBlank(excel.getCommunityName()) || StringUtils.isBlank(excel.getGridName()); + } + + /** + * 校验是否存在空单元格 + * + * @param excel + * @return + */ + private boolean checkEmptyLine(EpidemicPlotCoordinateImportExcel excel) { + // 校验必填项 (机构名称,小区名称) + return StringUtils.isBlank(excel.getGridName()) && StringUtils.isBlank(excel.getCommunityName()) && StringUtils.isBlank(excel.getStreetName()) && StringUtils.isBlank(excel.getPlotName()); + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotGridServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotGridServiceImpl.java new file mode 100644 index 0000000..c90fdd8 --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicPlotGridServiceImpl.java @@ -0,0 +1,136 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.personroom.EpidemicPlotGridDTO; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotGridDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicPlotGridRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicPlotGridService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 小区网格关系表 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-02 + */ +@Service +public class EpidemicPlotGridServiceImpl extends BaseServiceImpl implements EpidemicPlotGridService { + + @Autowired + private EpidemicPlotGridRedis epidemicPlotGridRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EpidemicPlotGridDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicPlotGridDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + String plotId = (String) params.get("plotId"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(plotId), "PLOT_ID", plotId); + + return wrapper; + } + + @Override + public EpidemicPlotGridDTO get(String id) { + EpidemicPlotGridEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EpidemicPlotGridDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicPlotGridDTO dto) { + EpidemicPlotGridEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotGridEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicPlotGridDTO dto) { + EpidemicPlotGridEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicPlotGridEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByPlotId(Long plotId) { + baseDao.deleteByPlotId(plotId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdateRelation(Long plotId, List gridIds) { + // 先删除小区网格关系 + deleteByPlotId(plotId); + + // 没有网格权限 + if (CollUtil.isEmpty(gridIds)) { + return; + } + + // 保存小区网格关系 + for (String grid : gridIds) { + EpidemicPlotGridEntity entity = new EpidemicPlotGridEntity(); + entity.setGridId(grid); + entity.setPlotId(plotId); + + // 保存 + insert(entity); + } + } + +} diff --git a/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicUnitOwnerServiceImpl.java b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicUnitOwnerServiceImpl.java new file mode 100644 index 0000000..1f5edfa --- /dev/null +++ b/epdc-cloud-custom/src/main/java/com/elink/esua/epdc/modules/personroom/service/impl/EpidemicUnitOwnerServiceImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.personroom.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; +import com.elink.esua.epdc.modules.personroom.dao.EpidemicUnitOwnerDao; +import com.elink.esua.epdc.modules.personroom.entity.EpidemicUnitOwnerEntity; +import com.elink.esua.epdc.modules.personroom.redis.EpidemicUnitOwnerRedis; +import com.elink.esua.epdc.modules.personroom.service.EpidemicUnitOwnerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 房屋-房主信息 + * + * @author zhy qu@elink-cn.com + * @since v1.0.0 2022-04-09 + */ +@Service +public class EpidemicUnitOwnerServiceImpl extends BaseServiceImpl implements EpidemicUnitOwnerService { + + @Autowired + private EpidemicUnitOwnerRedis epidemicUnitOwnerRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, EpidemicUnitOwnerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, EpidemicUnitOwnerDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + String unitId = (String)params.get("unitId"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + wrapper.eq(StringUtils.isNotBlank(unitId), "UNIT_ID", unitId); + + return wrapper; + } + + @Override + public EpidemicUnitOwnerDTO get(String id) { + EpidemicUnitOwnerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, EpidemicUnitOwnerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(EpidemicUnitOwnerDTO dto) { + EpidemicUnitOwnerEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicUnitOwnerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(EpidemicUnitOwnerDTO dto) { + EpidemicUnitOwnerEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicUnitOwnerEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByUnitId(Long unitId) { + baseDao.deleteByUnitId(unitId); + } +} diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicBuildingUnitDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicBuildingUnitDao.xml new file mode 100644 index 0000000..fa5d14b --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicBuildingUnitDao.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingDao.xml new file mode 100644 index 0000000..724760f --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingDao.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from epidemic_plot_building where id in + + #{id} + + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingErrorDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingErrorDao.xml new file mode 100644 index 0000000..83a9971 --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotBuildingErrorDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateDao.xml new file mode 100644 index 0000000..7b1742e --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateDao.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateErrorDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateErrorDao.xml new file mode 100644 index 0000000..15a0a25 --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotCoordinateErrorDao.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from epidemic_plot_coordinate_error where INSERT_NO = #{no} + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotGridDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotGridDao.xml new file mode 100644 index 0000000..ffbf347 --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicPlotGridDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + DELETE + FROM + epidemic_plot_grid + WHERE + PLOT_ID = #{plotId} + + + diff --git a/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicUnitOwnerDao.xml b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicUnitOwnerDao.xml new file mode 100644 index 0000000..43682d3 --- /dev/null +++ b/epdc-cloud-custom/src/main/resources/mapper/personroom/EpidemicUnitOwnerDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + epidemic_unit_owner + WHERE + UNIT_ID = #{unitId} + + diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java index 61e8c89..2725fdd 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java @@ -11,6 +11,7 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao; import com.elink.esua.epdc.vaccine.epidemic.dto.*; import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultDTO; @@ -19,6 +20,7 @@ import com.elink.esua.epdc.vaccine.epidemic.entity.EpidemicUserInfoEntity; import com.elink.esua.epdc.vaccine.epidemic.excel.EpidecmicUserNewExcel; import com.elink.esua.epdc.vaccine.epidemic.service.EpidemicUserInfoService; import com.elink.esua.epdc.vaccine.epidemic.service.impl.EpidemicUserInfoExportServer; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -187,4 +189,11 @@ public class EpidemicUserInfoController { public Result resetUserCheckState() { return epidemicUserInfoService.resetUserCheckState(); } + + @GetMapping("getOwner") + @ApiOperation("查询房主") + @LogOperation("查询房主") + public Result getOwner(@RequestParam Map params) { + return epidemicUserInfoService.getOwner(params); + } } diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java index dd5ce35..2cb09a2 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/dao/EpidemicUserInfoDao.java @@ -2,6 +2,7 @@ package com.elink.esua.epdc.vaccine.epidemic.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordDetailDTO; import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordListDTO; import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicUserDeptInfoDTO; @@ -242,4 +243,14 @@ public interface EpidemicUserInfoDao extends BaseDao { * @date 2022/4/25 15:59 */ void deleteByIds(Long[] ids); + + /** + * 查询房主 + * + * @param params + * @return io.pingyin.common.utils.Result + * @author wgf + * @date 2022/5/30 9:27 + */ + EpidemicUnitOwnerDTO getOwner(Map params); } diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java index 00c4f71..fdba174 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/EpidemicUserInfoService.java @@ -4,6 +4,7 @@ package com.elink.esua.epdc.vaccine.epidemic.service; import com.elink.esua.epdc.commons.mybatis.service.CrudService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; import com.elink.esua.epdc.vaccine.epidemic.dto.*; import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultDTO; import com.elink.esua.epdc.vaccine.epidemic.dto.result.EpidemicPageResultV2DTO; @@ -184,4 +185,14 @@ public interface EpidemicUserInfoService extends CrudService + * @author wgf + * @date 2022/5/30 9:27 + */ + Result getOwner(Map params); } diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java index 10fef45..382cd05 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java @@ -23,6 +23,7 @@ import com.elink.esua.epdc.dto.SysSimpleDictDTO; import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; import com.elink.esua.epdc.dto.house.result.EpdcPopulationErrorResultDTO; +import com.elink.esua.epdc.dto.personroom.EpidemicUnitOwnerDTO; import com.elink.esua.epdc.vaccine.constant.ImageConstant; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInoutRecordDao; @@ -1590,4 +1591,9 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl getOwner(Map params) { + return new Result().ok(baseDao.getOwner(params)); + } + } diff --git a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml index 18ecdc5..89a6b01 100644 --- a/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml +++ b/epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml @@ -627,4 +627,29 @@ #{id} + +