62 changed files with 6202 additions and 0 deletions
@ -0,0 +1,100 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<PageData<EpidemicBuildingUnitDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<EpidemicBuildingUnitDTO> page = epidemicBuildingUnitService.page(params); |
|||
return new Result<PageData<EpidemicBuildingUnitDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<EpidemicBuildingUnitDetailResultDTO> get(@PathVariable("id") String id) { |
|||
EpidemicBuildingUnitDetailResultDTO data = epidemicBuildingUnitService.get(id); |
|||
return new Result<EpidemicBuildingUnitDetailResultDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<EpidemicBuildingUnitDTO> list = epidemicBuildingUnitService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, EpidemicBuildingUnitExcel.class); |
|||
} |
|||
|
|||
@GetMapping("updateOwner") |
|||
public Result updateOwner() { |
|||
epidemicBuildingUnitService.updateOwner(); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<PageData<EpidemicPlotBuildingErrorDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<EpidemicPlotBuildingErrorDTO> page = epidemicPlotBuildingErrorService.page(params); |
|||
return new Result<PageData<EpidemicPlotBuildingErrorDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<EpidemicPlotBuildingErrorDTO> get(@PathVariable("id") String id){ |
|||
EpidemicPlotBuildingErrorDTO data = epidemicPlotBuildingErrorService.get(id); |
|||
return new Result<EpidemicPlotBuildingErrorDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<EpidemicPlotBuildingErrorDTO> list = epidemicPlotBuildingErrorService.getErrorExcelList(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, EpidemicPlotBuildingErrorExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,123 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<PageData<EpidemicPlotBuildingDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<EpidemicPlotBuildingDTO> page = epidemicPlotBuildingService.page(params); |
|||
return new Result<PageData<EpidemicPlotBuildingDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<EpidemicPlotBuildingResultDTO> get(@PathVariable("id") String id) { |
|||
EpidemicPlotBuildingResultDTO data = epidemicPlotBuildingService.get(id); |
|||
return new Result<EpidemicPlotBuildingResultDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<EpidemicPlotBuildingDTO> list = epidemicPlotBuildingService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, EpidemicPlotBuildingExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* 小区楼栋房间绑定下拉框 |
|||
* |
|||
* @param formDTO |
|||
* @return io.pingyin.common.utils.Result<java.util.List < io.pingyin.modules.epidemic.dto.DictOptionDTO>> |
|||
* @author zhy |
|||
* @date 2022/4/2 14:47 |
|||
*/ |
|||
@GetMapping("getBuildingOption") |
|||
public Result<List<DictOptionDTO>> getBuildingOption(EpidemicPlotBuildingDTO formDTO) { |
|||
List<DictOptionDTO> list = epidemicPlotBuildingService.getBuildingOption(formDTO); |
|||
return new Result<List<DictOptionDTO>>().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); |
|||
} |
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<PageData<EpidemicPlotCoordinateDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<EpidemicPlotCoordinateDTO> page = epidemicPlotCoordinateService.page(params); |
|||
return new Result<PageData<EpidemicPlotCoordinateDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<EpidemicPlotCoordinateDTO> get(@PathVariable("id") String id) { |
|||
EpidemicPlotCoordinateDTO data = epidemicPlotCoordinateService.get(id); |
|||
return new Result<EpidemicPlotCoordinateDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<EpidemicPlotCoordinateDTO> 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<List<EpidemicPlotCoordinateResultDTO>> getList() { |
|||
List<EpidemicPlotCoordinateResultDTO> list = epidemicPlotCoordinateService.getList(); |
|||
return new Result<List<EpidemicPlotCoordinateResultDTO>>().ok(list); |
|||
} |
|||
|
|||
/** |
|||
* 小区楼栋房间绑定下拉框 |
|||
* |
|||
* @param formDTO |
|||
* @return io.pingyin.common.utils.Result<java.util.List < io.pingyin.modules.epidemic.dto.DictOptionDTO>> |
|||
* @author zhy |
|||
* @date 2022/4/2 14:47 |
|||
*/ |
|||
@GetMapping("getPlotOption") |
|||
public Result<List<DictOptionDTO>> getPlotOption(EpidemicPlotCoordinateDTO formDTO) { |
|||
List<DictOptionDTO> list = epidemicPlotCoordinateService.getPlotOption(formDTO); |
|||
return new Result<List<DictOptionDTO>>().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); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicBuildingUnitEntity> { |
|||
|
|||
/** |
|||
* 查询楼栋关联房屋 |
|||
* |
|||
* @param buildingId |
|||
* @return java.util.List<io.pingyin.modules.personroom.entity.EpidemicBuildingUnitEntity> |
|||
* @author zhy |
|||
* @date 2022/2/15 14:50 |
|||
*/ |
|||
List<EpidemicBuildingUnitEntity> selectByBuildingId(@Param("buildingId") String buildingId); |
|||
|
|||
/** |
|||
* 获取房屋列表 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<io.pingyin.modules.personroom.dto.EpidemicBuildingUnitDTO> |
|||
* @author zhy |
|||
* @date 2022/4/6 17:22 |
|||
*/ |
|||
List<EpidemicBuildingUnitDTO> getUnitPage(Map<String, Object> 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<io.pingyin.modules.personroom.entity.EpidemicBuildingUnitEntity> |
|||
* @author zhy |
|||
* @date 2022/4/12 9:09 |
|||
*/ |
|||
List<EpidemicBuildingUnitEntity> selectOldData(); |
|||
} |
@ -0,0 +1,134 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingEntity> { |
|||
|
|||
/** |
|||
* 查询小区关联楼栋 |
|||
* |
|||
* @param plotId |
|||
* @return java.util.List<io.pingyin.modules.personroom.entity.EpidemicPlotBuildingEntity> |
|||
* @author zhy |
|||
* @date 2022/2/15 14:48 |
|||
*/ |
|||
List<EpidemicPlotBuildingEntity> selectByPlotId(@Param("plotId") String plotId); |
|||
|
|||
/** |
|||
* 获取小区列表 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<io.pingyin.modules.personroom.dto.EpidemicPlotBuildingDTO> |
|||
* @author zhy |
|||
* @date 2022/4/7 15:23 |
|||
*/ |
|||
List<EpidemicPlotBuildingDTO> getBuildingPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 楼栋列表下拉框 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<io.pingyin.modules.epidemic.dto.DictOptionDTO> |
|||
* @author zhy |
|||
* @date 2022/2/15 13:38 |
|||
*/ |
|||
List<DictOptionDTO> 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<io.pingyin.modules.personroom.entity.EpidemicPlotBuildingEntity> |
|||
*/ |
|||
List<EpidemicPlotBuildingEntity> selectExistUpdate(EpidemicPlotBuildingDTO dto); |
|||
|
|||
/** |
|||
* @describe: 更新 确认名称是否重复 |
|||
* @author wangtong |
|||
* @date 2022/4/27 12:10 |
|||
* @params [dto] |
|||
* @return java.util.List<io.pingyin.modules.personroom.entity.EpidemicPlotBuildingEntity> |
|||
*/ |
|||
List<EpidemicPlotBuildingEntity> selectExistByName(EpidemicPlotBuildingDTO dto); |
|||
|
|||
/** |
|||
* @describe: 物理删除数据 |
|||
* @author wangtong |
|||
* @date 2022/4/27 16:47 |
|||
* @params [asList] |
|||
* @return void |
|||
*/ |
|||
void realDeleteBatchIds(@Param("ids") List<String> ids); |
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingErrorEntity> { |
|||
|
|||
/** |
|||
* @describe: 导出错误信息 |
|||
* @author wangtong |
|||
* @date 2022/4/25 20:30 |
|||
* @params [params] |
|||
* @return java.util.List<io.pingyin.modules.personroom.dto.EpidemicPlotBuildingErrorDTO> |
|||
*/ |
|||
List<EpidemicPlotBuildingErrorDTO> getErrorExcelList(Map<String, Object> params); |
|||
} |
@ -0,0 +1,103 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateEntity> { |
|||
|
|||
/** |
|||
* [补充]根据街道编码查询小区/村庄列表 |
|||
* |
|||
* @param formDTO |
|||
* @return Result |
|||
* @author wanggongfeng |
|||
* @date 2021-07-10 |
|||
*/ |
|||
List<EpidemicPlotCoordinateResultDTO> listSimple(EpidemicPlotCoordinateFormDTO formDTO); |
|||
|
|||
/** |
|||
* 获取查询列表 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<io.pingyin.modules.personroom.entity.EpidemicPlotCoordinateEntity> |
|||
* @author zhy |
|||
* @date 2022/4/11 16:52 |
|||
*/ |
|||
List<EpidemicPlotCoordinateDTO> getPlotPage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 获取全部坐标信息 |
|||
* |
|||
* @param |
|||
* @return java.util.List<io.pingyin.modules.personroom.dto.result.EpidemicPlotCoordinateResultDTO> |
|||
* @author zhy |
|||
* @date 2021/12/3 16:57 |
|||
*/ |
|||
List<EpidemicPlotCoordinateResultDTO> getList(); |
|||
|
|||
/** |
|||
* 小区列表下拉框 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<io.pingyin.modules.epidemic.dto.DictOptionDTO> |
|||
* @author zhy |
|||
* @date 2022/2/15 13:38 |
|||
*/ |
|||
List<DictOptionDTO> getPlotOption(EpidemicPlotCoordinateDTO formDTO); |
|||
|
|||
/** |
|||
* 获取旧数据 |
|||
* |
|||
* @return java.util.List<io.pingyin.modules.epidemic.dto.DictOptionDTO> |
|||
* @author zhy |
|||
* @date 2022/2/15 13:38 |
|||
*/ |
|||
List<EpidemicPlotCoordinateEntity> getOldData(); |
|||
|
|||
/** |
|||
* 地理坐标的单条查询 |
|||
*/ |
|||
EpidemicPlotCoordinateResultDTO getCoordinate(String plot, String gridId); |
|||
|
|||
/** |
|||
* @describe: 根据网格id获取所有小区 |
|||
* @author wangtong |
|||
* @date 2022/4/25 18:47 |
|||
* @params [gridId] |
|||
* @return java.util.List<io.pingyin.modules.personroom.entity.EpidemicPlotCoordinateEntity> |
|||
*/ |
|||
List<EpidemicPlotCoordinateEntity> getListByGridId(@Param("gridId") String gridId); |
|||
} |
@ -0,0 +1,57 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateErrorEntity> { |
|||
|
|||
/** |
|||
* 根据编号获取最新插入的数据集合 |
|||
* |
|||
* @param no |
|||
* @return java.util.List<io.pingyin.modules.epidemic.dto.EpidemicUserErrorDTO> |
|||
* @author zhy |
|||
* @date 2021/11/24 9:08 |
|||
*/ |
|||
List<EpidemicPlotCoordinateErrorDTO> getErrorInfoByNo(@Param("no") Long no); |
|||
|
|||
/** |
|||
* 删除数据数据集合 |
|||
* |
|||
* @param no |
|||
* @return void |
|||
* @author zhy |
|||
* @date 2021/11/24 9:08 |
|||
*/ |
|||
int deleteErrorInfoByNo(@Param("no") Long no); |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotGridEntity> { |
|||
|
|||
/** |
|||
* 根据小区ID删除 |
|||
* |
|||
* @param plotId |
|||
* @return int |
|||
* @author zhy |
|||
* @date 2022/4/2 14:02 |
|||
*/ |
|||
int deleteByPlotId(@Param("plotId") Long plotId); |
|||
} |
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicUnitOwnerEntity> { |
|||
|
|||
/** |
|||
* 根据单元ID删除 |
|||
* |
|||
* @param unitId |
|||
* @return int |
|||
* @author zhy |
|||
* @date 2022/4/2 14:02 |
|||
*/ |
|||
int deleteByUnitId(@Param("unitId") Long unitId); |
|||
} |
@ -0,0 +1,173 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
@ -0,0 +1,210 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,105 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,115 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,119 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,169 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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;
|
|||
|
|||
} |
@ -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; |
|||
|
|||
} |
@ -0,0 +1,99 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,89 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicBuildingUnitEntity, EpidemicBuildingUnitDTO> { |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @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(); |
|||
} |
@ -0,0 +1,106 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingErrorEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<EpidemicPlotBuildingErrorDTO> |
|||
* @author generator |
|||
* @date 2022-04-25 |
|||
*/ |
|||
PageData<EpidemicPlotBuildingErrorDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<EpidemicPlotBuildingErrorDTO> |
|||
* @author generator |
|||
* @date 2022-04-25 |
|||
*/ |
|||
List<EpidemicPlotBuildingErrorDTO> list(Map<String, Object> 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<io.pingyin.modules.personroom.dto.EpidemicPlotBuildingErrorDTO> |
|||
*/ |
|||
List<EpidemicPlotBuildingErrorDTO> getErrorExcelList(Map<String, Object> params); |
|||
} |
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingEntity, EpidemicPlotBuildingDTO> { |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @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<io.pingyin.modules.epidemic.dto.DictOptionDTO> |
|||
* @author zhy |
|||
* @date 2022/2/15 13:38 |
|||
*/ |
|||
List<DictOptionDTO> getBuildingOption(EpidemicPlotBuildingDTO formDTO); |
|||
|
|||
/** |
|||
* @describe: 导入房屋信息 |
|||
* @author wangtong |
|||
* @date 2022/4/25 17:03 |
|||
* @params [file] |
|||
* @return io.pingyin.common.utils.Result |
|||
*/ |
|||
Result importBuilding(MultipartFile file); |
|||
} |
@ -0,0 +1,116 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateErrorEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<EpidemicPlotCoordinateErrorDTO> |
|||
* @author generator |
|||
* @date 2022-04-07 |
|||
*/ |
|||
PageData<EpidemicPlotCoordinateErrorDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<EpidemicPlotCoordinateErrorDTO> |
|||
* @author generator |
|||
* @date 2022-04-07 |
|||
*/ |
|||
List<EpidemicPlotCoordinateErrorDTO> list(Map<String, Object> 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<io.pingyin.modules.epidemic.dto.EpidemicUserErrorDTO> |
|||
* @author zhy |
|||
* @date 2021/11/24 9:08 |
|||
*/ |
|||
List<EpidemicPlotCoordinateErrorDTO> getErrorInfoByNo(Long no); |
|||
|
|||
/** |
|||
* 删除数据数据集合 |
|||
* |
|||
* @param no |
|||
* @return void |
|||
* @author zhy |
|||
* @date 2021/11/24 9:08 |
|||
*/ |
|||
void deleteErrorInfoByNo(Long no); |
|||
} |
@ -0,0 +1,122 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateEntity, EpidemicPlotCoordinateDTO> { |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @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<List<EpidemicPlotCoordinateResultDTO>> listSimple(EpidemicPlotCoordinateFormDTO formDTO); |
|||
|
|||
/** |
|||
* 获取全部坐标信息 |
|||
* |
|||
* @param |
|||
* @return java.util.List<io.pingyin.modules.personroom.dto.result.EpidemicPlotCoordinateResultDTO> |
|||
* @author zhy |
|||
* @date 2021/12/3 16:57 |
|||
*/ |
|||
List<EpidemicPlotCoordinateResultDTO> getList(); |
|||
|
|||
/** |
|||
* 小区列表下拉框 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<io.pingyin.modules.epidemic.dto.DictOptionDTO> |
|||
* @author zhy |
|||
* @date 2022/2/15 13:38 |
|||
*/ |
|||
List<DictOptionDTO> 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); |
|||
} |
@ -0,0 +1,117 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotGridEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<EpidemicPlotGridDTO> |
|||
* @author generator |
|||
* @date 2022-04-02 |
|||
*/ |
|||
PageData<EpidemicPlotGridDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<EpidemicPlotGridDTO> |
|||
* @author generator |
|||
* @date 2022-04-02 |
|||
*/ |
|||
List<EpidemicPlotGridDTO> list(Map<String, Object> 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<String> gridIds); |
|||
} |
@ -0,0 +1,106 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicUnitOwnerEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<EpidemicUnitOwnerDTO> |
|||
* @author generator |
|||
* @date 2022-04-09 |
|||
*/ |
|||
PageData<EpidemicUnitOwnerDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<EpidemicUnitOwnerDTO> |
|||
* @author generator |
|||
* @date 2022-04-09 |
|||
*/ |
|||
List<EpidemicUnitOwnerDTO> list(Map<String, Object> 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); |
|||
} |
@ -0,0 +1,205 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicBuildingUnitDao, EpidemicBuildingUnitEntity, EpidemicBuildingUnitDTO> implements EpidemicBuildingUnitService { |
|||
|
|||
@Autowired |
|||
private EpidemicBuildingUnitRedis epidemicBuildingUnitRedis; |
|||
|
|||
@Autowired |
|||
private EpidemicUnitOwnerService epidemicUnitOwnerService; |
|||
|
|||
@Override |
|||
public PageData<EpidemicBuildingUnitDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicBuildingUnitDTO> page = getPage(params); |
|||
List<EpidemicBuildingUnitDTO> list = baseDao.getUnitPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicBuildingUnitDTO> list(Map<String, Object> params) { |
|||
List<EpidemicBuildingUnitEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicBuildingUnitDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public QueryWrapper<EpidemicBuildingUnitEntity> getWrapper(Map<String, Object> 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<EpidemicBuildingUnitEntity> 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<String, Object> params = new HashMap<>(2); |
|||
params.put("unitId", id); |
|||
List<EpidemicUnitOwnerDTO> 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<EpidemicBuildingUnitEntity> list = baseDao.selectOldData(); |
|||
List<EpidemicUnitOwnerEntity> 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<EpidemicUnitOwnerDTO> owners, Long unitId) { |
|||
List<EpidemicUnitOwnerDTO> dtoList = owners.stream().filter(item -> StringUtils.isNotBlank(item.getIdCard())).collect(Collectors.toList()); |
|||
List<EpidemicUnitOwnerEntity> list = ConvertUtils.sourceToTarget(dtoList, EpidemicUnitOwnerEntity.class); |
|||
list.forEach(item -> { |
|||
item.setUnitId(unitId); |
|||
}); |
|||
epidemicUnitOwnerService.deleteByUnitId(unitId); |
|||
epidemicUnitOwnerService.insertBatch(list); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingErrorDao, EpidemicPlotBuildingErrorEntity> implements EpidemicPlotBuildingErrorService { |
|||
|
|||
@Autowired |
|||
private EpidemicPlotBuildingErrorRedis epidemicPlotBuildingErrorRedis; |
|||
|
|||
@Override |
|||
public PageData<EpidemicPlotBuildingErrorDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicPlotBuildingErrorEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, EpidemicPlotBuildingErrorDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotBuildingErrorDTO> list(Map<String, Object> params) { |
|||
List<EpidemicPlotBuildingErrorEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicPlotBuildingErrorDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<EpidemicPlotBuildingErrorEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<EpidemicPlotBuildingErrorEntity> 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<EpidemicPlotBuildingErrorDTO> getErrorExcelList(Map<String, Object> params) { |
|||
return baseDao.getErrorExcelList(params); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,529 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotBuildingDao, EpidemicPlotBuildingEntity, EpidemicPlotBuildingDTO> 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<EpidemicPlotBuildingDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicPlotBuildingDTO> page = getPage(params); |
|||
List<EpidemicPlotBuildingDTO> list = baseDao.getBuildingPage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotBuildingDTO> list(Map<String, Object> params) { |
|||
return baseDao.getBuildingPage(params); |
|||
} |
|||
|
|||
@Override |
|||
public QueryWrapper<EpidemicPlotBuildingEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
String name = (String) params.get("buildingName"); |
|||
String type = (String) params.get("buildingType"); |
|||
|
|||
QueryWrapper<EpidemicPlotBuildingEntity> 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<EpidemicPlotBuildingEntity> existList = baseDao.selectExistByName(dto); |
|||
if (!existList.isEmpty()) { |
|||
throw new RenException("该楼栋已存在"); |
|||
} |
|||
|
|||
if(StringUtils.isBlank(dto.getBuildingCode()) || dto.getBuildingCode().length() != 22){ |
|||
throw new RenException("楼栋编码不可为空且必须为22位不重复"); |
|||
} |
|||
|
|||
List<EpidemicPlotBuildingEntity> 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<EpidemicPlotBuildingEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq("PLOT_ID", dto.getPlotId()); |
|||
wrapper.eq("BUILDING_NAME", dto.getBuildingName()); |
|||
List<EpidemicPlotBuildingEntity> existList = baseDao.selectList(wrapper); |
|||
if (!existList.isEmpty()) { |
|||
throw new RenException("该楼栋已存在"); |
|||
} |
|||
|
|||
if(StringUtils.isBlank(dto.getBuildingCode()) || dto.getBuildingCode().length() != 22){ |
|||
throw new RenException("楼栋编码不可为空且必须为22位不重复"); |
|||
} |
|||
|
|||
QueryWrapper<EpidemicPlotBuildingEntity> wrapperSec = new QueryWrapper<>(); |
|||
wrapperSec.eq("BUILDING_CODE", dto.getBuildingCode()); |
|||
List<EpidemicPlotBuildingEntity> 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<DictOptionDTO> 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<EpidemicPlotBuildingImportExcel> recordList = ExcelImportUtil.importExcel(f, EpidemicPlotBuildingImportExcel.class, importParams); |
|||
// 未成功匹配数据
|
|||
List<EpidemicPlotBuildingImportExcel> nonExistInfoList = new ArrayList<>(); |
|||
|
|||
//字典类型数据
|
|||
// 楼栋状态全部取出
|
|||
List<SysSimpleDictDTO> buildingStateList = adminFeignClient.listSimpleDictInfo("building_state").getData(); |
|||
List<String> buildingStateCodeList = buildingStateList.stream().map(SysSimpleDictDTO::getDictValue).collect(Collectors.toList()); |
|||
// 楼栋类型全部取出
|
|||
List<SysSimpleDictDTO> buildingTypeList = adminFeignClient.listSimpleDictInfo("building_type").getData(); |
|||
List<String> buildingTypeCodeList = buildingTypeList.stream().map(SysSimpleDictDTO::getDictValue).collect(Collectors.toList()); |
|||
// 小区性质全部取出
|
|||
List<SysSimpleDictDTO> plotNatureList = adminFeignClient.listSimpleDictInfo("plot_nature").getData(); |
|||
List<String> 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<EpidemicPlotCoordinateEntity> 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<EpidemicPlotBuildingErrorEntity> 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<EpidemicPlotBuildingImportExcel> recordList, AllDeptDTO allDeptInfo) { |
|||
//取出所有的小区名称
|
|||
List<String> targetTypeList = recordList.stream().map(EpidemicPlotBuildingImportExcel -> EpidemicPlotBuildingImportExcel.getPlotName()).collect(Collectors.toList()); |
|||
|
|||
//去重复并不打乱顺序
|
|||
List<String> 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<EpidemicPlotCoordinateEntity> 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; |
|||
} |
|||
} |
@ -0,0 +1,114 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateErrorDao, EpidemicPlotCoordinateErrorEntity> implements EpidemicPlotCoordinateErrorService { |
|||
|
|||
@Autowired |
|||
private EpidemicPlotCoordinateErrorRedis epidemicPlotCoordinateErrorRedis; |
|||
|
|||
@Override |
|||
public PageData<EpidemicPlotCoordinateErrorDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicPlotCoordinateErrorEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, EpidemicPlotCoordinateErrorDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotCoordinateErrorDTO> list(Map<String, Object> params) { |
|||
List<EpidemicPlotCoordinateErrorEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicPlotCoordinateErrorDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<EpidemicPlotCoordinateErrorEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<EpidemicPlotCoordinateErrorEntity> 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<EpidemicPlotCoordinateErrorDTO> getErrorInfoByNo(Long no) { |
|||
return baseDao.getErrorInfoByNo(no); |
|||
} |
|||
|
|||
@Override |
|||
public void deleteErrorInfoByNo(Long no) { |
|||
baseDao.deleteErrorInfoByNo(no); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,409 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotCoordinateDao, EpidemicPlotCoordinateEntity, EpidemicPlotCoordinateDTO> 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<EpidemicPlotCoordinateDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicPlotCoordinateDTO> page = getPage(params); |
|||
List<EpidemicPlotCoordinateDTO> list = baseDao.getPlotPage(params); |
|||
list.forEach(item->{ |
|||
|
|||
}); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotCoordinateDTO> list(Map<String, Object> params) { |
|||
List<EpidemicPlotCoordinateEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicPlotCoordinateDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public QueryWrapper<EpidemicPlotCoordinateEntity> getWrapper(Map<String, Object> 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<EpidemicPlotCoordinateEntity> 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<String, Object> params = new HashMap<>(2); |
|||
params.put("plotId", id); |
|||
List<EpidemicPlotGridDTO> 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<EpidemicPlotCoordinateEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq("PLOT_NAME", dto.getPlotName()); |
|||
List<EpidemicPlotCoordinateEntity> 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<List<EpidemicPlotCoordinateResultDTO>> listSimple(EpidemicPlotCoordinateFormDTO formDTO) { |
|||
|
|||
List<EpidemicPlotCoordinateResultDTO> list = baseDao.listSimple(formDTO); |
|||
|
|||
return new Result<List<EpidemicPlotCoordinateResultDTO>>().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotCoordinateResultDTO> getList() { |
|||
return baseDao.getList(); |
|||
} |
|||
|
|||
@Override |
|||
public List<DictOptionDTO> getPlotOption(EpidemicPlotCoordinateDTO formDTO) { |
|||
return baseDao.getPlotOption(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public void updateRelation() { |
|||
List<EpidemicPlotCoordinateEntity> oldRelation = baseDao.getOldData(); |
|||
oldRelation.forEach(item -> { |
|||
List<String> 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<EpidemicPlotCoordinateImportExcel> 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<EpidemicPlotCoordinateImportExcel> addPlotList = new ArrayList<>(); |
|||
// 存储错误数据批量插入实体
|
|||
List<EpidemicPlotCoordinateImportExcel> 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<EpidemicPlotGridEntity> 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<EpidemicPlotCoordinateErrorEntity> 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<String> 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()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,136 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicPlotGridDao, EpidemicPlotGridEntity> implements EpidemicPlotGridService { |
|||
|
|||
@Autowired |
|||
private EpidemicPlotGridRedis epidemicPlotGridRedis; |
|||
|
|||
@Override |
|||
public PageData<EpidemicPlotGridDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicPlotGridEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, EpidemicPlotGridDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicPlotGridDTO> list(Map<String, Object> params) { |
|||
List<EpidemicPlotGridEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicPlotGridDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<EpidemicPlotGridEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
String plotId = (String) params.get("plotId"); |
|||
|
|||
QueryWrapper<EpidemicPlotGridEntity> 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<String> gridIds) { |
|||
// 先删除小区网格关系
|
|||
deleteByPlotId(plotId); |
|||
|
|||
// 没有网格权限
|
|||
if (CollUtil.isEmpty(gridIds)) { |
|||
return; |
|||
} |
|||
|
|||
// 保存小区网格关系
|
|||
for (String grid : gridIds) { |
|||
EpidemicPlotGridEntity entity = new EpidemicPlotGridEntity(); |
|||
entity.setGridId(grid); |
|||
entity.setPlotId(plotId); |
|||
|
|||
// 保存
|
|||
insert(entity); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,111 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<EpidemicUnitOwnerDao, EpidemicUnitOwnerEntity> implements EpidemicUnitOwnerService { |
|||
|
|||
@Autowired |
|||
private EpidemicUnitOwnerRedis epidemicUnitOwnerRedis; |
|||
|
|||
@Override |
|||
public PageData<EpidemicUnitOwnerDTO> page(Map<String, Object> params) { |
|||
IPage<EpidemicUnitOwnerEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, EpidemicUnitOwnerDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpidemicUnitOwnerDTO> list(Map<String, Object> params) { |
|||
List<EpidemicUnitOwnerEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, EpidemicUnitOwnerDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<EpidemicUnitOwnerEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
String unitId = (String)params.get("unitId"); |
|||
|
|||
QueryWrapper<EpidemicUnitOwnerEntity> 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); |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicBuildingUnitDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity" id="epidemicBuildingUnitMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="buildingId" column="BUILDING_ID"/> |
|||
<result property="unit" column="UNIT"/> |
|||
<result property="roomNo" column="ROOM_NO"/> |
|||
<result property="roomType" column="ROOM_TYPE"/> |
|||
<result property="roomUse" column="ROOM_USE"/> |
|||
<result property="ownerName" column="OWNER_NAME"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="rentalPurpose" column="RENTAL_PURPOSE"/> |
|||
<result property="lesseeName" column="LESSEE_NAME"/> |
|||
<result property="lesseeIdCard" column="LESSEE_ID_CARD"/> |
|||
<result property="lesseeMobile" column="LESSEE_MOBILE"/> |
|||
<result property="lesseeUnit" column="LESSEE_UNIT"/> |
|||
<result property="lesseeTime" column="LESSEE_TIME"/> |
|||
<result property="lesseeDate" column="LESSEE_DATE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="getUnitPage" resultType="com.elink.esua.epdc.dto.personroom.EpidemicBuildingUnitDTO"> |
|||
SELECT |
|||
u.*, |
|||
b.BUILDING_NAME, |
|||
p.PLOT_NAME |
|||
FROM |
|||
epidemic_building_unit u |
|||
LEFT JOIN epidemic_plot_building b ON u.BUILDING_ID = b.id |
|||
LEFT JOIN epidemic_plot_coordinate p ON b.PLOT_ID = p.id |
|||
<if test="(ownerName != null and ownerName !='') or (idCard != null and idCard !='') or (mobile != null and mobile !='')"> |
|||
LEFT JOIN epidemic_unit_owner o ON o.UNIT_ID = u.id |
|||
</if> |
|||
WHERE |
|||
u.DEL_FLAG = '0' |
|||
<if test="streetId != null and streetId !=''"> |
|||
AND u.STREET_ID = #{streetId} |
|||
</if> |
|||
<if test="communityId != null and communityId !=''"> |
|||
AND u.COMMUNITY_ID = #{communityId} |
|||
</if> |
|||
<if test="gridId != null and gridId !=''"> |
|||
AND u.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="roadName != null and roadName !=''"> |
|||
AND u.ROAD_NAME = #{roadName} |
|||
</if> |
|||
<if test="buildingId != null and buildingId !=''"> |
|||
AND u.BUILDING_ID = #{buildingId} |
|||
</if> |
|||
<if test="plotId != null and plotId !=''"> |
|||
AND b.PLOT_ID = #{plotId} |
|||
</if> |
|||
<if test="unit != null and unit !=''"> |
|||
AND u.UNIT = #{unit} |
|||
</if> |
|||
<if test="roomNo != null and roomNo !=''"> |
|||
AND u.ROOM_NO = #{roomNo} |
|||
</if> |
|||
<if test="roomType != null and roomType !=''"> |
|||
AND u.ROOM_TYPE = #{roomType} |
|||
</if> |
|||
<if test="roomUse != null and roomUse !=''"> |
|||
AND u.ROOM_USE = #{roomUse} |
|||
</if> |
|||
<if test="roomStatus != null and roomStatus !=''"> |
|||
AND u.ROOM_STATUS = #{roomStatus} |
|||
</if> |
|||
<if test="livingStatus != null and livingStatus !=''"> |
|||
AND u.LIVING_STATUS = #{livingStatus} |
|||
</if> |
|||
<if test="ownerName != null and ownerName !=''"> |
|||
AND o.OWNER_NAME = #{ownerName} |
|||
</if> |
|||
<if test="idCard != null and idCard !=''"> |
|||
AND o.ID_CARD = #{idCard} |
|||
</if> |
|||
<if test="mobile != null and mobile !=''"> |
|||
AND o.MOBILE = #{mobile} |
|||
</if> |
|||
ORDER BY u.CREATED_TIME DESC |
|||
</select> |
|||
|
|||
<select id="selectByBuildingId" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity"> |
|||
SELECT |
|||
id |
|||
FROM |
|||
epidemic_building_unit |
|||
WHERE |
|||
DEL_FLAG = '0' |
|||
AND BUILDING_ID = #{buildingId} |
|||
</select> |
|||
|
|||
<select id="selectDetailById" resultType="com.elink.esua.epdc.dto.personroom.result.EpidemicBuildingUnitDetailResultDTO"> |
|||
SELECT |
|||
bu.*, |
|||
pb.PLOT_ID, |
|||
pc.PLOT_NAME |
|||
FROM |
|||
epidemic_building_unit bu |
|||
LEFT JOIN epidemic_plot_building pb ON bu.BUILDING_ID = pb.ID |
|||
LEFT JOIN epidemic_plot_coordinate pc ON pb.PLOT_ID = pc.ID |
|||
WHERE |
|||
bu.ID = #{id} |
|||
</select> |
|||
|
|||
<select id="selectOldData" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicBuildingUnitEntity"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
epidemic_building_unit |
|||
WHERE |
|||
DEL_FLAG = '0' |
|||
AND ID_CARD IS NOT NULL |
|||
AND ID_CARD != '' |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,176 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotBuildingDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity" id="epidemicPlotBuildingMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="plotId" column="PLOT_ID"/> |
|||
<result property="buildingName" column="BUILDING_NAME"/> |
|||
<result property="buildingType" column="BUILDING_TYPE"/> |
|||
<result property="floorNum" column="FLOOR_NUM"/> |
|||
<result property="roomNum" column="ROOM_NUM"/> |
|||
<result property="householdNum" column="HOUSEHOLD_NUM"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<select id="selectByPlotId" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity"> |
|||
SELECT |
|||
id |
|||
FROM |
|||
epidemic_plot_building |
|||
WHERE |
|||
DEL_FLAG = '0' |
|||
AND PLOT_ID = #{plotId} |
|||
</select> |
|||
|
|||
<select id="getBuildingOption" resultType="com.elink.esua.epdc.dto.epidemic.DictOptionDTO"> |
|||
SELECT |
|||
pb.ID AS dictValue, |
|||
pb.BUILDING_NAME AS dictName |
|||
FROM |
|||
epidemic_plot_building pb |
|||
WHERE pb.DEL_FLAG = '0' |
|||
<if test="plotId != null and plotId !=''"> |
|||
and PLOT_ID = #{plotId} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
<select id="selectDetailById" resultType="com.elink.esua.epdc.dto.personroom.result.EpidemicPlotBuildingResultDTO"> |
|||
SELECT |
|||
pb.* |
|||
FROM |
|||
epidemic_plot_building pb |
|||
WHERE |
|||
pb.id = #{id} |
|||
GROUP BY |
|||
pb.ID |
|||
</select> |
|||
|
|||
<select id="getBuildingPage" resultType="com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingDTO"> |
|||
SELECT |
|||
b.id, |
|||
b.BUILDING_NAME, |
|||
b.BUILDING_TYPE, |
|||
b.FLOOR_NUM, |
|||
b.ROOM_NUM, |
|||
b.HOUSEHOLD_NUM, |
|||
b.CREATED_TIME, |
|||
b.STREET_NAME, |
|||
b.COMMUNITY_NAME, |
|||
b.GRID_NAME, |
|||
b.GRID_ID, |
|||
b.GRID_DEPT_ID, |
|||
b.BUILDING_CODE, |
|||
b.BUILDING_LONGITUDE, |
|||
b.BUILDING_LATITUDE, |
|||
b.BUILDING_STATE, |
|||
b.BUILDING_AREA, |
|||
b.ASSISANT_NAME, |
|||
b.ASSISANT_MOBILE, |
|||
b.PROPERTY_NAME, |
|||
b.PROPERTY_USER, |
|||
b.PROPERTY_MOBILE, |
|||
b.PLOT_NATURE, |
|||
b.BUILDING_USER_TOTAL, |
|||
b.UNDERGROUND_LAYER_NUM, |
|||
b.UNDERGROUND_ROOM_NUM, |
|||
b.SERVICE_SUPPLY_UNIT, |
|||
b.FIRE_CONTROL_POSITION, |
|||
b.EMERGENCY_POSITION, |
|||
p.PLOT_NAME, |
|||
concat(ifnull(p.PLOT_NAME,''),b.BUILDING_NAME) as buildingNameEx, |
|||
bs.dict_name as buildingStateName, |
|||
pn.dict_name as plotNatureName, |
|||
bt.dict_name as buildingTypeName, |
|||
b.BUILDING_LONGITUDE_DSF, |
|||
b.BUILDING_LATITUDE_DSF, |
|||
IF(0 + CAST(IFNULL(b.BUILDING_LONGITUDE_DSF, 0) AS CHAR)=0, 0, b.BUILDING_LONGITUDE_DSF) as buildingLongitudeDsfEx, |
|||
IF(0 + CAST(IFNULL(b.BUILDING_LATITUDE_DSF, 0) AS CHAR)=0, 0, b.BUILDING_LATITUDE_DSF) as buildingLatitudeDsfEx, |
|||
de.area_code as deptCode, |
|||
date_format(b.CREATED_TIME ,'%Y-%m-%d %H:%i:%s') as entryTime |
|||
FROM epidemic_plot_building b |
|||
LEFT JOIN epidemic_plot_coordinate p ON b.PLOT_ID = p.id AND p.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_admin.sys_dict bs on bs.dict_value = b.building_state and bs.dict_type = 'building_state' |
|||
LEFT JOIN esua_epdc_admin.sys_dict pn on pn.dict_value = b.plot_nature and pn.dict_type = 'plot_nature' |
|||
LEFT JOIN esua_epdc_admin.sys_dict bt on bt.dict_value = b.building_type and bt.dict_type = 'building_type' |
|||
left join esua_epdc_admin.sys_dept de on de.id=b.grid_id |
|||
WHERE |
|||
b.DEL_FLAG = '0' |
|||
<if test="streetId != null and streetId !=''"> |
|||
AND b.STREET_ID = #{streetId} |
|||
</if> |
|||
<if test="communityId != null and communityId !=''"> |
|||
AND b.COMMUNITY_ID = #{communityId} |
|||
</if> |
|||
<if test="gridId != null and gridId !=''"> |
|||
AND b.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="plotId != null and plotId !=''"> |
|||
AND b.PLOT_ID = #{plotId} |
|||
</if> |
|||
<if test="buildingName != null and buildingName !=''"> |
|||
AND b.BUILDING_NAME = #{buildingName} |
|||
</if> |
|||
<if test="buildingType != null and buildingType !=''"> |
|||
AND b.BUILDING_TYPE = #{buildingType} |
|||
</if> |
|||
<if test="buildingCode != null and buildingCode !=''"> |
|||
AND b.BUILDING_CODE LIKE '%${buildingCode}%' |
|||
</if> |
|||
ORDER BY b.CREATED_TIME DESC |
|||
</select> |
|||
<select id="getMaxIndexByGridId" resultType="java.lang.Integer"> |
|||
SELECT SUBSTR(building_code,-3) |
|||
FROM `epidemic_plot_building` |
|||
where GRID_ID=#{gridId} |
|||
and del_flag = '0' |
|||
order by building_code desc |
|||
limit 1 |
|||
</select> |
|||
<select id="selectByGridPlotAndName" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity"> |
|||
select * |
|||
from epidemic_plot_building |
|||
where del_flag = '0' |
|||
<if test="plotId != null and plotId !=''"> |
|||
and plot_id=#{plotId} |
|||
</if> |
|||
and GRID_ID=#{gridId} |
|||
and BUILDING_NAME = #{buildingName} |
|||
</select> |
|||
<select id="selectByBuildingCode" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity"> |
|||
select id,BUILDING_NAME |
|||
from epidemic_plot_building |
|||
where del_flag = '0' |
|||
and building_code=#{buildingCode} |
|||
</select> |
|||
<select id="selectExistUpdate" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity"> |
|||
select * from epidemic_plot_building |
|||
where del_flag = '0' |
|||
and building_code=#{buildingCode} |
|||
and id!=#{id} |
|||
</select> |
|||
<select id="selectExistByName" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingEntity"> |
|||
select * |
|||
from epidemic_plot_building |
|||
where del_flag = '0' |
|||
<if test="plotId != null and plotId !=''"> |
|||
and plot_id=#{plotId} |
|||
</if> |
|||
and BUILDING_NAME = #{buildingName} |
|||
and id!=#{id} |
|||
</select> |
|||
<delete id="realDeleteBatchIds"> |
|||
delete from epidemic_plot_building where id in |
|||
<foreach item="id" collection="ids" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,70 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotBuildingErrorDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotBuildingErrorEntity" id="epidemicPlotBuildingErrorMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="plotId" column="PLOT_ID"/> |
|||
<result property="buildingName" column="BUILDING_NAME"/> |
|||
<result property="buildingType" column="BUILDING_TYPE"/> |
|||
<result property="floorNum" column="FLOOR_NUM"/> |
|||
<result property="roomNum" column="ROOM_NUM"/> |
|||
<result property="householdNum" column="HOUSEHOLD_NUM"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="buildingXy" column="BUILDING_xy"/> |
|||
<result property="buildingState" column="BUILDING_STATE"/> |
|||
<result property="buildingArea" column="BUILDING_AREA"/> |
|||
<result property="assisantName" column="ASSISANT_NAME"/> |
|||
<result property="assisantMobile" column="ASSISANT_MOBILE"/> |
|||
<result property="propertyName" column="PROPERTY_NAME"/> |
|||
<result property="propertyUser" column="PROPERTY_USER"/> |
|||
<result property="propertyMobile" column="PROPERTY_MOBILE"/> |
|||
<result property="plotNature" column="PLOT_NATURE"/> |
|||
<result property="buildingUserTotal" column="BUILDING_USER_TOTAL"/> |
|||
<result property="undergroundLayerNum" column="UNDERGROUND_LAYER_NUM"/> |
|||
<result property="undergroundRoomNum" column="UNDERGROUND_ROOM_NUM"/> |
|||
<result property="serviceSupplyUnit" column="SERVICE_SUPPLY_UNIT"/> |
|||
<result property="fireControlPosition" column="FIRE_CONTROL_POSITION"/> |
|||
<result property="emergencyPosition" column="EMERGENCY_POSITION"/> |
|||
<result property="errorInfo" column="ERROR_INFO"/> |
|||
</resultMap> |
|||
<select id="getErrorExcelList" resultType="com.elink.esua.epdc.dto.personroom.EpidemicPlotBuildingErrorDTO"> |
|||
select |
|||
be.PLOT_NAME, |
|||
be.BUILDING_CODE, |
|||
be.BUILDING_NAME, |
|||
IFNULL(bt.dict_name,be.BUILDING_TYPE) AS buildingType, |
|||
be.FLOOR_NUM, |
|||
be.ROOM_NUM, |
|||
be.HOUSEHOLD_NUM, |
|||
be.BUILDING_xy, |
|||
IFNULL(bs.dict_name,be.BUILDING_STATE) AS buildingState, |
|||
be.BUILDING_AREA, |
|||
be.ASSISANT_NAME, |
|||
be.ASSISANT_MOBILE, |
|||
be.PROPERTY_NAME, |
|||
be.PROPERTY_USER, |
|||
be.PROPERTY_MOBILE, |
|||
IFNULL(pn.dict_name,be.PLOT_NATURE) AS plotNature, |
|||
be.BUILDING_USER_TOTAL, |
|||
be.UNDERGROUND_LAYER_NUM, |
|||
be.UNDERGROUND_ROOM_NUM, |
|||
be.SERVICE_SUPPLY_UNIT, |
|||
be.FIRE_CONTROL_POSITION, |
|||
be.EMERGENCY_POSITION, |
|||
be.ERROR_INFO |
|||
from epidemic_plot_building_error be |
|||
LEFT JOIN esua_epdc_admin.sys_dict bs on bs.dict_value = be.building_state and bs.dict_type = 'building_state' |
|||
LEFT JOIN esua_epdc_admin.sys_dict pn on pn.dict_value = be.plot_nature and pn.dict_type = 'plot_nature' |
|||
LEFT JOIN esua_epdc_admin.sys_dict bt on bt.dict_value = be.building_type and bt.dict_type = 'building_type' |
|||
where error_id=#{errorId} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,170 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotCoordinateDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity" id="epidemicPlotCoordinateMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="streetName" column="STREET_NAME"/> |
|||
<result property="streetId" column="STREET_ID"/> |
|||
<result property="communityName" column="COMMUNITY_NAME"/> |
|||
<result property="communityId" column="COMMUNITY_ID"/> |
|||
<result property="mapPlotName" column="MAP_PLOT_NAME"/> |
|||
<result property="longitude" column="LONGITUDE"/> |
|||
<result property="latitude" column="LATITUDE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="gridName" column="GRID_NAME"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="plotName" column="PLOT_NAME"/> |
|||
</resultMap> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateDTO" id="epidemicPlotCoordinateDTOMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="streetName" column="STREET_NAME"/> |
|||
<result property="streetId" column="STREET_ID"/> |
|||
<result property="communityName" column="COMMUNITY_NAME"/> |
|||
<result property="communityId" column="COMMUNITY_ID"/> |
|||
<result property="mapPlotName" column="MAP_PLOT_NAME"/> |
|||
<result property="longitude" column="LONGITUDE"/> |
|||
<result property="latitude" column="LATITUDE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="gridName" column="GRID_NAME"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="plotName" column="PLOT_NAME"/> |
|||
</resultMap> |
|||
|
|||
<select id="getPlotPage" resultMap="epidemicPlotCoordinateDTOMap"> |
|||
SELECT |
|||
pc.*, |
|||
GROUP_CONCAT( d.`name` SEPARATOR ',' ) AS DEPT_NAME |
|||
FROM |
|||
epidemic_plot_coordinate pc |
|||
LEFT JOIN epidemic_plot_grid g ON g.PLOT_ID = pc.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept d ON d.id = g.GRID_ID |
|||
WHERE |
|||
pc.DEL_FLAG = '0' |
|||
<if test="plotName != null and plotName != ''"> |
|||
and pc.PLOT_NAME like CONCAT('%',#{plotName},'%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
and pc.STREET_ID = #{streetId} |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
and pc.COMMUNITY_ID = #{communityId} |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and g.GRID_ID = #{gridId} |
|||
</if> |
|||
GROUP BY |
|||
pc.id |
|||
ORDER BY |
|||
CREATED_TIME DESC |
|||
</select> |
|||
|
|||
<select id="listSimple" resultType="com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO" |
|||
parameterType="com.elink.esua.epdc.dto.personroom.form.EpidemicPlotCoordinateFormDTO"> |
|||
|
|||
select |
|||
pc.ID, |
|||
pc.PLOT_NAME, |
|||
pc.LONGITUDE, |
|||
pc.LATITUDE |
|||
from epidemic_plot_coordinate pc |
|||
where pc.DEL_FLAG = 0 |
|||
and pc.STREET_id = #{streetId} |
|||
<if test="plotName != null and plotName != ''"> |
|||
and pc.plotName like CONCAT('%',#{plotName},'%') |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
<select id="getList" resultType="com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO"> |
|||
select |
|||
pc.ID, |
|||
pc.MAP_PLOT_NAME, |
|||
pc.PLOT_NAME, |
|||
pc.COMMUNITY_NAME, |
|||
pc.COMMUNITY_ID, |
|||
pc.GRID_NAME, |
|||
pc.GRID_ID, |
|||
pc.LONGITUDE, |
|||
pc.LATITUDE |
|||
from epidemic_plot_coordinate pc |
|||
where pc.DEL_FLAG = '0' |
|||
</select> |
|||
|
|||
<select id="getPlotOption" resultType="com.elink.esua.epdc.dto.epidemic.DictOptionDTO"> |
|||
select |
|||
pc.ID AS dictValue, |
|||
pc.PLOT_NAME AS dictName |
|||
from epidemic_plot_coordinate pc |
|||
LEFT JOIN epidemic_plot_grid pg ON pc.id = pg.PLOT_ID |
|||
<where> |
|||
<if test="streetId != null and streetId != ''"> |
|||
pc.STREET_ID = #{streetId} |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
and pc.COMMUNITY_ID = #{communityId} |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and pg.GRID_ID = #{gridId} |
|||
</if> |
|||
and pc.DEL_FLAG = '0' |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="getOldData" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
epidemic_plot_coordinate |
|||
WHERE |
|||
DEL_FLAG = 0 |
|||
AND GRID_ID != '' |
|||
AND GRID_ID IS NOT NULL |
|||
</select> |
|||
|
|||
<select id="getCoordinate" |
|||
resultType="com.elink.esua.epdc.dto.personroom.result.EpidemicPlotCoordinateResultDTO"> |
|||
select |
|||
pc.ID, |
|||
pc.MAP_PLOT_NAME, |
|||
pc.PLOT_NAME, |
|||
pc.COMMUNITY_NAME, |
|||
pc.COMMUNITY_ID, |
|||
pc.GRID_NAME, |
|||
pc.GRID_ID, |
|||
pc.LONGITUDE, |
|||
pc.LATITUDE |
|||
from epidemic_plot_coordinate pc |
|||
<where> |
|||
pc.DEL_FLAG = '0' |
|||
<if test="plot != null and plot != ''"> |
|||
and pc.PLOT_NAME=#{plot} |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and pc.GRID_ID = #{gridId} |
|||
</if> |
|||
</where> |
|||
LIMIT 1 |
|||
</select> |
|||
<select id="getListByGridId" resultType="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateEntity"> |
|||
select id, |
|||
PLOT_NAME |
|||
from epidemic_plot_coordinate |
|||
where DEL_FLAG = '0' |
|||
and GRID_ID = #{gridId} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotCoordinateErrorDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotCoordinateErrorEntity" id="epidemicPlotCoordinateErrorMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="streetName" column="STREET_NAME"/> |
|||
<result property="streetId" column="STREET_ID"/> |
|||
<result property="mapPlotName" column="MAP_PLOT_NAME"/> |
|||
<result property="longitude" column="LONGITUDE"/> |
|||
<result property="latitude" column="LATITUDE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="communityName" column="COMMUNITY_NAME"/> |
|||
<result property="communityId" column="COMMUNITY_ID"/> |
|||
<result property="gridName" column="GRID_NAME"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="plotName" column="PLOT_NAME"/> |
|||
<result property="contactPerson" column="CONTACT_PERSON"/> |
|||
<result property="contactPhone" column="CONTACT_PHONE"/> |
|||
<result property="introduce" column="INTRODUCE"/> |
|||
<result property="errorInfo" column="ERROR_INFO"/> |
|||
</resultMap> |
|||
|
|||
<select id="getErrorInfoByNo" resultType="com.elink.esua.epdc.dto.personroom.EpidemicPlotCoordinateErrorDTO"> |
|||
select e.* from epidemic_plot_coordinate_error e |
|||
where e.INSERT_NO = #{no} |
|||
and e.DEL_FLAG = 0 |
|||
</select> |
|||
|
|||
<delete id="deleteErrorInfoByNo"> |
|||
delete from epidemic_plot_coordinate_error where INSERT_NO = #{no} |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicPlotGridDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicPlotGridEntity" id="epidemicPlotGridMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="plotId" column="PLOT_ID"/> |
|||
</resultMap> |
|||
|
|||
<delete id="deleteByPlotId"> |
|||
DELETE |
|||
FROM |
|||
epidemic_plot_grid |
|||
WHERE |
|||
PLOT_ID = #{plotId} |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.personroom.dao.EpidemicUnitOwnerDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.personroom.entity.EpidemicUnitOwnerEntity" id="epidemicUnitOwnerMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="unitId" column="UNIT_ID"/> |
|||
<result property="ownerName" column="OWNER_NAME"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="address" column="ADDRESS"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<delete id="deleteByUnitId"> |
|||
DELETE |
|||
FROM |
|||
epidemic_unit_owner |
|||
WHERE |
|||
UNIT_ID = #{unitId} |
|||
</delete> |
|||
</mapper> |
Loading…
Reference in new issue