75 changed files with 8017 additions and 346 deletions
@ -1 +1 @@ |
|||
Subproject commit a87f857cb65f7fc7a32937c714ae520c79f3a67c |
|||
Subproject commit 8c5f912270a32bf7cf695349c0681fb6198e2e5e |
|||
@ -1 +1 @@ |
|||
Subproject commit 235f56d5ea756317efe54c5e0d4be0ac45e09155 |
|||
Subproject commit 72b0a4547c75aa6788dcd05749994bc094a38010 |
|||
@ -1,56 +0,0 @@ |
|||
package com.elink.esua.epdc.config; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.*; |
|||
|
|||
/** |
|||
* 接收文件转化File |
|||
* Created by liuhongwei on 2019/6/21. |
|||
*/ |
|||
public class StreamUtils { |
|||
|
|||
|
|||
|
|||
public static File conversionFile(MultipartFile file){ |
|||
|
|||
File toFile =null; |
|||
InputStream ins = null; |
|||
try { |
|||
// 转化字节流
|
|||
ins = file.getInputStream(); |
|||
// 获取文件名字
|
|||
toFile = new File(file.getOriginalFilename()); |
|||
// 字节转化文件
|
|||
inputStreamToFile(ins, toFile); |
|||
ins.close(); |
|||
} catch (IOException e) { |
|||
new RenException(500,"文件转化失败"); |
|||
} |
|||
return toFile; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 流转化 |
|||
* @param ins file |
|||
* @return |
|||
* @author liuhongwei |
|||
* @date 2019/6/14 14:07 |
|||
*/ |
|||
public static void inputStreamToFile(InputStream ins, File file) { |
|||
try { |
|||
OutputStream os = new FileOutputStream(file); |
|||
int bytesRead = 0; |
|||
byte[] buffer = new byte[8192]; |
|||
while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) { |
|||
os.write(buffer, 0, bytesRead); |
|||
} |
|||
os.close(); |
|||
ins.close(); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,127 @@ |
|||
/** |
|||
* 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.epidemic.controller.v2; |
|||
|
|||
import com.elink.esua.epdc.commons.api.version.ApiVersion; |
|||
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|||
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.PersonTestingDTO; |
|||
import com.elink.esua.epdc.dto.PersonTestingPageDTO; |
|||
import com.elink.esua.epdc.modules.epidemic.dao.PersonTestingDao; |
|||
import com.elink.esua.epdc.modules.epidemic.excel.PersonTestingExcel; |
|||
import com.elink.esua.epdc.modules.epidemic.service.PersonTestingService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.text.ParseException; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 核酸检测记录 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-08-20 |
|||
*/ |
|||
@ApiVersion(2) |
|||
@RestController |
|||
@RequestMapping("persontesting" + Constant.VERSION_CONTROL) |
|||
public class PersonTestingV2Controller { |
|||
|
|||
@Autowired |
|||
private PersonTestingService personTestingService; |
|||
|
|||
@Autowired |
|||
private PersonTestingDao personTestingDao; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PersonTestingPageDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<PersonTestingPageDTO> page = personTestingService.page(params); |
|||
return new Result<PageData<PersonTestingPageDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PersonTestingDTO> get(@PathVariable("id") String id) { |
|||
PersonTestingDTO data = personTestingService.get(id); |
|||
return new Result<PersonTestingDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PersonTestingDTO dto) throws ParseException { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return personTestingService.saveScanningInfo(dto); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PersonTestingDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
personTestingService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
personTestingService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PersonTestingPageDTO> list = personTestingDao.getTestingPage(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PersonTestingExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @return Result |
|||
* @describe: 读卡器录入数据 |
|||
* @author rongchao |
|||
* @date 2021/8/26 |
|||
* @params dto |
|||
*/ |
|||
@PostMapping("saveScanningInfo") |
|||
public Result saveScanningInfo(@RequestBody PersonTestingDTO dto) { |
|||
return personTestingService.saveScanningInfoV2(dto); |
|||
} |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @describe: 通过身份证号码查询手机号 |
|||
* @author wangtong |
|||
* @date 2021/8/23 17:54 |
|||
* @params [dto] |
|||
*/ |
|||
@GetMapping("getMobileByIdCard") |
|||
public Result getMobileByIdCard(PersonTestingDTO dto) { |
|||
return personTestingService.getMobileByIdCard(dto); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,37 +0,0 @@ |
|||
package com.elink.esua.epdc.rocketmq.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* |
|||
* 组织机构信息修改-接收MQ消息DTO |
|||
* |
|||
* @Author:liuchuang |
|||
* @Date:2020/3/6 22:34 |
|||
*/ |
|||
@Data |
|||
public class OrganizationModifyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6534846437298229554L; |
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 旧部门名称 |
|||
*/ |
|||
private String oldDeptName; |
|||
|
|||
/** |
|||
* 新部门名称 |
|||
*/ |
|||
private String newDeptName; |
|||
|
|||
/** |
|||
* 部门类型 |
|||
*/ |
|||
private String typeKey; |
|||
} |
|||
@ -1 +1 @@ |
|||
Subproject commit db9213163f8005cba05ad21334bebb72484174b7 |
|||
Subproject commit 6c53fd985cbaae46046a44a2d84f1eb9bff86a9d |
|||
@ -0,0 +1,56 @@ |
|||
package com.elink.esua.epdc.vaccine.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; |
|||
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; |
|||
import com.elink.esua.epdc.vaccine.feign.fallback.VimAdminFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/5 14:44 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = VimAdminFeignClientFallback.class) |
|||
public interface VimAdminFeignClient { |
|||
|
|||
/** |
|||
* 根据部门ID,获取下属所有网格ID |
|||
* |
|||
* @param pid |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.Long>> |
|||
* @author yujintao |
|||
* @date 2019/9/5 14:49 |
|||
*/ |
|||
@GetMapping("/sys/dept/listGridId/{pid}") |
|||
Result<List<Long>> listGridIdByDeptPid(@PathVariable("pid") Long pid); |
|||
|
|||
/** |
|||
* 根据部门ID获取上级所有部门信息 |
|||
* |
|||
* @param deptId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<ParentAndAllDeptDTO> |
|||
* @author gp |
|||
* @date 2019-11-29 |
|||
*/ |
|||
@GetMapping("/sys/dept/getParentAndAllDept/{deptId}") |
|||
Result<ParentAndAllDeptDTO> getParentAndAllDept(@PathVariable("deptId") String deptId); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.SysPopulationSimpleDictDTO>> |
|||
* @Description 获取多个字典值列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/31 |
|||
* @Param [sysPopulationSimpleDictFormDTO] |
|||
**/ |
|||
@PostMapping("sys/dict/listPopulationSimple") |
|||
Result<List<SysPopulationSimpleDictDTO>> listPopulationSimple(@RequestBody SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO); |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
package com.elink.esua.epdc.vaccine.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; |
|||
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; |
|||
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/5 14:44 |
|||
*/ |
|||
@Component |
|||
public class VimAdminFeignClientFallback implements VimAdminFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<Long>> listGridIdByDeptPid(Long pid) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listGridIdByDeptPid", pid); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ParentAndAllDeptDTO> getParentAndAllDept(String depId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", depId); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<SysPopulationSimpleDictDTO>> listPopulationSimple(SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listPopulationSimple", sysPopulationSimpleDictFormDTO); |
|||
} |
|||
} |
|||
@ -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.vaccine.house.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.house.HouseBusinessInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.excel.HouseBusinessInfoExcel; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseBusinessInfoService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("housebusinessinfo") |
|||
public class HouseBusinessInfoController { |
|||
|
|||
@Autowired |
|||
private HouseBusinessInfoService houseBusinessInfoService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<HouseBusinessInfoDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<HouseBusinessInfoDTO> page = houseBusinessInfoService.listPage(params); |
|||
return new Result<PageData<HouseBusinessInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<HouseBusinessInfoDTO> get(@PathVariable("id") String id) { |
|||
HouseBusinessInfoDTO data = houseBusinessInfoService.get(id); |
|||
return new Result<HouseBusinessInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody HouseBusinessInfoDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
houseBusinessInfoService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody HouseBusinessInfoDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
houseBusinessInfoService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
houseBusinessInfoService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<HouseBusinessInfoDTO> list = houseBusinessInfoService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, "经营信息", list, HouseBusinessInfoExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -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.vaccine.house.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.house.HouseRentInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.excel.HouseRentInfoExcel; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseRentInfoService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("houserentinfo") |
|||
public class HouseRentInfoController { |
|||
|
|||
@Autowired |
|||
private HouseRentInfoService houseRentInfoService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<HouseRentInfoDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<HouseRentInfoDTO> page = houseRentInfoService.page(params); |
|||
return new Result<PageData<HouseRentInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<HouseRentInfoDTO> get(@PathVariable("id") String id){ |
|||
HouseRentInfoDTO data = houseRentInfoService.get(id); |
|||
return new Result<HouseRentInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody HouseRentInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
houseRentInfoService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody HouseRentInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
houseRentInfoService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
houseRentInfoService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<HouseRentInfoDTO> list = houseRentInfoService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, HouseRentInfoExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
/** |
|||
* 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.vaccine.house.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.house.HouseResidentDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.excel.HouseResidentExcel; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseResidentService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("houseresident") |
|||
public class HouseResidentController { |
|||
|
|||
@Autowired |
|||
private HouseResidentService houseResidentService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PopulationInformationDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<PopulationInformationDTO> page = houseResidentService.listPage(params); |
|||
return new Result<PageData<PopulationInformationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PopulationInformationDTO> get(@PathVariable("id") String id){ |
|||
PopulationInformationDTO data = houseResidentService.get(id); |
|||
return new Result<PopulationInformationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody HouseResidentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return houseResidentService.saveWithoutIdentifyNo(dto); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody HouseResidentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
return houseResidentService.updateWithoutIdentifyNo(dto); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
houseResidentService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<HouseResidentDTO> list = houseResidentService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, HouseResidentExcel.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,283 @@ |
|||
/** |
|||
* 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.vaccine.house.controller; |
|||
|
|||
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.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.constant.PopulationDictConstant; |
|||
import com.elink.esua.epdc.dto.house.*; |
|||
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; |
|||
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient; |
|||
import com.elink.esua.epdc.vaccine.house.excel.BasePopulationInformationExportExcel; |
|||
import com.elink.esua.epdc.vaccine.house.excel.BaseResidentInformationExportExcel; |
|||
import com.elink.esua.epdc.vaccine.house.service.HousingInformationService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
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.beans.IntrospectionException; |
|||
import java.beans.PropertyDescriptor; |
|||
import java.io.InputStream; |
|||
import java.io.OutputStream; |
|||
import java.lang.reflect.Field; |
|||
import java.lang.reflect.InvocationTargetException; |
|||
import java.lang.reflect.Method; |
|||
import java.net.URLEncoder; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("housinginformation") |
|||
public class HousingInformationController { |
|||
|
|||
@Autowired |
|||
private HousingInformationService housingInformationService; |
|||
|
|||
@Autowired |
|||
private VimAdminFeignClient adminFeignClient; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<HousingInformationDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<HousingInformationDTO> page = housingInformationService.listOfPage(params); |
|||
return new Result<PageData<HousingInformationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<HousingInformationDTO> get(@PathVariable("id") String id){ |
|||
HousingInformationDTO data = housingInformationService.get(id); |
|||
return new Result<HousingInformationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody HousingInformationDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return housingInformationService.save(dto); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody HousingInformationDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
return housingInformationService.update(dto); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
housingInformationService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
//查询房屋和人口信息
|
|||
List<BasePopulationInformationExportDto> basePopulationInformationExcelList = housingInformationService.selectBasePopulationInformationExcelList(params); |
|||
List<Class<?>> classes = new ArrayList<>(2); |
|||
classes.add(BasePopulationInformationExportExcel.class); |
|||
classes.add(BaseResidentInformationExportExcel.class); |
|||
List<String> sheetNames = new ArrayList<>(2); |
|||
sheetNames.add("房屋信息和户主信息"); |
|||
sheetNames.add("居民信息"); |
|||
if(basePopulationInformationExcelList == null || basePopulationInformationExcelList.size()==0){ |
|||
ExcelUtils.exportExcelToTargetWithSheets(response, "居民信息导出",sheetNames,classes,new ArrayList<>(), new ArrayList<>(),new ArrayList<>()); |
|||
} |
|||
//根据字典赋值
|
|||
//获取字典信息
|
|||
SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO = new SysPopulationSimpleDictFormDTO(); |
|||
List<String> dicTypes = new ArrayList<>(); |
|||
Collections.addAll(dicTypes, PopulationDictConstant.ACCOUNT_TYPE, PopulationDictConstant.BODY_STATUS, PopulationDictConstant.EDUCATION_LEVEL |
|||
, PopulationDictConstant.EMPLOYMENT_STATUS, PopulationDictConstant.FAMILY_CATEGORY, PopulationDictConstant.GENDER, PopulationDictConstant.HELP_STATUS, PopulationDictConstant.MARITAL_STATUS |
|||
, PopulationDictConstant.MOTOR_VEHICLE_CATEGORY, PopulationDictConstant.POLITICS_STATUS, PopulationDictConstant.UNEMPLOYMENT_REASON); |
|||
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|||
Result<List<SysPopulationSimpleDictDTO>> listResult = adminFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|||
if (listResult == null || !listResult.success()) { |
|||
throw new RenException("获取字典失败!"); |
|||
} |
|||
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|||
for (BasePopulationInformationExportDto basePopulationInformationExportDto : basePopulationInformationExcelList) { |
|||
if(StringUtils.isBlank(basePopulationInformationExportDto.getId())){ |
|||
continue; |
|||
} |
|||
String educationLevel = basePopulationInformationExportDto.getEducationLevel(); |
|||
String politicsStatus = basePopulationInformationExportDto.getPoliticsStatus(); |
|||
String bodyStatus = basePopulationInformationExportDto.getBodyStatus(); |
|||
String maritalStatus = basePopulationInformationExportDto.getMaritalStatus(); |
|||
String accountType = basePopulationInformationExportDto.getAccountType(); |
|||
String employmentStatus = basePopulationInformationExportDto.getEmploymentStatus(); |
|||
String unemploymentReason = basePopulationInformationExportDto.getUnemploymentReason(); |
|||
String familyCategory = basePopulationInformationExportDto.getFamilyCategory(); |
|||
String helpStatus = basePopulationInformationExportDto.getHelpStatus(); |
|||
String motorVehicleCategory = basePopulationInformationExportDto.getMotorVehicleCategory(); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"educationLevel",educationLevel,PopulationDictConstant.EDUCATION_LEVEL); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"politicsStatus",politicsStatus,PopulationDictConstant.POLITICS_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"bodyStatus",bodyStatus,PopulationDictConstant.BODY_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"maritalStatus",maritalStatus,PopulationDictConstant.MARITAL_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"accountType",accountType,PopulationDictConstant.ACCOUNT_TYPE); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"employmentStatus",employmentStatus,PopulationDictConstant.EMPLOYMENT_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"unemploymentReason",unemploymentReason,PopulationDictConstant.UNEMPLOYMENT_REASON); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"familyCategory",familyCategory,PopulationDictConstant.FAMILY_CATEGORY); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS,basePopulationInformationExportDto,"helpStatus",helpStatus,PopulationDictConstant.HELP_STATUS); |
|||
//处理多选类型
|
|||
if(StringUtils.isNotBlank(motorVehicleCategory)){ |
|||
String[] motorVehicleCategoryStrings = motorVehicleCategory.split(","); |
|||
String motorVehicleCategoryEnd = ""; |
|||
for(String motorVehicleCategoryStr : motorVehicleCategoryStrings){ |
|||
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|||
if (PopulationDictConstant.MOTOR_VEHICLE_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|||
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|||
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|||
if (motorVehicleCategoryStr.equals(sysSimpleDict.getDictValue())) { |
|||
motorVehicleCategoryEnd += sysSimpleDict.getDictName()+","; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
basePopulationInformationExportDto.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|||
} |
|||
} |
|||
//所有信息,转换excel时,替换是否时会出现null,此时将对应null值替换成空字符
|
|||
basePopulationInformationExcelList.forEach(HousingInformationController::checkNull); |
|||
//根据获取的户主ID查询居住人信息
|
|||
List<BasePopulationInformationExportDto> basePopulationInformationExcelListWithHouseHead = new ArrayList<>(basePopulationInformationExcelList); |
|||
//先去除没有户主的房屋
|
|||
basePopulationInformationExcelListWithHouseHead.removeIf(basePopulationInformationExportDto -> StringUtils.isBlank(basePopulationInformationExportDto.getId())); |
|||
Map<String,List<BasePopulationInformationExportDto>> baseMap = basePopulationInformationExcelListWithHouseHead.stream().collect(Collectors.groupingBy(BasePopulationInformationExportDto::getId)); |
|||
//获取所有的户主ID
|
|||
Set<String> houseHeadIds = baseMap.keySet(); |
|||
List<BaseResidentInformationExportDto> baseResidentInformationExportDtoList = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|||
ExcelUtils.exportExcelToTargetWithSheets(response, "居民信息导出",sheetNames,classes,new ArrayList<>(), ConvertUtils.sourceToTarget(basePopulationInformationExcelList, BasePopulationInformationExportExcel.class),ConvertUtils.sourceToTarget(baseResidentInformationExportDtoList,BaseResidentInformationExportExcel.class)); |
|||
} |
|||
/** |
|||
* @Description 根据字典值匹配键 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/8 |
|||
* @param column 实体类的属性名 |
|||
* @param columnValue 实体类的属性值 |
|||
* @param dicType 字典的类型 |
|||
* @Param [sysPopulationSimpleDictDTOS, basePopulationInformationExportDto, column] |
|||
* @return java.lang.String |
|||
**/ |
|||
private void setDicNameByValue(List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS,BasePopulationInformationExportDto basePopulationInformationExportDto,String column,String columnValue,String dicType) throws IntrospectionException, InvocationTargetException, IllegalAccessException { |
|||
if(StringUtils.isNotBlank(columnValue)){ |
|||
a:for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|||
if (dicType.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|||
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|||
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|||
if (columnValue.equals(sysSimpleDict.getDictValue())) { |
|||
Class basePopulationInformationExportDtoClass = basePopulationInformationExportDto.getClass(); |
|||
PropertyDescriptor pd = new PropertyDescriptor(column, basePopulationInformationExportDtoClass); |
|||
Method wM = pd.getWriteMethod();//获得写方法
|
|||
wM.invoke(basePopulationInformationExportDto, sysSimpleDict.getDictName()); |
|||
break a; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
private static Object checkNull(Object obj) { |
|||
Class<? extends Object> clazz = obj.getClass(); |
|||
// 获取实体类的所有属性,返回Field数组
|
|||
Field[] fields = clazz.getDeclaredFields(); |
|||
for (Field field : fields) { |
|||
// 可访问私有变量
|
|||
field.setAccessible(true); |
|||
// 获取属性类型
|
|||
String type = field.getGenericType().toString(); |
|||
// 如果type是类类型,则前面包含"class ",后面跟类名
|
|||
if ("class java.lang.String".equals(type)) { |
|||
// 将属性的首字母大写
|
|||
String methodName = field.getName().replaceFirst(field.getName().substring(0, 1), |
|||
field.getName().substring(0, 1).toUpperCase()); |
|||
System.out.println(methodName); |
|||
try { |
|||
Method methodGet = clazz.getMethod("get" + methodName); |
|||
// 调用getter方法获取属性值
|
|||
String str = (String) methodGet.invoke(obj); |
|||
if (StringUtils.isBlank(str)) { |
|||
// 如果为null的String类型的属性则重新复制为空字符串
|
|||
field.set(obj, field.getType().getConstructor(field.getType()).newInstance("")); |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
return obj; |
|||
} |
|||
|
|||
/** |
|||
* @Description 批量导入 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/31 |
|||
* @Param [file] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@PostMapping("importExcel") |
|||
public Result importExcel(@RequestParam("file") MultipartFile file,String gridId) { |
|||
return housingInformationService.importPopulationInfo(file,gridId); |
|||
} |
|||
|
|||
/** |
|||
* @Description 导出模板 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/27 |
|||
* @Param [params, response] |
|||
* @return void |
|||
**/ |
|||
@GetMapping("exportModule") |
|||
public void exportModule(HttpServletResponse res) throws Exception{ |
|||
//获取要下载的模板名称
|
|||
String fileName = "居民信息录入模板"; |
|||
//设置要下载的文件的名称
|
|||
res.setCharacterEncoding("UTF-8"); |
|||
res.setHeader("content-Type", "application/vnd.ms-excel"); |
|||
res.setHeader("Content-Disposition", |
|||
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xls"); |
|||
//获取文件的路径
|
|||
InputStream input = this.getClass().getResourceAsStream("/excel/居民信息录入模板.xls"); |
|||
OutputStream out = res.getOutputStream(); |
|||
byte[] b = new byte[2048]; |
|||
int len; |
|||
while ((len = input.read(b)) != -1) { |
|||
out.write(b, 0, len); |
|||
} |
|||
input.close(); |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,241 @@ |
|||
/** |
|||
* 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.vaccine.house.controller; |
|||
|
|||
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.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; |
|||
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.constant.PopulationDictConstant; |
|||
import com.elink.esua.epdc.dto.house.PopulationInfoOverviewDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.dto.house.SysPopulationSimpleDictDTO; |
|||
import com.elink.esua.epdc.dto.house.SysSimpleDictDTO; |
|||
import com.elink.esua.epdc.dto.house.form.SysPopulationSimpleDictFormDTO; |
|||
import com.elink.esua.epdc.dto.house.result.EpdcScreenResidentInfoByCurrentAddressResultDTO; |
|||
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient; |
|||
import com.elink.esua.epdc.vaccine.house.excel.EpdcScreenResidentInfoByCurrentAddressExcel; |
|||
import com.elink.esua.epdc.vaccine.house.excel.FamilyInformationExcel; |
|||
import com.elink.esua.epdc.vaccine.house.excel.PopulationInformationExcel; |
|||
import com.elink.esua.epdc.vaccine.house.excel.PopulationMotorVehicleExcel; |
|||
import com.elink.esua.epdc.vaccine.house.service.PopulationInformationService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.*; |
|||
|
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("populationinformation") |
|||
public class PopulationInformationController { |
|||
|
|||
@Autowired |
|||
private PopulationInformationService populationInformationService; |
|||
|
|||
|
|||
@Autowired |
|||
private VimAdminFeignClient adminFeignClient; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<PopulationInformationDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<PopulationInformationDTO> page = populationInformationService.listPage(params); |
|||
return new Result<PageData<PopulationInformationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<PopulationInformationDTO> get(@PathVariable("id") String id) { |
|||
PopulationInformationDTO populationInformationDTOS = populationInformationService.get(id); |
|||
return new Result<PopulationInformationDTO>().ok(populationInformationDTOS); |
|||
} |
|||
|
|||
@GetMapping("getHouseHeadInfo") |
|||
public Result<PopulationInformationDTO> getHouseHeadInfo(String id) { |
|||
PopulationInformationDTO data = populationInformationService.getHouseHeadInfo(id); |
|||
return new Result<PopulationInformationDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody PopulationInformationDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
return populationInformationService.save(dto); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody PopulationInformationDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
return populationInformationService.update(dto); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
populationInformationService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PopulationInformationDTO> list = populationInformationService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, PopulationInformationExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @Description 判断身份证是否合法 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/24 |
|||
* @Param [isIdentifyNo] |
|||
**/ |
|||
@GetMapping("isIdentifyNoLegal/{isIdentifyNo}") |
|||
public Result isIdentifyNoLegal(@PathVariable("isIdentifyNo") String isIdentifyNo) { |
|||
String result = IdentityNoUtils.IdentityNoVerification(isIdentifyNo); |
|||
if (result != null) { |
|||
return new Result().error(result); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.PopulationInformationDTO>> |
|||
* @Description 获取机动车信息列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
**/ |
|||
@GetMapping("motorVehicle/page") |
|||
public Result<PageData<PopulationInformationDTO>> motorVehiclePage(@RequestParam Map<String, Object> params) { |
|||
PageData<PopulationInformationDTO> page = populationInformationService.motorVehiclePage(params); |
|||
return new Result<PageData<PopulationInformationDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @return void |
|||
* @Description 机动车信息列表导出 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params, response] |
|||
**/ |
|||
@GetMapping("motorVehicle/export") |
|||
public void motorVehicleExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PopulationInformationDTO> list = populationInformationService.motorVehicleList(params); |
|||
//处理机动车类型
|
|||
//获取字典信息
|
|||
SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO = new SysPopulationSimpleDictFormDTO(); |
|||
List<String> dicTypes = new ArrayList<>(); |
|||
Collections.addAll(dicTypes, PopulationDictConstant.MOTOR_VEHICLE_CATEGORY); |
|||
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|||
Result<List<SysPopulationSimpleDictDTO>> listResult = adminFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|||
if (listResult == null || !listResult.success()) { |
|||
throw new RenException("获取字典失败!"); |
|||
} |
|||
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|||
for (PopulationInformationDTO populationInformationDTO : list) { |
|||
String[] motorVehicleCategoryStrings = populationInformationDTO.getMotorVehicleCategory().split(","); |
|||
String motorVehicleCategoryEnd = ""; |
|||
a: |
|||
for (String motorVehicleCategoryStr : Arrays.asList(motorVehicleCategoryStrings)) { |
|||
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|||
if (PopulationDictConstant.MOTOR_VEHICLE_CATEGORY.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|||
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|||
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|||
if (motorVehicleCategoryStr.equals(sysSimpleDict.getDictValue())) { |
|||
motorVehicleCategoryEnd += sysSimpleDict.getDictName() + ","; |
|||
continue a; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
populationInformationDTO.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0, motorVehicleCategoryEnd.lastIndexOf(","))); |
|||
} |
|||
|
|||
|
|||
ExcelUtils.exportExcelToTarget(response, "机动车信息", list, PopulationMotorVehicleExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @return void |
|||
* @Description 家庭信息导出 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/28 |
|||
* @Param [params, response] |
|||
**/ |
|||
@GetMapping("getFamily/export") |
|||
public void getFamilyExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<PopulationInformationDTO> list = populationInformationService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, "家庭信息", list, FamilyInformationExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO |
|||
* @Description 获取居民信息采集总览数据 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/27 |
|||
* @Param [] |
|||
**/ |
|||
@GetMapping("getPopulationInfoOverview") |
|||
public PopulationInfoOverviewDTO getPopulationInfoOverview() { |
|||
return populationInformationService.getPopulationInfoOverview(); |
|||
} |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData < com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>> |
|||
* @Description 以城找人 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
@GetMapping("selectPeopleByCurrentAddress") |
|||
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestParam Map<String, Object> params) { |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressForPc(params); |
|||
Integer total = populationInformationService.selectCountPeopleByCurrentAddressForPc(params); |
|||
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> page = new PageData<>(pointDeptStatisticsResultDTOS, total); |
|||
return new Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @return void |
|||
* @Description 以城找人 - 导出 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/28 |
|||
* @Param [params, response] |
|||
**/ |
|||
@GetMapping("selectPeopleByCurrentAddress/export") |
|||
public void selectPeopleByCurrentAddressExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressExportList(params); |
|||
ExcelUtils.exportExcelToTarget(response, "居民信息", pointDeptStatisticsResultDTOS, EpdcScreenResidentInfoByCurrentAddressExcel.class); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
/** |
|||
* 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.vaccine.house.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.house.HouseBusinessInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseBusinessInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface HouseBusinessInfoDao extends BaseDao<HouseBusinessInfoEntity> { |
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.HouseBusinessInfoDTO> |
|||
* @Description 前端列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
**/ |
|||
List<HouseBusinessInfoDTO> selectHouseBusinessInfoDTO(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* 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.vaccine.house.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseRentInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface HouseRentInfoDao extends BaseDao<HouseRentInfoEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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.vaccine.house.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface HouseResidentDao extends BaseDao<HouseResidentEntity> { |
|||
/** |
|||
* @Description 根据户主ID查询居住人信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
**/ |
|||
List<PopulationInformationDTO> selectListOfPopulationInformationDTO(Map<String, Object> params); |
|||
/** |
|||
* @Description 根据联系表ID查询居住人详细信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.dto.PopulationInformationDTO |
|||
**/ |
|||
PopulationInformationDTO selectByHouseResidentId(@Param("id") String id); |
|||
/** |
|||
* @Description 根据居民ID获取关联关系表ID |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.entity.HouseResidentEntity |
|||
**/ |
|||
HouseResidentEntity getHouseResidentInfoByResidentId(@Param("residentId") String residentId); |
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
/** |
|||
* 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.vaccine.house.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.house.BasePopulationInformationExportDto; |
|||
import com.elink.esua.epdc.dto.house.BaseResidentInformationExportDto; |
|||
import com.elink.esua.epdc.dto.house.HousingInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HousingInformationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface HousingInformationDao extends BaseDao<HousingInformationEntity> { |
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.HousingInformationDTO> |
|||
* @Description 前端分页查询 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/19 |
|||
* @Param [params] |
|||
**/ |
|||
List<HousingInformationDTO> selectListOfHousingInformationDTO(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.dto.HousingInformationDTO |
|||
* @Description 根据ID和房屋使用方式查询详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/19 |
|||
* @Param [params] |
|||
**/ |
|||
HousingInformationDTO selectByIdAndUsed(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.excel.BasePopulationInformationExcel> |
|||
* @Description 查询导出的 房屋信息和户主信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/1 |
|||
* @Param [params] |
|||
**/ |
|||
List<BasePopulationInformationExportDto> selectBasePopulationInformationExcelList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.BaseResidentInformationExportDto> |
|||
* @Description 根据户主ID列表获取居住人信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/1 |
|||
* @Param [houseHeadIds] |
|||
**/ |
|||
List<BaseResidentInformationExportDto> selectBaseResidentInformationExcelList(@Param("houseHeadIds") Set<String> houseHeadIds); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.HousingInformationDTO> |
|||
* @Description 根据户主ID获取所有房子信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [houseHeadId] |
|||
**/ |
|||
List<HousingInformationDTO> getHouseInfoByHouseHeadID(String houseHeadId); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.VolunteerInfoDTO> |
|||
* @Description 查询需要修改的组织机构信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/24 |
|||
* @Param [toString] |
|||
**/ |
|||
List<HousingInformationDTO> selectListOfOrganizationInfo(String deptId); |
|||
} |
|||
@ -0,0 +1,247 @@ |
|||
/** |
|||
* 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.vaccine.house.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.house.PopulationInfoOverviewDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.dto.house.form.*; |
|||
import com.elink.esua.epdc.dto.house.result.*; |
|||
import com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicUserInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Mapper |
|||
public interface PopulationInformationDao extends BaseDao<PopulationInformationEntity> { |
|||
/** |
|||
* @return com.elink.esua.epdc.dto.PopulationInformationDTO |
|||
* @Description 根据身份证信息获取人口信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [residentsIdentityNo] |
|||
**/ |
|||
PopulationInformationEntity getInfoByIdentityNo(@Param("residentsIdentityNo") String residentsIdentityNo); |
|||
|
|||
/** |
|||
* @return List<EpidemicUserInfoDTO> |
|||
* @describe: 根据居民多个身份证信息获取相关人口信息 |
|||
* @author rongchao |
|||
* @date 2021/8/27 |
|||
* @params residentsIdentityNos |
|||
*/ |
|||
List<EpidemicUserInfoDTO> selectListByIdentityNos(@Param("residentsIdentityNos") List<String> residentsIdentityNos); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.dto.PopulationInformationDTO |
|||
* @Description 取房屋户主信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/24 |
|||
* @Param [houseId] |
|||
**/ |
|||
PopulationInformationDTO getHouseHeadInfo(String houseId); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
* @Description 人口信息列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/25 |
|||
* @Param [params] |
|||
**/ |
|||
List<PopulationInformationDTO> selectListOfPopulationInformationDTO(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
* @Description 人口信息详细列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/25 |
|||
* @Param [params] |
|||
**/ |
|||
PopulationInformationDTO selectDetailOfPopulationInformationDTO(@Param("id") String id); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
* @Description 获取机动车列表信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
**/ |
|||
List<PopulationInformationDTO> motorVehiclePage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO |
|||
* @Description 获取居民信息采集总览数据 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/27 |
|||
* @Param [] |
|||
**/ |
|||
PopulationInfoOverviewDTO getPopulationInfoOverview(); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO |
|||
* @Description 获取居民信息采集总览数据 - 大屏 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/27 |
|||
* @Param [] |
|||
**/ |
|||
PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(@Param("communityId") String communityId); |
|||
|
|||
/** |
|||
* @return void |
|||
* @Description 清空入党时间 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/4 |
|||
* @Param [id] |
|||
**/ |
|||
void setJionTimeToNull(@Param("id") String id); |
|||
|
|||
/** |
|||
* @return void |
|||
* @Description 清空失业登记时间 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/4 |
|||
* @Param [id] |
|||
**/ |
|||
void setUnemploymentRegisterTimeToNull(@Param("id") String id); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO> |
|||
* @Description 大屏找人接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [dto] |
|||
**/ |
|||
List<EpdcScreenSelectPeopleResultDTO> selectListPeople(EpdcScreenSelectPeopleFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO> |
|||
* @Description 大屏找人接口 - count |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [dto] |
|||
**/ |
|||
Integer selectCountListPeople(EpdcScreenSelectPeopleFormDTO dto); |
|||
|
|||
/** |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO> |
|||
* @Description 房屋用途数据接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/15 |
|||
* @Param [] |
|||
**/ |
|||
EpdcScreenHouseUseResultDTO selectHouseUseDataForScreen(); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO> |
|||
* @Description 网格排名 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/15 |
|||
* @Param [dto] |
|||
**/ |
|||
List<EpdcScreenGridRankingResultDTO> selectListGridRanking(EpdcScreenGridRankingFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO> |
|||
* @Description 网格排名 count |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/15 |
|||
* @Param [dto] |
|||
**/ |
|||
Integer selectCountListGridRanking(EpdcScreenGridRankingFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO> |
|||
* @Description 一人找房接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
List<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseInfoByPeopleResultDTO> |
|||
* @Description 一人找房接口 - count |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
Integer selectCountHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO> |
|||
* @Description 以房找人 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
List<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO> |
|||
* @Description 以房找人 - count |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
Integer selectCountPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO> |
|||
* @Description 以城找人 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.lang.Integer |
|||
* @Description 以城找人 - count |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
**/ |
|||
Integer selectCountPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto); |
|||
|
|||
/** |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO> |
|||
* @Description 以城找人 - 导出 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/5 |
|||
* @Param [params] |
|||
**/ |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @return void |
|||
* @describe: |
|||
* @author rongchao |
|||
* @date 2021/8/28 |
|||
* @params entity |
|||
*/ |
|||
void updatePersonInfo(PopulationInformationEntity entity); |
|||
} |
|||
@ -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.vaccine.house.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_house_business_info") |
|||
public class HouseBusinessInfoEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 社会统一代码 |
|||
*/ |
|||
private String socialUniformCode; |
|||
|
|||
/** |
|||
* 法人代表 |
|||
*/ |
|||
private String legalRepresentative; |
|||
|
|||
/** |
|||
* 电话 |
|||
*/ |
|||
private String enterprisePhone; |
|||
|
|||
/** |
|||
* 房屋ID |
|||
*/ |
|||
private String houseId; |
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
/** |
|||
* 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.vaccine.house.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_house_rent_info") |
|||
public class HouseRentInfoEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 承租人姓名 |
|||
*/ |
|||
private String tenantName; |
|||
|
|||
/** |
|||
* 承租人电话 |
|||
*/ |
|||
private String tenantPhone; |
|||
|
|||
/** |
|||
* 承租人身份证号 |
|||
*/ |
|||
private String tenantIdentityNo; |
|||
|
|||
/** |
|||
* 房屋ID |
|||
*/ |
|||
private String houseId; |
|||
|
|||
} |
|||
@ -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.vaccine.house.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_house_resident") |
|||
public class HouseResidentEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 房屋ID |
|||
*/ |
|||
private String houseId; |
|||
/** |
|||
* 户主ID |
|||
*/ |
|||
private String houseHeadId; |
|||
|
|||
/** |
|||
* 居民ID |
|||
*/ |
|||
private String residentId; |
|||
|
|||
/** |
|||
* 与户主关系 (0:子女 1:夫妻 2:其他) |
|||
*/ |
|||
private String houseHeadRelation; |
|||
|
|||
/** |
|||
* 是否为户主 (0:否 1:是) |
|||
*/ |
|||
private String isHouseHead; |
|||
|
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.vaccine.house.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_housing_information") |
|||
public class HousingInformationEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 房屋地址 |
|||
*/ |
|||
private String houseAddress; |
|||
|
|||
/** |
|||
* 购房时间 |
|||
*/ |
|||
private String buyingTime; |
|||
|
|||
/** |
|||
* 房屋面积 |
|||
*/ |
|||
private BigDecimal houseArea; |
|||
|
|||
/** |
|||
* 产权人 |
|||
*/ |
|||
private String propertyOwner; |
|||
|
|||
/** |
|||
* 产权人身份证号 |
|||
*/ |
|||
private String propertyOwnerIdentityNo; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String propertyOwnerMobile; |
|||
/** |
|||
* 产权证 |
|||
*/ |
|||
private String propertyOwnerCard; |
|||
|
|||
/** |
|||
* 房屋用途 (0:自住 1:租赁 2:经营) |
|||
*/ |
|||
private String houseUse; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
} |
|||
@ -0,0 +1,220 @@ |
|||
/** |
|||
* 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.vaccine.house.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("epdc_population_information") |
|||
public class PopulationInformationEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String residentsName; |
|||
|
|||
/** |
|||
* 性别 (0:女 1:男) |
|||
*/ |
|||
private String residentsSex; |
|||
|
|||
/** |
|||
* 民族 |
|||
*/ |
|||
private String residentsNation; |
|||
|
|||
/** |
|||
* 出生年/月 |
|||
*/ |
|||
private Date residentsBirthday; |
|||
|
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String educationLevel; |
|||
|
|||
/** |
|||
* 政治面貌 (0:群众 1:党员) |
|||
*/ |
|||
private String politicsStatus; |
|||
|
|||
/** |
|||
* 入党时间 |
|||
*/ |
|||
private String joinTime; |
|||
|
|||
/** |
|||
* 组织关系所在地 |
|||
*/ |
|||
private String organizationalRelationshipLocation; |
|||
|
|||
/** |
|||
* 身份证号码 |
|||
*/ |
|||
private String residentsIdentityNo; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String residentsPhone; |
|||
|
|||
/** |
|||
* 身体状况 (0:病残 1:健康) |
|||
*/ |
|||
private String bodyStatus; |
|||
|
|||
/** |
|||
* 婚姻状况 (0:未婚 1:已婚) |
|||
*/ |
|||
private String maritalStatus; |
|||
|
|||
/** |
|||
* 户口类型 (0:城镇 1:农业) |
|||
*/ |
|||
private String accountType; |
|||
|
|||
/** |
|||
* 服兵役 (0:否 1:是) |
|||
*/ |
|||
private String militaryService; |
|||
|
|||
/** |
|||
* 户籍地 |
|||
*/ |
|||
private String householdRegistrationPlace; |
|||
|
|||
/** |
|||
* 就业情况 (0:在岗 1:就业) |
|||
*/ |
|||
private String employmentStatus; |
|||
|
|||
/** |
|||
* 现工作单位 |
|||
*/ |
|||
private String currentEmployer; |
|||
|
|||
/** |
|||
* 现单位地址 |
|||
*/ |
|||
private String currentEmployerAddress; |
|||
|
|||
/** |
|||
* 失业原因 (0:原单位破产 1:解除合同 2:效益不好 3:减员 4:其他) |
|||
*/ |
|||
private String unemploymentReason; |
|||
|
|||
/** |
|||
* 再就业优惠证 (0:无 1:有) |
|||
*/ |
|||
private String reemploymentPermit; |
|||
|
|||
/** |
|||
* 失业登记 (0:否 1:是) |
|||
*/ |
|||
private String unemploymentRegister; |
|||
|
|||
/** |
|||
* 失业登记时间 |
|||
*/ |
|||
private String unemploymentRegisterTime; |
|||
|
|||
/** |
|||
* 家庭类别 (0:普通家庭 1:五好家庭 2:军烈家庭 3:优抚家庭 4:单亲家庭 5:空巢老人 6:困难家庭) |
|||
*/ |
|||
private String familyCategory; |
|||
|
|||
/** |
|||
* 救助情况 (0:低保 1:大病 2:廉租 3:教育 4:临时 5:其他) |
|||
*/ |
|||
private String helpStatus; |
|||
|
|||
/** |
|||
* 机动车数量 |
|||
*/ |
|||
private Integer motorVehicleNum; |
|||
|
|||
/** |
|||
* 机动车类型 (0:轿车 1:摩托 2:其他) |
|||
*/ |
|||
private String motorVehicleCategory; |
|||
|
|||
/** |
|||
* 宠物犬状况 (0:无 1:有) |
|||
*/ |
|||
private String dogStatus; |
|||
|
|||
/** |
|||
* 家庭成员数 |
|||
*/ |
|||
private Integer familyMemberNum; |
|||
|
|||
/** |
|||
* 家庭外出成员数 |
|||
*/ |
|||
private Integer familyMemberOutNum; |
|||
|
|||
/** |
|||
* 外出原因 (0:务工 1:上学 2:探亲 3:其他) |
|||
*/ |
|||
private String familyMemberOutReason; |
|||
|
|||
/** |
|||
* 在外月数 |
|||
*/ |
|||
private Integer familyMemberOutMonth; |
|||
|
|||
/** |
|||
* 现居住地址- 保存居住人使用 |
|||
*/ |
|||
private String currentAddress; |
|||
|
|||
/** |
|||
* 核酸检测状态:0已检测 1未检测 |
|||
*/ |
|||
private String checkState; |
|||
|
|||
/** |
|||
* 核酸检测时间 |
|||
*/ |
|||
private Date checkDate; |
|||
|
|||
/** |
|||
* 接种次数 |
|||
*/ |
|||
private Integer vaccinationNum; |
|||
|
|||
/** |
|||
* 接种状态 0未接种 1接种中 2接种完成 |
|||
*/ |
|||
private Integer vaccinationState; |
|||
|
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class BasePopulationInformationExcel { |
|||
|
|||
@Excel(name = "房屋地址") |
|||
private String houseAddress; |
|||
|
|||
@Excel(name = "购房时间") |
|||
private String buyingTime; |
|||
|
|||
@Excel(name = "房屋面积") |
|||
private BigDecimal houseArea; |
|||
|
|||
@Excel(name = "产权人姓名") |
|||
private String propertyOwner; |
|||
|
|||
@Excel(name = "产权人身份证号",width = 20) |
|||
private String propertyOwnerIdentityNo; |
|||
|
|||
@Excel(name = "产权人联系电话",width = 20) |
|||
private String propertyOwnerMobile; |
|||
|
|||
@Excel(name = "房屋用途",replace = {"自住_0","租赁_1","经营_2"}) |
|||
private String houseUse; |
|||
|
|||
@Excel(name = "承租人姓名") |
|||
private String tenantName; |
|||
|
|||
@Excel(name = "承租人电话",width = 20) |
|||
private String tenantPhone; |
|||
|
|||
@Excel(name = "承租人身份证号",width = 20) |
|||
private String tenantIdentityNo; |
|||
|
|||
@Excel(name = "企业名称",width = 20) |
|||
private String enterpriseName; |
|||
|
|||
@Excel(name = "社会统一代码",width = 20) |
|||
private String socialUniformCode; |
|||
|
|||
@Excel(name = "法人代表") |
|||
private String legalRepresentative; |
|||
|
|||
@Excel(name = "电话",width = 20) |
|||
private String enterprisePhone; |
|||
|
|||
@Excel(name = "户主姓名") |
|||
private String residentsName; |
|||
|
|||
private String residentsSex; |
|||
|
|||
private Date residentsBirthday; |
|||
|
|||
@Excel(name = "民族") |
|||
private String residentsNation; |
|||
|
|||
@Excel(name = "文化程度") |
|||
private String educationLevel; |
|||
|
|||
@Excel(name = "政治面貌") |
|||
private String politicsStatus; |
|||
|
|||
@Excel(name = "入党时间") |
|||
private String joinTime; |
|||
|
|||
@Excel(name = "组织关系所在地",width = 20) |
|||
private String organizationalRelationshipLocation; |
|||
|
|||
@Excel(name = "身份证号码",width = 20) |
|||
private String residentsIdentityNo; |
|||
|
|||
@Excel(name = "户主联系电话",width = 20) |
|||
private String residentsPhone; |
|||
|
|||
@Excel(name = "身体状况") |
|||
private String bodyStatus; |
|||
|
|||
@Excel(name = "婚姻状况") |
|||
private String maritalStatus; |
|||
|
|||
@Excel(name = "户口类型") |
|||
private String accountType; |
|||
|
|||
@Excel(name = "服兵役",replace = {"否_0","是_1"}) |
|||
private String militaryService; |
|||
|
|||
@Excel(name = "户籍地",width = 20) |
|||
private String householdRegistrationPlace; |
|||
|
|||
@Excel(name = "就业情况") |
|||
private String employmentStatus; |
|||
|
|||
@Excel(name = "现工作单位") |
|||
private String currentEmployer; |
|||
|
|||
@Excel(name = "现单位地址",width = 20) |
|||
private String currentEmployerAddress; |
|||
|
|||
@Excel(name = "失业原因",width = 20) |
|||
private String unemploymentReason; |
|||
|
|||
@Excel(name = "再就业优惠证",replace = {"无_0","有_1"}) |
|||
private String reemploymentPermit; |
|||
|
|||
@Excel(name = "失业登记",replace = {"否_0","是_1"}) |
|||
private String unemploymentRegister; |
|||
|
|||
@Excel(name = "失业登记时间") |
|||
private String unemploymentRegisterTime; |
|||
|
|||
@Excel(name = "家庭类别") |
|||
private String familyCategory; |
|||
|
|||
@Excel(name = "救助情况") |
|||
private String helpStatus; |
|||
|
|||
@Excel(name = "机动车数量") |
|||
private Integer motorVehicleNum; |
|||
|
|||
@Excel(name = "机动车类型") |
|||
private String motorVehicleCategory; |
|||
|
|||
@Excel(name = "宠物犬状况",replace = {"无_0","有_1"}) |
|||
private String dogStatus; |
|||
|
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class BasePopulationInformationExportExcel { |
|||
|
|||
@Excel(name = "所属网格") |
|||
private String gridName; |
|||
|
|||
@Excel(name = "房屋地址") |
|||
private String houseAddress; |
|||
|
|||
@Excel(name = "购房时间") |
|||
private String buyingTime; |
|||
|
|||
@Excel(name = "房屋面积") |
|||
private BigDecimal houseArea; |
|||
|
|||
@Excel(name = "产权人姓名") |
|||
private String propertyOwner; |
|||
|
|||
@Excel(name = "产权人身份证号") |
|||
private String propertyOwnerIdentityNo; |
|||
|
|||
@Excel(name = "产权证") |
|||
private String propertyOwnerCard; |
|||
|
|||
@Excel(name = "产权人联系电话") |
|||
private String propertyOwnerMobile; |
|||
|
|||
@Excel(name = "房屋用途",replace = {"自住_0","租赁_1","经营_2"}) |
|||
private String houseUse; |
|||
|
|||
@Excel(name = "承租人姓名") |
|||
private String tenantName; |
|||
|
|||
@Excel(name = "承租人电话") |
|||
private String tenantPhone; |
|||
|
|||
@Excel(name = "承租人身份证号") |
|||
private String tenantIdentityNo; |
|||
|
|||
@Excel(name = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
@Excel(name = "社会统一代码") |
|||
private String socialUniformCode; |
|||
|
|||
@Excel(name = "法人代表") |
|||
private String legalRepresentative; |
|||
|
|||
@Excel(name = "电话") |
|||
private String enterprisePhone; |
|||
|
|||
@Excel(name = "户主姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "性别",replace = {"女_0","男_1"}) |
|||
private String residentsSex; |
|||
|
|||
@Excel(name = "出生年月") |
|||
private String residentsBirthday; |
|||
|
|||
@Excel(name = "民族") |
|||
private String residentsNation; |
|||
|
|||
@Excel(name = "文化程度") |
|||
private String educationLevel; |
|||
|
|||
@Excel(name = "政治面貌") |
|||
private String politicsStatus; |
|||
|
|||
@Excel(name = "入党时间") |
|||
private String joinTime; |
|||
|
|||
@Excel(name = "组织关系所在地") |
|||
private String organizationalRelationshipLocation; |
|||
|
|||
@Excel(name = "身份证号码") |
|||
private String residentsIdentityNo; |
|||
|
|||
@Excel(name = "户主联系电话") |
|||
private String residentsPhone; |
|||
|
|||
@Excel(name = "身体状况") |
|||
private String bodyStatus; |
|||
|
|||
@Excel(name = "婚姻状况") |
|||
private String maritalStatus; |
|||
|
|||
@Excel(name = "户口类型") |
|||
private String accountType; |
|||
|
|||
@Excel(name = "服兵役",replace = {"否_0","是_1"}) |
|||
private String militaryService; |
|||
|
|||
@Excel(name = "户籍地") |
|||
private String householdRegistrationPlace; |
|||
|
|||
@Excel(name = "就业情况") |
|||
private String employmentStatus; |
|||
|
|||
@Excel(name = "现工作单位") |
|||
private String currentEmployer; |
|||
|
|||
@Excel(name = "现单位地址") |
|||
private String currentEmployerAddress; |
|||
|
|||
@Excel(name = "失业原因") |
|||
private String unemploymentReason; |
|||
|
|||
@Excel(name = "再就业优惠证",replace = {"无_0","有_1"}) |
|||
private String reemploymentPermit; |
|||
|
|||
@Excel(name = "失业登记",replace = {"否_0","是_1"}) |
|||
private String unemploymentRegister; |
|||
|
|||
@Excel(name = "失业登记时间") |
|||
private String unemploymentRegisterTime; |
|||
|
|||
@Excel(name = "家庭类别") |
|||
private String familyCategory; |
|||
|
|||
@Excel(name = "救助情况") |
|||
private String helpStatus; |
|||
|
|||
@Excel(name = "机动车数量") |
|||
private Integer motorVehicleNum; |
|||
|
|||
@Excel(name = "机动车类型") |
|||
private String motorVehicleCategory; |
|||
|
|||
@Excel(name = "宠物犬状况",replace = {"无_0","有_1"}) |
|||
private String dogStatus; |
|||
|
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class BaseResidentInformationExcel { |
|||
|
|||
@Excel(name = "户主身份证号码") |
|||
private String residentsIdentityNo; |
|||
|
|||
@Excel(name = "与户主关系",replace = {"子女_0","夫妻_1","父母_2","其他_3"}) |
|||
private String houseHeadRelation; |
|||
|
|||
@Excel(name = "居住人姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "性别",replace = {"女_0","男_1"}) |
|||
private String residentsSex; |
|||
|
|||
@Excel(name = "民族") |
|||
private String residentsNation; |
|||
|
|||
@Excel(name = "现工作单位或学校") |
|||
private String currentEmployer; |
|||
|
|||
@Excel(name = "现居住地") |
|||
private String currentAddress; |
|||
|
|||
} |
|||
@ -0,0 +1,56 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class BaseResidentInformationExportExcel { |
|||
|
|||
@Excel(name = "户主身份证号码") |
|||
private String residentsIdentityNo; |
|||
|
|||
@Excel(name = "户主姓名") |
|||
private String houseHeadName; |
|||
|
|||
@Excel(name = "与户主关系",replace = {"子女_0","夫妻_1","父母_2","其他_3"}) |
|||
private String houseHeadRelation; |
|||
|
|||
@Excel(name = "居住人姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "性别",replace = {"女_0","男_1"}) |
|||
private String residentsSex; |
|||
|
|||
@Excel(name = "民族") |
|||
private String residentsNation; |
|||
|
|||
@Excel(name = "现工作单位或学校") |
|||
private String currentEmployer; |
|||
|
|||
@Excel(name = "现居住地") |
|||
private String currentAddress; |
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.elink.esua.epdc.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author songyunpeng |
|||
* @Description 大屏以人找人结果 |
|||
* @create 2020-09-14 |
|||
*/ |
|||
@Data |
|||
public class EpdcScreenResidentInfoByCurrentAddressExcel { |
|||
|
|||
/** |
|||
* 居住人姓名 |
|||
*/ |
|||
@Excel(name = "姓名") |
|||
private String residentName; |
|||
|
|||
/** |
|||
* 当前居住地址 |
|||
*/ |
|||
@Excel(name = "现居住地") |
|||
private String currentAddress; |
|||
/** |
|||
* 户主姓名 |
|||
*/ |
|||
@Excel(name = "户主姓名") |
|||
private String houseHeadName; |
|||
/** |
|||
* 户主电话 |
|||
*/ |
|||
@Excel(name = "户主电话") |
|||
private String houseHeadPhone; |
|||
/** |
|||
* 户主居住地址 |
|||
*/ |
|||
@Excel(name = "户主居住地址") |
|||
private String houseHeadAddress; |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class FamilyInformationExcel { |
|||
|
|||
@Excel(name = "辖区范围") |
|||
private String gridNames; |
|||
|
|||
@Excel(name = "户主姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "救助情况",replace = {"低保_0", "大病_1","廉租_2","教育_3","临时_4","其他_5"}) |
|||
private String helpStatus; |
|||
|
|||
|
|||
@Excel(name = "家庭类别",replace = {"普通家庭_0", "军烈家庭_1","优抚家庭_2","困难家庭_3"}) |
|||
private String familyCategory; |
|||
|
|||
@Excel(name = "家庭住址") |
|||
private String houseAddress; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class HouseBusinessInfoExcel { |
|||
|
|||
@Excel(name = "辖区范围") |
|||
private String gridName; |
|||
|
|||
@Excel(name = "经营者姓名") |
|||
private String legalRepresentative; |
|||
|
|||
|
|||
@Excel(name = "联系电话") |
|||
private String enterprisePhone; |
|||
|
|||
@Excel(name = "企业名称") |
|||
private String enterpriseName; |
|||
|
|||
@Excel(name = "企业注册号") |
|||
private String socialUniformCode; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class HouseRentInfoExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "承租人姓名") |
|||
private String tenantName; |
|||
|
|||
@Excel(name = "承租人电话") |
|||
private String tenantPhone; |
|||
|
|||
@Excel(name = "承租人身份证号") |
|||
private String tenantIdentityNo; |
|||
|
|||
@Excel(name = "房屋ID") |
|||
private String houseId; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String delFlag; |
|||
|
|||
@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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class HouseResidentExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "房屋ID") |
|||
private String houseId; |
|||
|
|||
@Excel(name = "居民ID") |
|||
private String residentId; |
|||
|
|||
@Excel(name = "与户主关系 (0:子女 1:夫妻 2:其他)") |
|||
private String houseHeadRelation; |
|||
|
|||
@Excel(name = "是否为户主 (0:否 1:是)") |
|||
private String isHouseHead; |
|||
|
|||
@Excel(name = "删除标识 (0:否 1:是)") |
|||
private String delFlag; |
|||
|
|||
@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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class HousingInformationExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "房屋地址") |
|||
private String houseAddress; |
|||
|
|||
@Excel(name = "购房时间") |
|||
private Date buyingTime; |
|||
|
|||
@Excel(name = "房屋面积") |
|||
private BigDecimal houseArea; |
|||
|
|||
@Excel(name = "产权人") |
|||
private String propertyOwner; |
|||
|
|||
@Excel(name = "产权人身份证号") |
|||
private String propertyOwnerIdentityNo; |
|||
|
|||
@Excel(name = "联系电话") |
|||
private String propertyOwnerMobile; |
|||
|
|||
@Excel(name = "房屋用途 (0:自住 1:租赁 2:经营)") |
|||
private String houseUse; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String delFlag; |
|||
|
|||
@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 = "所属网格ID") |
|||
private Long gridId; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "父所有部门名称") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门ID") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
/** |
|||
* 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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class PopulationInformationExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "性别 (0:女 1:男)") |
|||
private String residentsSex; |
|||
|
|||
@Excel(name = "民族") |
|||
private String residentsNation; |
|||
|
|||
@Excel(name = "出生年/月") |
|||
private Date residentsBirthday; |
|||
|
|||
@Excel(name = "文化程度") |
|||
private String educationLevel; |
|||
|
|||
@Excel(name = "政治面貌 (0:群众 1:党员)") |
|||
private String politicsStatus; |
|||
|
|||
@Excel(name = "入党时间") |
|||
private Date joinTime; |
|||
|
|||
@Excel(name = "组织关系所在地") |
|||
private String organizationalRelationshipLocation; |
|||
|
|||
@Excel(name = "身份证号码") |
|||
private String residentsIdentityNo; |
|||
|
|||
@Excel(name = "联系电话") |
|||
private String residentsPhone; |
|||
|
|||
@Excel(name = "身体状况 (0:病残 1:健康)") |
|||
private String bodyStatus; |
|||
|
|||
@Excel(name = "婚姻状况 (0:未婚 1:已婚)") |
|||
private String maritalStatus; |
|||
|
|||
@Excel(name = "户口类型 (0:城镇 1:农业)") |
|||
private String accountType; |
|||
|
|||
@Excel(name = "服兵役 (0:否 1:是)") |
|||
private String militaryService; |
|||
|
|||
@Excel(name = "户籍地") |
|||
private String householdRegistrationPlace; |
|||
|
|||
@Excel(name = "就业情况 (0:在岗 1:就业)") |
|||
private String employmentStatus; |
|||
|
|||
@Excel(name = "现工作单位") |
|||
private String currentEmployer; |
|||
|
|||
@Excel(name = "现单位地址") |
|||
private String currentEmployerAddress; |
|||
|
|||
@Excel(name = "失业原因 (0:原单位破产 1:解除合同 2:效益不好 3:减员 4:其他)") |
|||
private String unemploymentReason; |
|||
|
|||
@Excel(name = "再就业优惠证 (0:无 1:有)") |
|||
private String reemploymentPermit; |
|||
|
|||
@Excel(name = "失业登记 (0:否 1:是)") |
|||
private String unemploymentRegister; |
|||
|
|||
@Excel(name = "失业登记时间") |
|||
private Date unemploymentRegisterTime; |
|||
|
|||
@Excel(name = "家庭类别 (0:普通家庭 1:五好家庭 2:军烈家庭 3:优抚家庭 4:单亲家庭 5:空巢老人 6:困难家庭)") |
|||
private String familyCategory; |
|||
|
|||
@Excel(name = "救助情况 (0:低保 1:大病 2:廉租 3:教育 4:临时 5:其他)") |
|||
private String helpStatus; |
|||
|
|||
@Excel(name = "机动车数量") |
|||
private Integer motorVehicleNum; |
|||
|
|||
@Excel(name = "机动车类型 (0:轿车 1:摩托 2:其他)") |
|||
private String motorVehicleCategory; |
|||
|
|||
@Excel(name = "宠物犬状况 (0:无 1:有)") |
|||
private String dogStatus; |
|||
|
|||
@Excel(name = "家庭成员数") |
|||
private Integer familyMemberNum; |
|||
|
|||
@Excel(name = "家庭外出成员数") |
|||
private Integer familyMemberOutNum; |
|||
|
|||
@Excel(name = "外出原因 (0:务工 1:上学 2:探亲 3:其他)") |
|||
private String familyMemberOutReason; |
|||
|
|||
@Excel(name = "在外月数") |
|||
private Integer familyMemberOutMonth; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String delFlag; |
|||
|
|||
@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 = "所属网格ID") |
|||
private Long gridId; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门ID") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
|
|||
} |
|||
@ -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.vaccine.house.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Data |
|||
public class PopulationMotorVehicleExcel { |
|||
|
|||
|
|||
@Excel(name = "车主姓名") |
|||
private String residentsName; |
|||
|
|||
@Excel(name = "联系电话") |
|||
private String residentsPhone; |
|||
|
|||
@Excel(name = "机动车类型") |
|||
private String motorVehicleCategory; |
|||
|
|||
|
|||
} |
|||
@ -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.vaccine.house.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Component |
|||
public class HouseBusinessInfoRedis { |
|||
@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.vaccine.house.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Component |
|||
public class HouseRentInfoRedis { |
|||
@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.vaccine.house.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Component |
|||
public class HouseResidentRedis { |
|||
@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.vaccine.house.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Component |
|||
public class HousingInformationRedis { |
|||
@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.vaccine.house.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Component |
|||
public class PopulationInformationRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
/** |
|||
* 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.vaccine.house.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.house.HouseBusinessInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseBusinessInfoEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
public interface HouseBusinessInfoService extends BaseService<HouseBusinessInfoEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<HouseBusinessInfoDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PageData<HouseBusinessInfoDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<HouseBusinessInfoDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<HouseBusinessInfoDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return HouseBusinessInfoDTO |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
HouseBusinessInfoDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void save(HouseBusinessInfoDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void update(HouseBusinessInfoDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 根据房屋ID查询企业经营信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/19 |
|||
* @Param [houseID] |
|||
* @return com.elink.esua.epdc.entity.HouseRentInfoEntity |
|||
**/ |
|||
HouseBusinessInfoEntity getHouseBusinessInfoEntityByHouseId(String houseID); |
|||
/** |
|||
* @Description 前端类表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.HouseBusinessInfoDTO> |
|||
**/ |
|||
PageData<HouseBusinessInfoDTO> listPage(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.vaccine.house.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.house.HouseRentInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseRentInfoEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
public interface HouseRentInfoService extends BaseService<HouseRentInfoEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<HouseRentInfoDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PageData<HouseRentInfoDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<HouseRentInfoDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<HouseRentInfoDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return HouseRentInfoDTO |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
HouseRentInfoDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void save(HouseRentInfoDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void update(HouseRentInfoDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 根据房屋ID查询承租人信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/19 |
|||
* @Param [houseID] |
|||
* @return com.elink.esua.epdc.entity.HouseRentInfoEntity |
|||
**/ |
|||
HouseRentInfoEntity getHouseRentInfoEntityByHouseId(String houseID); |
|||
} |
|||
@ -0,0 +1,121 @@ |
|||
/** |
|||
* 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.vaccine.house.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.house.HouseResidentDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
public interface HouseResidentService extends BaseService<HouseResidentEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<HouseResidentDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PageData<HouseResidentDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<HouseResidentDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<HouseResidentDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return HouseResidentDTO |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PopulationInformationDTO get(String id); |
|||
|
|||
/** |
|||
* 带身份证的居民信息保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result saveWithIdentifyNo(HouseResidentDTO dto); |
|||
|
|||
/** |
|||
* 带身份证的居民信息更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result updateWithIdentifyNo(HouseResidentDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
/** |
|||
* @Description 获取居住人列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.HouseResidentDTO> |
|||
**/ |
|||
PageData<PopulationInformationDTO> listPage(Map<String, Object> params); |
|||
/** |
|||
* @Description 不带身份证的居民信息保存 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/24 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result saveWithoutIdentifyNo(HouseResidentDTO dto); |
|||
/** |
|||
* @Description 不带身份证的居民信息更新 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/24 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result updateWithoutIdentifyNo(HouseResidentDTO dto); |
|||
} |
|||
@ -0,0 +1,149 @@ |
|||
/** |
|||
* 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.vaccine.house.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.OrganizationModifyDTO; |
|||
import com.elink.esua.epdc.dto.house.BasePopulationInformationExportDto; |
|||
import com.elink.esua.epdc.dto.house.BaseResidentInformationExportDto; |
|||
import com.elink.esua.epdc.dto.house.HousingInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HousingInformationEntity; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 房屋信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
public interface HousingInformationService extends BaseService<HousingInformationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<HousingInformationDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PageData<HousingInformationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<HousingInformationDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<HousingInformationDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return HousingInformationDTO |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
HousingInformationDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result save(HousingInformationDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result update(HousingInformationDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
/** |
|||
* @Description 前端分页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/19 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.HousingInformationDTO> |
|||
**/ |
|||
PageData<HousingInformationDTO> listOfPage(Map<String, Object> params); |
|||
/** |
|||
* @Description 批量导入居民信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/31 |
|||
* @Param [file] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result importPopulationInfo(MultipartFile file,String gridId); |
|||
/** |
|||
* @Description 查询导出的 房屋信息和户主信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/1 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.excel.BasePopulationInformationExcel> |
|||
**/ |
|||
List<BasePopulationInformationExportDto> selectBasePopulationInformationExcelList(Map<String, Object> params); |
|||
/** |
|||
* @Description 根据户主ID列表获取居住人信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/1 |
|||
* @Param [houseHeadIds] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.BaseResidentInformationExportDto> |
|||
**/ |
|||
List<BaseResidentInformationExportDto> selectBaseResidentInformationExcelList(Set<String> houseHeadIds); |
|||
/** |
|||
* @Description 根据户主ID获取所有房子信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [populationId] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.HousingInformationDTO> |
|||
**/ |
|||
List<HousingInformationDTO> getHouseInfoByHouseHeadID(String houseHeadId); |
|||
/** |
|||
* @Description 房屋信息修改组织结构信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/25 |
|||
* @Param [dto] |
|||
* @return void |
|||
**/ |
|||
void modifyOrganizationInfo(OrganizationModifyDTO dto); |
|||
} |
|||
@ -0,0 +1,254 @@ |
|||
/** |
|||
* 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.vaccine.house.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.house.PopulationInfoOverviewDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.dto.house.form.*; |
|||
import com.elink.esua.epdc.dto.house.result.*; |
|||
import com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
public interface PopulationInformationService extends BaseService<PopulationInformationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<PopulationInformationDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PageData<PopulationInformationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<PopulationInformationDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<PopulationInformationDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return PopulationInformationDTO |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
PopulationInformationDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result save(PopulationInformationDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
Result update(PopulationInformationDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
void delete(String[] ids); |
|||
/** |
|||
* @Description 根据房屋ID获取户主信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.dto.PopulationInformationDTO |
|||
**/ |
|||
PopulationInformationDTO getHouseHeadInfo(String id); |
|||
/** |
|||
* @Description 根据身份证获取人口信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/21 |
|||
* @Param [residentsIdentityNo] |
|||
* @return com.elink.esua.epdc.dto.PopulationInformationDTO |
|||
**/ |
|||
PopulationInformationEntity getInfoByIdentityNo(String residentsIdentityNo); |
|||
/** |
|||
* @Description 人口信息列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/25 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
**/ |
|||
PageData<PopulationInformationDTO> listPage(Map<String, Object> params); |
|||
/** |
|||
* @Description 获取机动车列表信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
**/ |
|||
PageData<PopulationInformationDTO> motorVehiclePage(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @Description 获取机动车列表信息 --导出查询 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/26 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInformationDTO> |
|||
**/ |
|||
List<PopulationInformationDTO> motorVehicleList(Map<String, Object> params); |
|||
/** |
|||
* @Description 获取居民信息采集总览数据 |
|||
* @Author songyunpeng |
|||
* @Date 2020/8/28 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO |
|||
**/ |
|||
PopulationInfoOverviewDTO getPopulationInfoOverview(); |
|||
/** |
|||
* @Description 获取居民信息采集总览 |
|||
* @Author songyunpeng |
|||
* @Date 2021/6/23 |
|||
* @Param [communityId] |
|||
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO |
|||
**/ |
|||
PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(String communityId); |
|||
/** |
|||
* @Description 清空入党时间 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/4 |
|||
* @Param [id] |
|||
* @return void |
|||
**/ |
|||
void setJionTimeToNull(String id); |
|||
/** |
|||
* @Description 清空失业登记时间 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/4 |
|||
* @Param [id] |
|||
* @return void |
|||
**/ |
|||
void setUnemploymentRegisterTimeToNull(String id); |
|||
/** |
|||
* @Description 大屏找人接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [epdcScreenSelectPeopleFormDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO>> |
|||
**/ |
|||
PageData<EpdcScreenSelectPeopleResultDTO> selectPeople(EpdcScreenSelectPeopleFormDTO epdcScreenSelectPeopleFormDTO); |
|||
/** |
|||
* @Description 大屏找人详情接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/14 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleDetailResultDTO> |
|||
**/ |
|||
Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto); |
|||
/** |
|||
* @Description 房屋用途数据接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/15 |
|||
* @Param [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenHouseUseResultDTO> |
|||
**/ |
|||
Result<EpdcScreenHouseUseResultDTO> housingUse(); |
|||
/** |
|||
* @Description 网格排名 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/15 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.epdc.result.EpdcScreenGridRankingResultDTO> |
|||
**/ |
|||
PageData<EpdcScreenGridRankingResultDTO> gridRanking(EpdcScreenGridRankingFormDTO dto); |
|||
/** |
|||
* @Description 一人找房接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO> |
|||
**/ |
|||
PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto); |
|||
/** |
|||
* @Description 以房找人接口 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO> |
|||
**/ |
|||
PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto); |
|||
/** |
|||
* @Description 以城找人 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/19 |
|||
* @Param [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.form.EpdcScreenResidentInfoByCurrentAddressFormDTO> |
|||
**/ |
|||
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto); |
|||
|
|||
/** |
|||
* @Description 以城找人 - pc |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/4 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO> |
|||
**/ |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params); |
|||
/** |
|||
* 以城找人 - pc导出 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<PopulationInformationDTO> |
|||
* @author generator |
|||
* @date 2020-08-19 |
|||
*/ |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params); |
|||
/** |
|||
* @Description 以城找人 - pc - count |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/4 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO> |
|||
**/ |
|||
Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
/** |
|||
* 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.vaccine.house.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.house.HouseBusinessInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.dao.HouseBusinessInfoDao; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseBusinessInfoEntity; |
|||
import com.elink.esua.epdc.vaccine.house.redis.HouseBusinessInfoRedis; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseBusinessInfoService; |
|||
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.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋经营信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Service |
|||
public class HouseBusinessInfoServiceImpl extends BaseServiceImpl<HouseBusinessInfoDao, HouseBusinessInfoEntity> implements HouseBusinessInfoService { |
|||
|
|||
@Autowired |
|||
private HouseBusinessInfoRedis houseBusinessInfoRedis; |
|||
|
|||
@Override |
|||
public PageData<HouseBusinessInfoDTO> page(Map<String, Object> params) { |
|||
IPage<HouseBusinessInfoEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, HouseBusinessInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<HouseBusinessInfoDTO> list(Map<String, Object> params) { |
|||
return baseDao.selectHouseBusinessInfoDTO(params); |
|||
} |
|||
|
|||
private QueryWrapper<HouseBusinessInfoEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<HouseBusinessInfoEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public HouseBusinessInfoDTO get(String id) { |
|||
HouseBusinessInfoEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, HouseBusinessInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(HouseBusinessInfoDTO dto) { |
|||
HouseBusinessInfoEntity entity = ConvertUtils.sourceToTarget(dto, HouseBusinessInfoEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(HouseBusinessInfoDTO dto) { |
|||
HouseBusinessInfoEntity entity = ConvertUtils.sourceToTarget(dto, HouseBusinessInfoEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public HouseBusinessInfoEntity getHouseBusinessInfoEntityByHouseId(String houseID) { |
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("HOUSE_ID", houseID); |
|||
List<HouseBusinessInfoEntity> houseBusinessInfoEntities = baseDao.selectByMap(params); |
|||
if(houseBusinessInfoEntities.size()>0){ |
|||
return houseBusinessInfoEntities.get(0); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public PageData<HouseBusinessInfoDTO> listPage(Map<String, Object> params) { |
|||
IPage<HouseBusinessInfoDTO> page = getPage(params); |
|||
List<HouseBusinessInfoDTO> list = baseDao.selectHouseBusinessInfoDTO(params); |
|||
return new PageData<>(list, page.getTotal()); } |
|||
|
|||
} |
|||
@ -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.vaccine.house.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.house.HouseRentInfoDTO; |
|||
import com.elink.esua.epdc.vaccine.house.dao.HouseRentInfoDao; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseRentInfoEntity; |
|||
import com.elink.esua.epdc.vaccine.house.redis.HouseRentInfoRedis; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseRentInfoService; |
|||
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.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 房屋租赁信息 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Service |
|||
public class HouseRentInfoServiceImpl extends BaseServiceImpl<HouseRentInfoDao, HouseRentInfoEntity> implements HouseRentInfoService { |
|||
|
|||
@Autowired |
|||
private HouseRentInfoRedis houseRentInfoRedis; |
|||
|
|||
@Override |
|||
public PageData<HouseRentInfoDTO> page(Map<String, Object> params) { |
|||
IPage<HouseRentInfoEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, HouseRentInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<HouseRentInfoDTO> list(Map<String, Object> params) { |
|||
List<HouseRentInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, HouseRentInfoDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<HouseRentInfoEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<HouseRentInfoEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public HouseRentInfoDTO get(String id) { |
|||
HouseRentInfoEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, HouseRentInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(HouseRentInfoDTO dto) { |
|||
HouseRentInfoEntity entity = ConvertUtils.sourceToTarget(dto, HouseRentInfoEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(HouseRentInfoDTO dto) { |
|||
HouseRentInfoEntity entity = ConvertUtils.sourceToTarget(dto, HouseRentInfoEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public HouseRentInfoEntity getHouseRentInfoEntityByHouseId(String houseID) { |
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("HOUSE_ID", houseID); |
|||
List<HouseRentInfoEntity> houseRentInfoEntities = baseDao.selectByMap(params); |
|||
if(houseRentInfoEntities!=null && houseRentInfoEntities.size()>0){ |
|||
return houseRentInfoEntities.get(0); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,380 @@ |
|||
/** |
|||
* 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.vaccine.house.service.impl; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
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.commons.tools.utils.IdentityNoUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.house.HouseResidentDTO; |
|||
import com.elink.esua.epdc.dto.house.PopulationInformationDTO; |
|||
import com.elink.esua.epdc.vaccine.house.dao.HouseResidentDao; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HousingInformationEntity; |
|||
import com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity; |
|||
import com.elink.esua.epdc.vaccine.house.redis.HouseResidentRedis; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseResidentService; |
|||
import com.elink.esua.epdc.vaccine.house.service.HousingInformationService; |
|||
import com.elink.esua.epdc.vaccine.house.service.PopulationInformationService; |
|||
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.*; |
|||
|
|||
/** |
|||
* 房屋人员关系表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Service |
|||
public class HouseResidentServiceImpl extends BaseServiceImpl<HouseResidentDao, HouseResidentEntity> implements HouseResidentService { |
|||
|
|||
@Autowired |
|||
private HouseResidentRedis houseResidentRedis; |
|||
|
|||
@Autowired |
|||
private PopulationInformationService populationInformationService; |
|||
|
|||
@Autowired |
|||
private HousingInformationService housingInformationService; |
|||
@Autowired |
|||
private HouseResidentDao houseResidentDao; |
|||
|
|||
@Override |
|||
public PageData<HouseResidentDTO> page(Map<String, Object> params) { |
|||
IPage<HouseResidentEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, HouseResidentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<HouseResidentDTO> list(Map<String, Object> params) { |
|||
List<HouseResidentEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, HouseResidentDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<HouseResidentEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<HouseResidentEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInformationDTO get(String id) { |
|||
PopulationInformationDTO populationInformationDTO = baseDao.selectByHouseResidentId(id); |
|||
return populationInformationDTO; |
|||
} |
|||
/** 居住人的新增和更新逻辑: |
|||
* 新增:1.判断填写的身份证是否已存在 |
|||
* 不存在:直接新增人口信息和关联表信息 |
|||
* 存在:更新原有的人口信息和关联信息(若是有户主身份,且在此是第一次新增居住信息,则直接更新原有人口信息和新增关联信息) |
|||
* 更新:1.若是身份证被修改:判断填写的身份证是否存在 |
|||
* 不存在:代表更新关联表信息和新增人口信息,原先的人口信息如果只有居住人身份的话则直接删除 |
|||
* ****存在(只有人才才会走到这个逻辑): |
|||
* 1.判断修改的身份证信息是不是在当前房屋下,存在则返回错误信息 |
|||
* 2.不在此房屋下: |
|||
* 若是此身份证有户主身份: |
|||
* (1)更新原先的人口信息 |
|||
* (2)新增居民关联关系为表单的身份证和表单房子关联 |
|||
* (3)删除被更新的人口信息(非户主)和人口关系 |
|||
* 若是此身份证有居住人身份(或者既有户主又有居民身份): |
|||
* (1)更新原先居民关联关系为表单的身份证和表单房子关联 |
|||
* (2)更新原先的人口信息 |
|||
* (3)删除被更新的人口信息(非户主)和人口关系 |
|||
* |
|||
* */ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result saveWithIdentifyNo(HouseResidentDTO dto) { |
|||
//先判断身份证是否合法
|
|||
String result = IdentityNoUtils.IdentityNoVerification(dto.getResidentsIdentityNo()); |
|||
if(result != null){ |
|||
return new Result().error(result); |
|||
} |
|||
String sex = IdentityNoUtils.getSex(dto.getResidentsIdentityNo()); |
|||
String birthday = IdentityNoUtils.getBirthday(dto.getResidentsIdentityNo()); |
|||
//根据身份证查询新人口信息
|
|||
PopulationInformationEntity newPopulationInformationEntity = populationInformationService.getInfoByIdentityNo(dto.getResidentsIdentityNo()); |
|||
if(newPopulationInformationEntity==null){ |
|||
newPopulationInformationEntity = new PopulationInformationEntity(); |
|||
newPopulationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
newPopulationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
newPopulationInformationEntity.setEducationLevel(dto.getEducationLevel()); |
|||
newPopulationInformationEntity.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
newPopulationInformationEntity.setResidentsIdentityNo(dto.getResidentsIdentityNo()); |
|||
newPopulationInformationEntity.setResidentsPhone(dto.getResidentsPhone()); |
|||
newPopulationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
newPopulationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
newPopulationInformationEntity.setResidentsSex(sex); |
|||
newPopulationInformationEntity.setResidentsBirthday(DateUtil.parse(birthday)); |
|||
//插入人口信息
|
|||
populationInformationService.insert(newPopulationInformationEntity); |
|||
//插入关联表信息
|
|||
HouseResidentEntity entity = new HouseResidentEntity(); |
|||
entity.setHouseId(dto.getHouseId()); |
|||
entity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
entity.setResidentId(newPopulationInformationEntity.getId()); |
|||
entity.setIsHouseHead("0"); |
|||
insert(entity); |
|||
}else if(newPopulationInformationEntity!=null){ |
|||
//人口信息不是空,则新人口信息转变为旧人口信息
|
|||
//1.查询表单身份证的人口的和房子的关联关系(查询条件是非户主身份的)
|
|||
HouseResidentEntity oldHouseResidentEntity = baseDao.getHouseResidentInfoByResidentId(newPopulationInformationEntity.getId()); |
|||
if(oldHouseResidentEntity==null){ |
|||
//此时说明此人有户主身份,则直接更新人口信息和新增关联信息
|
|||
newPopulationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
newPopulationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
newPopulationInformationEntity.setEducationLevel(dto.getEducationLevel()); |
|||
newPopulationInformationEntity.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
newPopulationInformationEntity.setResidentsIdentityNo(dto.getResidentsIdentityNo()); |
|||
newPopulationInformationEntity.setResidentsPhone(dto.getResidentsPhone()); |
|||
newPopulationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
newPopulationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
newPopulationInformationEntity.setResidentsSex(sex); |
|||
newPopulationInformationEntity.setResidentsBirthday(DateUtil.parse(birthday)); |
|||
//更新人口信息
|
|||
populationInformationService.updateById(newPopulationInformationEntity); |
|||
//新增关联表信息为当前房屋
|
|||
oldHouseResidentEntity.setHouseId(dto.getHouseId()); |
|||
oldHouseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
oldHouseResidentEntity.setResidentId(newPopulationInformationEntity.getId()); |
|||
insert(oldHouseResidentEntity); |
|||
return new Result(); |
|||
} |
|||
//2.查询表单身份证的人口的房子的信息
|
|||
HousingInformationEntity oldHousingInformationEntity = housingInformationService.selectById(oldHouseResidentEntity.getHouseId()); |
|||
//3.第一次修改
|
|||
//比较当前房屋和表单身份证的旧房屋信息
|
|||
//如果不同则提示是否要进行修改
|
|||
if("0".equals(dto.getIsEditResidentInfo()) && !dto.getHouseId().equals(oldHouseResidentEntity.getHouseId())){ |
|||
return new Result().ok("您在地址为"+oldHousingInformationEntity.getHouseAddress()+"房屋下已有居住信息,确认要更新吗?"); |
|||
}else if("1".equals(dto.getIsEditResidentInfo())){//第二次确认修改居住信息
|
|||
newPopulationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
newPopulationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
newPopulationInformationEntity.setEducationLevel(dto.getEducationLevel()); |
|||
newPopulationInformationEntity.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
newPopulationInformationEntity.setResidentsIdentityNo(dto.getResidentsIdentityNo()); |
|||
newPopulationInformationEntity.setResidentsPhone(dto.getResidentsPhone()); |
|||
newPopulationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
newPopulationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
newPopulationInformationEntity.setResidentsSex(sex); |
|||
newPopulationInformationEntity.setResidentsBirthday(DateUtil.parse(birthday)); |
|||
//更新人口信息
|
|||
populationInformationService.updateById(newPopulationInformationEntity); |
|||
//更新旧的关联表信息为当前房屋
|
|||
oldHouseResidentEntity.setHouseId(dto.getHouseId()); |
|||
oldHouseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
updateById(oldHouseResidentEntity); |
|||
}else if ("0".equals(dto.getIsEditResidentInfo()) && dto.getHouseId().equals(oldHouseResidentEntity.getHouseId())){ |
|||
//如果相同,则表示新增时,填写的身份证在房屋居住人列表中已存在!
|
|||
return new Result().error("当前房屋下已存在此人!"); |
|||
} else { |
|||
return new Result().error("参数传递出错"); |
|||
} |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result updateWithIdentifyNo(HouseResidentDTO dto) { |
|||
//判断身份证是否发生修改
|
|||
HouseResidentEntity oldHouseResident = baseDao.selectById(dto.getId()); |
|||
PopulationInformationEntity oldPopulationInformation = populationInformationService.selectById(oldHouseResident.getResidentId()); |
|||
//如果身份证相同,则更新人口信息和关系表信息
|
|||
if(dto.getResidentsIdentityNo().equals(oldPopulationInformation.getResidentsIdentityNo())){ |
|||
oldPopulationInformation.setResidentsName(dto.getResidentsName()); |
|||
oldPopulationInformation.setResidentsNation(dto.getResidentsNation()); |
|||
oldPopulationInformation.setEducationLevel(dto.getEducationLevel()); |
|||
oldPopulationInformation.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
oldPopulationInformation.setResidentsPhone(dto.getResidentsPhone()); |
|||
oldPopulationInformation.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
oldPopulationInformation.setCurrentAddress(dto.getCurrentAddress()); |
|||
//更新人口信息
|
|||
populationInformationService.updateById(oldPopulationInformation); |
|||
//更新关联表信息
|
|||
oldHouseResident.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
updateById(oldHouseResident); |
|||
} else { |
|||
//先判断身份证是否合法
|
|||
String result = IdentityNoUtils.IdentityNoVerification(dto.getResidentsIdentityNo()); |
|||
if(result != null){ |
|||
return new Result().error(result); |
|||
} |
|||
String sex = IdentityNoUtils.getSex(dto.getResidentsIdentityNo()); |
|||
String birthday = IdentityNoUtils.getBirthday(dto.getResidentsIdentityNo()); |
|||
//根据身份证判断此人是否已有居住信息
|
|||
//新的居住人信息
|
|||
PopulationInformationEntity populationInformationEntity = populationInformationService.getInfoByIdentityNo(dto.getResidentsIdentityNo()); |
|||
if(populationInformationEntity==null){ |
|||
//新的居住人信息是空,代表添加新的人口信息到表中。并且由于此处是更新,则当前选择的被更新人的数据要从人口信息表中删除,且之前的关联关系也得更新
|
|||
populationInformationEntity = new PopulationInformationEntity(); |
|||
populationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
populationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
populationInformationEntity.setEducationLevel(dto.getEducationLevel()); |
|||
populationInformationEntity.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
populationInformationEntity.setResidentsIdentityNo(dto.getResidentsIdentityNo()); |
|||
populationInformationEntity.setResidentsPhone(dto.getResidentsPhone()); |
|||
populationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
populationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
populationInformationEntity.setResidentsSex(sex); |
|||
populationInformationEntity.setResidentsBirthday(DateUtil.parse(birthday)); |
|||
//获取原先关联表信息
|
|||
HouseResidentEntity entity = selectById(dto.getId()); |
|||
//查询原先绑定的居住人的信息,如果此居住人只有居住人身份则删除此人人口信息
|
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("RESIDENT_ID",entity.getResidentId()); |
|||
params.put("IS_HOUSE_HEAD","0"); |
|||
List<HouseResidentEntity> houseResidentEntities = baseDao.selectByMap(params); |
|||
if(houseResidentEntities!=null && houseResidentEntities.size()>0){ |
|||
//没有户主身份,删除人口信息
|
|||
populationInformationService.deleteById(entity.getResidentId()); |
|||
} |
|||
//插入人口信息
|
|||
populationInformationService.insert(populationInformationEntity); |
|||
entity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
entity.setResidentId(populationInformationEntity.getId()); |
|||
//更新关联表信息
|
|||
updateById(entity); |
|||
}else if(populationInformationEntity!=null){ |
|||
//1.判断查出的表单身份证的这个人是不是已经在这个房屋下了
|
|||
Map<String,Object> params = new HashMap<>(); |
|||
//当前表单身份证对应的人口ID
|
|||
params.put("RESIDENT_ID",populationInformationEntity.getId()); |
|||
//当前表单房屋ID
|
|||
params.put("HOUSE_ID",dto.getHouseId()); |
|||
params.put("IS_HOUSE_HEAD","0"); |
|||
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params); |
|||
if(houseResidentEntities!=null && houseResidentEntities.size()>0){ |
|||
return new Result().error("当前房屋下已存在此人!"); |
|||
} |
|||
//2.此人不在此屋子下
|
|||
//(1)先更新原先的人口信息 - 组装信息
|
|||
populationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
populationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
populationInformationEntity.setEducationLevel(dto.getEducationLevel()); |
|||
populationInformationEntity.setPoliticsStatus(dto.getPoliticsStatus()); |
|||
populationInformationEntity.setResidentsPhone(dto.getResidentsPhone()); |
|||
populationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
populationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
//(2)删除被更新的人的人口信息和关联信息 - 组装信息
|
|||
//获取原先关联表信息
|
|||
HouseResidentEntity entity = selectById(dto.getId()); |
|||
//查询原先绑定的居住人的信息,如果此居住人只有居住人身份则删除此人人口信息
|
|||
Map<String,Object> oldParams = new HashMap<>(); |
|||
oldParams.put("RESIDENT_ID",entity.getResidentId()); |
|||
oldParams.put("IS_HOUSE_HEAD","0"); |
|||
List<HouseResidentEntity> oldHouseResidentEntities = baseDao.selectByMap(oldParams); |
|||
//(3)更新表单身份证与房屋关联关系为当前房屋(若是表单身份证存在户主身份,且第一次添加居住人,则新增关联关系)
|
|||
//获取表单身份证之前的居住地关联关系表的信息
|
|||
HouseResidentEntity newHouseResidentEntity = houseResidentDao.getHouseResidentInfoByResidentId(populationInformationEntity.getId()); |
|||
if(newHouseResidentEntity==null){ |
|||
//此处判断代表此人有户主身份,且第一次更新为居民身份,此时新增关联关系
|
|||
newHouseResidentEntity.setHouseId(dto.getHouseId()); |
|||
newHouseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
newHouseResidentEntity.setResidentId(populationInformationEntity.getId()); |
|||
houseResidentDao.insert(newHouseResidentEntity); |
|||
}else { |
|||
houseResidentDao.updateById(newHouseResidentEntity); |
|||
} |
|||
baseDao.deleteById(entity.getId()); |
|||
if(oldHouseResidentEntities!=null && oldHouseResidentEntities.size()>0){ |
|||
//没有户主身份,删除人口信息
|
|||
populationInformationService.deleteById(entity.getResidentId()); |
|||
} |
|||
|
|||
populationInformationService.updateById(populationInformationEntity); |
|||
}else { |
|||
return new Result().error("参数传递出错"); |
|||
} |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
//删除人口信息
|
|||
HouseResidentEntity houseResidentEntity = selectById(ids[0]); |
|||
populationInformationService.deleteById(houseResidentEntity.getResidentId()); |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<PopulationInformationDTO> listPage(Map<String, Object> params) { |
|||
IPage<PopulationInformationDTO> page = getPage(params); |
|||
PopulationInformationDTO populationInformationDTO = populationInformationService.getHouseHeadInfo(params.get("houseId") + ""); |
|||
if(populationInformationDTO==null){ |
|||
return new PageData<>(new ArrayList<>(), page.getTotal()); |
|||
} |
|||
params.put("houseHeadId",populationInformationDTO.getId()); |
|||
List<PopulationInformationDTO> list = baseDao.selectListOfPopulationInformationDTO(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public Result saveWithoutIdentifyNo(HouseResidentDTO dto) { |
|||
//先取房屋的户主ID
|
|||
PopulationInformationDTO houseHeadInfo = populationInformationService.getHouseHeadInfo(dto.getHouseId()); |
|||
if(houseHeadInfo==null){ |
|||
return new Result().error("请先填写户主信息!"); |
|||
} |
|||
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(dto,PopulationInformationEntity.class); |
|||
populationInformationService.insert(populationInformationEntity); |
|||
HouseResidentEntity houseResidentEntity = new HouseResidentEntity(); |
|||
//居住人与户主关联,与房屋不关联
|
|||
houseResidentEntity.setResidentId(populationInformationEntity.getId()); |
|||
houseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
houseResidentEntity.setHouseHeadId(houseHeadInfo.getId()); |
|||
houseResidentEntity.setIsHouseHead("0"); |
|||
this.insert(houseResidentEntity); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result updateWithoutIdentifyNo(HouseResidentDTO dto) { |
|||
PopulationInformationEntity populationInformationEntity = populationInformationService.selectById(dto.getResidentId()); |
|||
populationInformationEntity.setResidentsName(dto.getResidentsName()); |
|||
populationInformationEntity.setResidentsSex(dto.getResidentsSex()); |
|||
populationInformationEntity.setResidentsNation(dto.getResidentsNation()); |
|||
populationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer()); |
|||
populationInformationEntity.setCurrentAddress(dto.getCurrentAddress()); |
|||
populationInformationService.updateById(populationInformationEntity); |
|||
HouseResidentEntity houseResidentEntity = new HouseResidentEntity(); |
|||
houseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation()); |
|||
houseResidentEntity.setId(dto.getId()); |
|||
this.updateById(houseResidentEntity); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,585 @@ |
|||
/** |
|||
* 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.vaccine.house.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.constant.NumConstant; |
|||
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.constant.HouseHeadRelationConstant; |
|||
import com.elink.esua.epdc.constant.HouseUseConstant; |
|||
import com.elink.esua.epdc.constant.PopulationDictConstant; |
|||
import com.elink.esua.epdc.constant.PopulationIdentify; |
|||
import com.elink.esua.epdc.dto.house.*; |
|||
import com.elink.esua.epdc.dto.house.form.*; |
|||
import com.elink.esua.epdc.dto.house.result.*; |
|||
import com.elink.esua.epdc.vaccine.feign.VimAdminFeignClient; |
|||
import com.elink.esua.epdc.vaccine.house.dao.HouseResidentDao; |
|||
import com.elink.esua.epdc.vaccine.house.dao.PopulationInformationDao; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity; |
|||
import com.elink.esua.epdc.vaccine.house.entity.HousingInformationEntity; |
|||
import com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity; |
|||
import com.elink.esua.epdc.vaccine.house.redis.PopulationInformationRedis; |
|||
import com.elink.esua.epdc.vaccine.house.service.HouseResidentService; |
|||
import com.elink.esua.epdc.vaccine.house.service.HousingInformationService; |
|||
import com.elink.esua.epdc.vaccine.house.service.PopulationInformationService; |
|||
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.beans.IntrospectionException; |
|||
import java.beans.PropertyDescriptor; |
|||
import java.lang.reflect.Field; |
|||
import java.lang.reflect.InvocationTargetException; |
|||
import java.lang.reflect.Method; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* 人口信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-08-19 |
|||
*/ |
|||
@Service |
|||
public class PopulationInformationServiceImpl extends BaseServiceImpl<PopulationInformationDao, PopulationInformationEntity> implements PopulationInformationService { |
|||
|
|||
@Autowired |
|||
private PopulationInformationRedis populationInformationRedis; |
|||
|
|||
@Autowired |
|||
private HouseResidentService houseResidentService; |
|||
@Autowired |
|||
private HouseResidentDao houseResidentDao; |
|||
@Autowired |
|||
private HousingInformationService housingInformationService; |
|||
@Autowired |
|||
private VimAdminFeignClient adminFeignClient; |
|||
|
|||
|
|||
@Override |
|||
public PageData<PopulationInformationDTO> page(Map<String, Object> params) { |
|||
IPage<PopulationInformationEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, PopulationInformationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<PopulationInformationDTO> list(Map<String, Object> params) { |
|||
return baseDao.selectListOfPopulationInformationDTO(params); |
|||
} |
|||
|
|||
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<PopulationInformationEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInformationDTO get(String id) { |
|||
return baseDao.selectDetailOfPopulationInformationDTO(id); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result save(PopulationInformationDTO dto) { |
|||
//校验身份证信息
|
|||
//1.获取表单身份证的人口信息
|
|||
PopulationInformationEntity infoByIdentityNo = getInfoByIdentityNo(dto.getResidentsIdentityNo()); |
|||
if (infoByIdentityNo != null) { |
|||
Map<String, Object> params = new HashMap<>(); |
|||
params.put("RESIDENT_ID", infoByIdentityNo.getId()); |
|||
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params); |
|||
if (houseResidentEntities.size() > 0) { |
|||
//2.此人有房屋信息,且为第一次提交则此时提示前端
|
|||
if ("0".equals(dto.getIsSubmit())) { |
|||
StringBuffer sb = new StringBuffer(); |
|||
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) { |
|||
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId()); |
|||
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\""); |
|||
} |
|||
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|||
return new Result().ok(result.substring(1)); |
|||
} |
|||
//2.第二次提交,则更新户主信息且新增关联信息
|
|||
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|||
entity.setId(infoByIdentityNo.getId()); |
|||
updateById(entity); |
|||
//插入房屋关联关系表
|
|||
HouseResidentEntity houseResidentEntity = new HouseResidentEntity(); |
|||
houseResidentEntity.setIsHouseHead("1"); |
|||
houseResidentEntity.setResidentId(entity.getId()); |
|||
houseResidentEntity.setHouseId(dto.getHouseId()); |
|||
houseResidentService.insert(houseResidentEntity); |
|||
return new Result(); |
|||
} |
|||
} |
|||
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|||
insert(entity); |
|||
//插入房屋关联关系表
|
|||
HouseResidentEntity houseResidentEntity = new HouseResidentEntity(); |
|||
houseResidentEntity.setIsHouseHead("1"); |
|||
houseResidentEntity.setResidentId(entity.getId()); |
|||
houseResidentEntity.setHouseId(dto.getHouseId()); |
|||
houseResidentService.insert(houseResidentEntity); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Result update(PopulationInformationDTO dto) { |
|||
PopulationInformationEntity infoByIdentityNo = selectById(dto.getId()); |
|||
if (dto.getResidentsIdentityNo().equals(infoByIdentityNo.getResidentsIdentityNo())) { |
|||
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|||
//置空其他选择信息-防止导出时数据出错
|
|||
if ("0".equals(dto.getPoliticsStatus())) { |
|||
//如果表单选择的是群众,则清空入党时间和组织关系所在地
|
|||
this.setJionTimeToNull(entity.getId()); |
|||
entity.setJoinTime(null); |
|||
entity.setOrganizationalRelationshipLocation(""); |
|||
} |
|||
if ("0".equals(dto.getEmploymentStatus())) { |
|||
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
|
|||
entity.setUnemploymentReason(""); |
|||
entity.setReemploymentPermit(""); |
|||
entity.setUnemploymentRegister(""); |
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
} else if ("1".equals(dto.getEmploymentStatus())) { |
|||
//如果选择为失业,则置空工作单位和工作地址
|
|||
entity.setCurrentEmployer(""); |
|||
entity.setCurrentEmployerAddress(""); |
|||
if ("0".equals(dto.getUnemploymentRegister())) { |
|||
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
} |
|||
} else { |
|||
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
|
|||
entity.setUnemploymentReason(""); |
|||
entity.setReemploymentPermit(""); |
|||
entity.setUnemploymentRegister(""); |
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
//如果选择为失业,则置空工作单位和工作地址
|
|||
entity.setCurrentEmployer(""); |
|||
entity.setCurrentEmployerAddress(""); |
|||
if ("0".equals(dto.getUnemploymentRegister())) { |
|||
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
} |
|||
} |
|||
|
|||
if (dto.getMotorVehicleNum() == 0) { |
|||
//如果机动车数量为0 清空机动车类型
|
|||
entity.setMotorVehicleCategory(""); |
|||
} |
|||
updateById(entity); |
|||
return new Result(); |
|||
} else { |
|||
//修改了身份证信息 - 提示信息
|
|||
Map<String, Object> params = new HashMap<>(); |
|||
params.put("RESIDENT_ID", infoByIdentityNo.getId()); |
|||
List<HouseResidentEntity> houseResidentEntities = houseResidentDao.selectByMap(params); |
|||
if (houseResidentEntities.size() > 0) { |
|||
//2.此人有房屋信息,且为第一次提交则此时提示前端
|
|||
if ("0".equals(dto.getIsSubmit())) { |
|||
StringBuffer sb = new StringBuffer(); |
|||
for (HouseResidentEntity houseResidentEntity : houseResidentEntities) { |
|||
HousingInformationEntity housingInformationEntity = housingInformationService.selectById(houseResidentEntity.getHouseId()); |
|||
sb.append(",\"").append(housingInformationEntity.getHouseAddress()).append("\""); |
|||
} |
|||
String result = "您在地址为" + sb.substring(1) + "下已有房产信息,点击确认则新增此房产且更新居民信息!"; |
|||
return new Result().ok(result.substring(1)); |
|||
} |
|||
//2.第二次提交,则更新户主信息
|
|||
PopulationInformationEntity entity = ConvertUtils.sourceToTarget(dto, PopulationInformationEntity.class); |
|||
entity.setId(infoByIdentityNo.getId()); |
|||
//置空其他选择信息-防止导出时数据出错
|
|||
if ("0".equals(dto.getPoliticsStatus())) { |
|||
//如果表单选择的是群众,则清空入党时间和组织关系所在地
|
|||
this.setJionTimeToNull(entity.getId()); |
|||
entity.setJoinTime(null); |
|||
entity.setOrganizationalRelationshipLocation(""); |
|||
} |
|||
if ("0".equals(dto.getEmploymentStatus())) { |
|||
//如果表单选择的是在岗,则清空失业原因,再就业优惠政,失业登记和失业登记时间
|
|||
entity.setUnemploymentReason(""); |
|||
entity.setReemploymentPermit(""); |
|||
entity.setUnemploymentRegister(""); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
} |
|||
if ("1".equals(dto.getEmploymentStatus())) { |
|||
//如果选择为失业,则置空工作单位和工作地址
|
|||
entity.setCurrentEmployer(""); |
|||
entity.setCurrentEmployerAddress(""); |
|||
if ("0".equals(dto.getUnemploymentRegister())) { |
|||
//如果表单选择的是失业 且就业登记为否 则也置空失业登记时间
|
|||
this.setUnemploymentRegisterTimeToNull(entity.getId()); |
|||
entity.setUnemploymentRegisterTime(null); |
|||
|
|||
} |
|||
} |
|||
this.updateById(entity); |
|||
return new Result(); |
|||
} |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInformationDTO getHouseHeadInfo(String houseId) { |
|||
PopulationInformationDTO houseHeadInfo = baseDao.getHouseHeadInfo(houseId); |
|||
//处理机动车类型
|
|||
if (houseHeadInfo != null && StringUtils.isNotBlank(houseHeadInfo.getMotorVehicleCategory())) { |
|||
String[] motorVehicleCategoryStrings = houseHeadInfo.getMotorVehicleCategory().split(","); |
|||
houseHeadInfo.setMotorVehicleCategoryList(Arrays.asList(motorVehicleCategoryStrings)); |
|||
} |
|||
return houseHeadInfo; |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInformationEntity getInfoByIdentityNo(String residentsIdentityNo) { |
|||
return baseDao.getInfoByIdentityNo(residentsIdentityNo); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<PopulationInformationDTO> listPage(Map<String, Object> params) { |
|||
IPage<PopulationInformationDTO> page = getPage(params); |
|||
List<PopulationInformationDTO> list = baseDao.selectListOfPopulationInformationDTO(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<PopulationInformationDTO> motorVehiclePage(Map<String, Object> params) { |
|||
IPage<PopulationInformationDTO> page = getPage(params); |
|||
List<PopulationInformationDTO> list = baseDao.motorVehiclePage(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<PopulationInformationDTO> motorVehicleList(Map<String, Object> params) { |
|||
return baseDao.motorVehiclePage(params); |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInfoOverviewDTO getPopulationInfoOverview() { |
|||
return baseDao.getPopulationInfoOverview(); |
|||
} |
|||
|
|||
@Override |
|||
public PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(String communityId) { |
|||
return baseDao.getPopulationInfoOverviewForScreen(communityId); |
|||
} |
|||
|
|||
@Override |
|||
public void setJionTimeToNull(String id) { |
|||
baseDao.setJionTimeToNull(id); |
|||
} |
|||
|
|||
@Override |
|||
public void setUnemploymentRegisterTimeToNull(String id) { |
|||
baseDao.setUnemploymentRegisterTimeToNull(id); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<EpdcScreenSelectPeopleResultDTO> selectPeople(EpdcScreenSelectPeopleFormDTO dto) { |
|||
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|||
dto.setPageIndex(pageIndex); |
|||
List<EpdcScreenSelectPeopleResultDTO> list = baseDao.selectListPeople(dto); |
|||
return new PageData<>(list, baseDao.selectCountListPeople(dto)); |
|||
} |
|||
|
|||
@Override |
|||
public Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto) { |
|||
EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO = new EpdcScreenSelectPeopleDetailResultDTO(); |
|||
//根据身份标识寻找对应人员信息
|
|||
if (PopulationIdentify.HOUSE_HEAD.equals(dto.getIdentifyFlag())) { |
|||
if (StringUtils.isBlank(dto.getPopulationId())) { |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询产权人信息失败:人口ID为空"); |
|||
} |
|||
//根据户主ID组装信息
|
|||
setHouseHeadInfo(dto.getPopulationId(), epdcScreenSelectPeopleDetailResultDTO); |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO); |
|||
} else if (PopulationIdentify.HOUSE_RESIDENT.equals(dto.getIdentifyFlag())) { |
|||
if (StringUtils.isBlank(dto.getPopulationId())) { |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询居住人信息失败:人口ID为空"); |
|||
} |
|||
//查找居住人对应的户主细腻
|
|||
Map<String, Object> params = new HashMap<>(); |
|||
params.put("RESIDENT_ID", dto.getPopulationId()); |
|||
List<HouseResidentEntity> houseResidentEntityList = houseResidentDao.selectByMap(params); |
|||
if (houseResidentEntityList == null || houseResidentEntityList.size() == 0) { |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("根据居住人查询户主失败"); |
|||
} |
|||
HouseResidentEntity houseResidentEntity = houseResidentEntityList.get(0); |
|||
//根据户主ID组装信息
|
|||
setHouseHeadInfo(houseResidentEntity.getHouseHeadId(), epdcScreenSelectPeopleDetailResultDTO); |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().ok(epdcScreenSelectPeopleDetailResultDTO); |
|||
} |
|||
return new Result<EpdcScreenSelectPeopleDetailResultDTO>().error("查询错误:身份标识参数无法匹配"); |
|||
} |
|||
|
|||
private void setHouseHeadInfo(String houseHeadId, EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO) { |
|||
//如果是户主,人口信息从人口表拿
|
|||
PopulationInformationEntity populationInformationEntity = this.selectById(houseHeadId); |
|||
epdcScreenSelectPeopleDetailResultDTO.setName(populationInformationEntity.getResidentsName()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setSex("0".equals(populationInformationEntity.getResidentsSex()) ? "女" : "男"); |
|||
epdcScreenSelectPeopleDetailResultDTO.setDogStatus("0".equals(populationInformationEntity.getDogStatus()) ? "无" : "有"); |
|||
if (IdentityNoUtils.IdentityNoVerification(populationInformationEntity.getResidentsIdentityNo()) == null) { |
|||
epdcScreenSelectPeopleDetailResultDTO.setAge(IdentityNoUtils.getAge(populationInformationEntity.getResidentsIdentityNo()) + ""); |
|||
} else { |
|||
epdcScreenSelectPeopleDetailResultDTO.setAge(""); |
|||
} |
|||
epdcScreenSelectPeopleDetailResultDTO.setPhone(populationInformationEntity.getResidentsPhone()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setFamilyCategory(populationInformationEntity.getFamilyCategory()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setEmploymentStatus(populationInformationEntity.getEmploymentStatus()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setEducationLevel(populationInformationEntity.getEducationLevel()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setPoliticsStatus(populationInformationEntity.getPoliticsStatus()); |
|||
epdcScreenSelectPeopleDetailResultDTO.setMotorVehicleNum(String.valueOf(populationInformationEntity.getMotorVehicleNum())); |
|||
//根据字典信息赋值
|
|||
//获取字典信息
|
|||
SysPopulationSimpleDictFormDTO sysPopulationSimpleDictFormDTO = new SysPopulationSimpleDictFormDTO(); |
|||
List<String> dicTypes = new ArrayList<>(); |
|||
Collections.addAll(dicTypes, PopulationDictConstant.ACCOUNT_TYPE, PopulationDictConstant.BODY_STATUS, PopulationDictConstant.EDUCATION_LEVEL |
|||
, PopulationDictConstant.EMPLOYMENT_STATUS, PopulationDictConstant.FAMILY_CATEGORY, PopulationDictConstant.GENDER, PopulationDictConstant.HELP_STATUS, PopulationDictConstant.MARITAL_STATUS |
|||
, PopulationDictConstant.MOTOR_VEHICLE_CATEGORY, PopulationDictConstant.POLITICS_STATUS, PopulationDictConstant.UNEMPLOYMENT_REASON); |
|||
sysPopulationSimpleDictFormDTO.setDicTypes(dicTypes); |
|||
Result<List<SysPopulationSimpleDictDTO>> listResult = adminFeignClient.listPopulationSimple(sysPopulationSimpleDictFormDTO); |
|||
if (listResult == null || !listResult.success()) { |
|||
throw new RenException("获取字典失败!"); |
|||
} |
|||
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|||
String educationLevel = epdcScreenSelectPeopleDetailResultDTO.getEducationLevel(); |
|||
String politicsStatus = epdcScreenSelectPeopleDetailResultDTO.getPoliticsStatus(); |
|||
String employmentStatus = epdcScreenSelectPeopleDetailResultDTO.getEmploymentStatus(); |
|||
String familyCategory = epdcScreenSelectPeopleDetailResultDTO.getFamilyCategory(); |
|||
try { |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS, epdcScreenSelectPeopleDetailResultDTO, "educationLevel", educationLevel, PopulationDictConstant.EDUCATION_LEVEL); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS, epdcScreenSelectPeopleDetailResultDTO, "politicsStatus", politicsStatus, PopulationDictConstant.POLITICS_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS, epdcScreenSelectPeopleDetailResultDTO, "employmentStatus", employmentStatus, PopulationDictConstant.EMPLOYMENT_STATUS); |
|||
setDicNameByValue(sysPopulationSimpleDictDTOS, epdcScreenSelectPeopleDetailResultDTO, "familyCategory", familyCategory, PopulationDictConstant.FAMILY_CATEGORY); |
|||
} catch (Exception e) { |
|||
throw new RenException("根据字典赋值出错!"); |
|||
} |
|||
//房屋信息
|
|||
List<HousingInformationDTO> housingInformationDTOList = housingInformationService.getHouseInfoByHouseHeadID(houseHeadId); |
|||
List<HousingInfo> housingInfoList = ConvertUtils.sourceToTarget(housingInformationDTOList, HousingInfo.class); |
|||
housingInfoList.forEach(housingInfo -> { |
|||
setHouseUse(housingInfo.getHouseUse(), housingInfo); |
|||
}); |
|||
epdcScreenSelectPeopleDetailResultDTO.setHousingInfo(housingInfoList); |
|||
//居住人信息
|
|||
List<FamilyMember> familyMemberList = new ArrayList<>(); |
|||
Set<String> houseHeadIds = new HashSet<>(1); |
|||
houseHeadIds.add(houseHeadId); |
|||
List<BaseResidentInformationExportDto> baseResidentInformationExportDtos = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|||
baseResidentInformationExportDtos.forEach(a -> { |
|||
FamilyMember familyMember = new FamilyMember(); |
|||
familyMember.setName(a.getResidentsName()); |
|||
familyMember.setCurrentAddress(a.getCurrentAddress()); |
|||
switch (a.getHouseHeadRelation()) { |
|||
case HouseHeadRelationConstant.CHILDREN: |
|||
familyMember.setRelation("子女"); |
|||
break; |
|||
case HouseHeadRelationConstant.HUSBAND_AND_WIFE: |
|||
familyMember.setRelation("夫妻"); |
|||
break; |
|||
case HouseHeadRelationConstant.PARENT: |
|||
familyMember.setRelation("父母"); |
|||
break; |
|||
case HouseHeadRelationConstant.OTHER: |
|||
familyMember.setRelation("其他"); |
|||
break; |
|||
default: |
|||
familyMember.setRelation(""); |
|||
break; |
|||
} |
|||
familyMemberList.add(familyMember); |
|||
}); |
|||
epdcScreenSelectPeopleDetailResultDTO.setFamilyMember(familyMemberList); |
|||
} |
|||
|
|||
private static Object checkNull(Object obj) { |
|||
Class<? extends Object> clazz = obj.getClass(); |
|||
// 获取实体类的所有属性,返回Field数组
|
|||
Field[] fields = clazz.getDeclaredFields(); |
|||
for (Field field : fields) { |
|||
// 可访问私有变量
|
|||
field.setAccessible(true); |
|||
// 获取属性类型
|
|||
String type = field.getGenericType().toString(); |
|||
// 如果type是类类型,则前面包含"class ",后面跟类名
|
|||
if ("class java.lang.String".equals(type)) { |
|||
// 将属性的首字母大写
|
|||
String methodName = field.getName().replaceFirst(field.getName().substring(0, 1), |
|||
field.getName().substring(0, 1).toUpperCase()); |
|||
try { |
|||
Method methodGet = clazz.getMethod("get" + methodName); |
|||
// 调用getter方法获取属性值
|
|||
String str = (String) methodGet.invoke(obj); |
|||
if (StringUtils.isBlank(str)) { |
|||
// 如果为null的String类型的属性则重新复制为空字符串
|
|||
field.set(obj, field.getType().getConstructor(field.getType()).newInstance("")); |
|||
} |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
return obj; |
|||
} |
|||
|
|||
/** |
|||
* @param column 实体类的属性名 |
|||
* @param columnValue 实体类的属性值 |
|||
* @param dicType 字典的类型 |
|||
* @return java.lang.String |
|||
* @Description 根据字典值匹配键 |
|||
* @Author songyunpeng |
|||
* @Date 2020/9/8 |
|||
* @Param [sysPopulationSimpleDictDTOS, basePopulationInformationExportDto, column] |
|||
**/ |
|||
private void setDicNameByValue(List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS, EpdcScreenSelectPeopleDetailResultDTO epdcScreenSelectPeopleDetailResultDTO, String column, String columnValue, String dicType) throws IntrospectionException, InvocationTargetException, IllegalAccessException { |
|||
if (StringUtils.isNotBlank(columnValue)) { |
|||
a: |
|||
for (SysPopulationSimpleDictDTO sysPopulationSimpleDictDTO : sysPopulationSimpleDictDTOS) { |
|||
if (dicType.equals(sysPopulationSimpleDictDTO.getDicType())) { |
|||
List<SysSimpleDictDTO> sysSimpleDicts = sysPopulationSimpleDictDTO.getSysSimpleDicts(); |
|||
for (SysSimpleDictDTO sysSimpleDict : sysSimpleDicts) { |
|||
if (columnValue.equals(sysSimpleDict.getDictValue())) { |
|||
Class basePopulationInformationExportDtoClass = epdcScreenSelectPeopleDetailResultDTO.getClass(); |
|||
PropertyDescriptor pd = new PropertyDescriptor(column, basePopulationInformationExportDtoClass); |
|||
Method wM = pd.getWriteMethod();//获得写方法
|
|||
wM.invoke(epdcScreenSelectPeopleDetailResultDTO, sysSimpleDict.getDictName()); |
|||
break a; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public Result<EpdcScreenHouseUseResultDTO> housingUse() { |
|||
EpdcScreenHouseUseResultDTO epdcScreenHouseUseResultDTO = baseDao.selectHouseUseDataForScreen(); |
|||
PopulationInfoOverviewDTO populationInfoOverview = this.getPopulationInfoOverview(); |
|||
epdcScreenHouseUseResultDTO.setHouseNum(populationInfoOverview.getHouseNum()); |
|||
epdcScreenHouseUseResultDTO.setPopulationNum(populationInfoOverview.getPopulationNum()); |
|||
epdcScreenHouseUseResultDTO.setMotorVehicleNum(populationInfoOverview.getMotorVehicleNum()); |
|||
epdcScreenHouseUseResultDTO.setPopulationNum(populationInfoOverview.getPopulationNum()); |
|||
epdcScreenHouseUseResultDTO.setEnterpriseNum(populationInfoOverview.getBusiness()); |
|||
return new Result<EpdcScreenHouseUseResultDTO>().ok(epdcScreenHouseUseResultDTO); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<EpdcScreenGridRankingResultDTO> gridRanking(EpdcScreenGridRankingFormDTO dto) { |
|||
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|||
dto.setPageIndex(pageIndex); |
|||
List<EpdcScreenGridRankingResultDTO> list = baseDao.selectListGridRanking(dto); |
|||
return new PageData<>(list, baseDao.selectCountListGridRanking(dto)); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto) { |
|||
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|||
dto.setPageIndex(pageIndex); |
|||
List<EpdcScreenHouseInfoByPeopleResultDTO> list = baseDao.selectHouseByPeople(dto); |
|||
return new PageData<>(list, baseDao.selectCountHouseByPeople(dto)); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto) { |
|||
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|||
dto.setPageIndex(pageIndex); |
|||
List<EpdcScreenPopulationInfoByHouseResultDTO> list = baseDao.selectPeopleByHouse(dto); |
|||
return new PageData<>(list, baseDao.selectCountPeopleByHouse(dto)); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto) { |
|||
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|||
dto.setPageIndex(pageIndex); |
|||
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> list = baseDao.selectPeopleByCurrentAddress(dto); |
|||
return new PageData<>(list, baseDao.selectCountPeopleByCurrentAddress(dto)); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params) { |
|||
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO(); |
|||
int pageIndex = (Integer.parseInt(params.get("page") + "") - NumConstant.ONE) * Integer.parseInt(params.get("limit") + ""); |
|||
formDTO.setPageIndex(pageIndex); |
|||
formDTO.setPageSize(Integer.parseInt(params.get("limit") + "")); |
|||
formDTO.setCurrentAddress(params.get("houseAddress") == null ? null : String.valueOf(params.get("houseAddress"))); |
|||
formDTO.setResidentName(params.get("residentName") == null ? null : String.valueOf(params.get("residentName"))); |
|||
return baseDao.selectPeopleByCurrentAddress(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params) { |
|||
return baseDao.selectPeopleByCurrentAddressExportList(params); |
|||
} |
|||
|
|||
@Override |
|||
public Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params) { |
|||
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO(); |
|||
int pageIndex = (Integer.parseInt(params.get("page") + "") - NumConstant.ONE) * Integer.parseInt(params.get("limit") + ""); |
|||
formDTO.setPageIndex(pageIndex); |
|||
formDTO.setPageSize(Integer.parseInt(params.get("limit") + "")); |
|||
formDTO.setCurrentAddress(params.get("houseAddress") == null ? null : String.valueOf(params.get("houseAddress"))); |
|||
formDTO.setResidentName(params.get("residentName") == null ? null : String.valueOf(params.get("residentName"))); |
|||
return baseDao.selectCountPeopleByCurrentAddress(formDTO); |
|||
} |
|||
|
|||
private void setHouseUse(String houseUse, HousingInfo housingInfo) { |
|||
switch (houseUse) { |
|||
case HouseUseConstant.RENT: |
|||
housingInfo.setHouseUse("租赁"); |
|||
break; |
|||
case HouseUseConstant.SINCE_THE_LIVING: |
|||
housingInfo.setHouseUse("自住"); |
|||
break; |
|||
case HouseUseConstant.BUSINESS: |
|||
housingInfo.setHouseUse("经营"); |
|||
break; |
|||
default: |
|||
housingInfo.setHouseUse(""); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.vaccine.vim.enums; |
|||
|
|||
/** |
|||
* 用户性别 枚举类 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/11/18 14:30 |
|||
*/ |
|||
public enum VaccinationStateEnum { |
|||
|
|||
/** |
|||
* 未接种 |
|||
*/ |
|||
VACCINATION_STATE_NOT_START(0), |
|||
|
|||
/** |
|||
* 接种中 |
|||
*/ |
|||
VACCINATION_STATE_UNFINISH(1), |
|||
|
|||
/** |
|||
* 接种完成 |
|||
*/ |
|||
VACCINATION_STATE_FINISH(2); |
|||
|
|||
private int state; |
|||
|
|||
VaccinationStateEnum(int state) { |
|||
this.state = state; |
|||
} |
|||
|
|||
public int state() { |
|||
return state; |
|||
} |
|||
} |
|||
Binary file not shown.
@ -0,0 +1,46 @@ |
|||
<?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.vaccine.house.dao.HouseBusinessInfoDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.vaccine.house.entity.HouseBusinessInfoEntity" id="houseBusinessInfoMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="enterpriseName" column="ENTERPRISE_NAME"/> |
|||
<result property="socialUniformCode" column="SOCIAL_UNIFORM_CODE"/> |
|||
<result property="legalRepresentative" column="LEGAL_REPRESENTATIVE"/> |
|||
<result property="enterprisePhone" column="ENTERPRISE_PHONE"/> |
|||
<result property="houseId" column="HOUSE_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<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"/> |
|||
</resultMap> |
|||
<select id="selectHouseBusinessInfoDTO" resultType="com.elink.esua.epdc.dto.house.HouseBusinessInfoDTO"> |
|||
select |
|||
t.ID,t.ENTERPRISE_NAME,t.SOCIAL_UNIFORM_CODE,t.LEGAL_REPRESENTATIVE,t.ENTERPRISE_PHONE, |
|||
substring_index(t1.ALL_DEPT_NAMES,'-',-1) as gridName |
|||
from epdc_house_business_info t |
|||
left join epdc_housing_information t1 on t.HOUSE_ID = t1.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' |
|||
<if test="streetId != '' and streetId != null"> |
|||
AND (find_in_set(#{streetId},t1.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{streetId},t1.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="communityId != '' and communityId != null"> |
|||
AND (find_in_set(#{communityId},t1.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{communityId},t1.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="gridId != '' and gridId != null"> |
|||
and (t1.grid_id = #{gridId} |
|||
OR find_in_set(#{gridId},t1.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="enterpriseName!= null and enterpriseName != '' ">and t.ENTERPRISE_NAME like concat('%',#{enterpriseName},'%') </if> |
|||
<if test="socialUniformCode != null and socialUniformCode != '' ">and t.SOCIAL_UNIFORM_CODE like concat('%',#{socialUniformCode},'%') </if> |
|||
<if test="legalRepresentative != null and legalRepresentative != '' ">and t.LEGAL_REPRESENTATIVE like concat('%',#{legalRepresentative},'%') </if> |
|||
order by t.CREATED_TIME desc |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,21 @@ |
|||
<?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.vaccine.house.dao.HouseRentInfoDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.vaccine.house.entity.HouseRentInfoEntity" id="houseRentInfoMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="tenantName" column="TENANT_NAME"/> |
|||
<result property="tenantPhone" column="TENANT_PHONE"/> |
|||
<result property="tenantIdentityNo" column="TENANT_IDENTITY_NO"/> |
|||
<result property="houseId" column="HOUSE_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<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"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,65 @@ |
|||
<?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.vaccine.house.dao.HouseResidentDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity" id="houseResidentMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="houseId" column="HOUSE_ID"/> |
|||
<result property="residentId" column="RESIDENT_ID"/> |
|||
<result property="houseHeadRelation" column="HOUSE_HEAD_RELATION"/> |
|||
<result property="isHouseHead" column="IS_HOUSE_HEAD"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<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"/> |
|||
</resultMap> |
|||
<select id="selectListOfPopulationInformationDTO" |
|||
resultType="com.elink.esua.epdc.dto.house.PopulationInformationDTO"> |
|||
select |
|||
t1.ID, |
|||
t.RESIDENTS_NAME, |
|||
t.RESIDENTS_SEX, |
|||
t.RESIDENTS_NATION, |
|||
t.RESIDENTS_BIRTHDAY, |
|||
t.EDUCATION_LEVEL, |
|||
t.POLITICS_STATUS, |
|||
t.RESIDENTS_IDENTITY_NO, |
|||
t.RESIDENTS_PHONE, |
|||
t.CURRENT_EMPLOYER, |
|||
t.CURRENT_ADDRESS, |
|||
t1.HOUSE_HEAD_RELATION, |
|||
t1.HOUSE_HEAD_ID |
|||
from epdc_population_information t left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD = '0' and t1.HOUSE_HEAD_ID = #{houseHeadId} |
|||
order by t1.CREATED_TIME desc |
|||
</select> |
|||
<select id="selectByHouseResidentId" resultType="com.elink.esua.epdc.dto.house.PopulationInformationDTO"> |
|||
select |
|||
t1.ID, |
|||
t.RESIDENTS_NAME, |
|||
t.RESIDENTS_SEX, |
|||
t.RESIDENTS_NATION, |
|||
t.RESIDENTS_BIRTHDAY, |
|||
t.EDUCATION_LEVEL, |
|||
t.POLITICS_STATUS, |
|||
t.RESIDENTS_IDENTITY_NO, |
|||
t.RESIDENTS_PHONE, |
|||
t.CURRENT_EMPLOYER, |
|||
t.CURRENT_ADDRESS, |
|||
t1.HOUSE_HEAD_RELATION, |
|||
t.ID as residentId, |
|||
t1.HOUSE_HEAD_ID |
|||
from epdc_population_information t left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD = '0' and t1.ID = #{id} |
|||
</select> |
|||
<select id="getHouseResidentInfoByResidentId" |
|||
resultType="com.elink.esua.epdc.vaccine.house.entity.HouseResidentEntity"> |
|||
select * from epdc_house_resident where RESIDENT_ID = #{residentId} and DEL_FLAG ='0' |
|||
and IS_HOUSE_HEAD = '0' limit 1 |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,201 @@ |
|||
<?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.vaccine.house.dao.HousingInformationDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.vaccine.house.entity.HousingInformationEntity" id="housingInformationMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="houseAddress" column="HOUSE_ADDRESS"/> |
|||
<result property="buyingTime" column="BUYING_TIME"/> |
|||
<result property="houseArea" column="HOUSE_AREA"/> |
|||
<result property="propertyOwner" column="PROPERTY_OWNER"/> |
|||
<result property="propertyOwnerIdentityNo" column="PROPERTY_OWNER_IDENTITY_NO"/> |
|||
<result property="propertyOwnerMobile" column="PROPERTY_OWNER_MOBILE"/> |
|||
<result property="houseUse" column="HOUSE_USE"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<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="gridId" column="GRID_ID"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
</resultMap> |
|||
<select id="selectListOfHousingInformationDTO" resultType="com.elink.esua.epdc.dto.house.HousingInformationDTO"> |
|||
select t.ID, |
|||
t.HOUSE_ADDRESS, |
|||
t.BUYING_TIME, |
|||
t.HOUSE_AREA, |
|||
t.PROPERTY_OWNER, |
|||
t.PROPERTY_OWNER_IDENTITY_NO, |
|||
t.PROPERTY_OWNER_CARD, |
|||
t.PROPERTY_OWNER_MOBILE, |
|||
t.HOUSE_USE, |
|||
t.DEL_FLAG, |
|||
t.REVISION, |
|||
t.CREATED_BY, |
|||
t.CREATED_TIME, |
|||
t.UPDATED_BY, |
|||
t.UPDATED_TIME, |
|||
t.GRID_ID, |
|||
t.PARENT_DEPT_IDS, |
|||
t.PARENT_DEPT_NAMES, |
|||
t.ALL_DEPT_IDS, |
|||
t.ALL_DEPT_NAMES, |
|||
SUBSTRING_INDEX(t.ALL_DEPT_NAMES, '-', -1) as gridName |
|||
from epdc_housing_information t |
|||
where DEL_FLAG = '0' |
|||
<if test="houseAddress != '' and houseAddress != null">and t.HOUSE_ADDRESS like concat('%',#{houseAddress},'%') </if> |
|||
<if test="propertyOwner != '' and propertyOwner != null">and t.PROPERTY_OWNER like concat('%',#{propertyOwner},'%')</if> |
|||
<if test="propertyOwnerMobile != '' and propertyOwnerMobile != null">and t.PROPERTY_OWNER_MOBILE like concat('%',#{propertyOwnerMobile},'%')</if> |
|||
<if test="houseUse != '' and houseUse != null">and t.HOUSE_USE = #{houseUse}</if> |
|||
<if test="streetId != '' and streetId != null"> |
|||
AND (find_in_set(#{streetId},t.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{streetId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="communityId != '' and communityId != null"> |
|||
AND (find_in_set(#{communityId},t.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{communityId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="gridId != '' and gridId != null"> |
|||
and (t.grid_id = #{gridId} |
|||
OR find_in_set(#{gridId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
order by CREATED_TIME desc |
|||
</select> |
|||
<select id="selectByIdAndUsed" resultType="com.elink.esua.epdc.dto.house.HousingInformationDTO"> |
|||
select t.ID, |
|||
t.HOUSE_ADDRESS, |
|||
t.BUYING_TIME, |
|||
t.HOUSE_AREA, |
|||
t.PROPERTY_OWNER, |
|||
t.PROPERTY_OWNER_IDENTITY_NO, |
|||
t.PROPERTY_OWNER_MOBILE, |
|||
t.PROPERTY_OWNER_CARD, |
|||
t.GRID_ID, |
|||
SUBSTRING_INDEX(t.ALL_DEPT_NAMES, '-', -1) as gridName, |
|||
<if test="used != '' and used != null and used == '1'.toString()"> |
|||
t1.TENANT_NAME,t1.TENANT_PHONE,t1.TENANT_IDENTITY_NO, |
|||
</if> |
|||
<if test="used != '' and used != null and used == '2'.toString()"> |
|||
t1.ENTERPRISE_NAME,t1.SOCIAL_UNIFORM_CODE,t1.LEGAL_REPRESENTATIVE,t1.ENTERPRISE_PHONE, |
|||
</if> |
|||
t.HOUSE_USE |
|||
from epdc_housing_information t |
|||
<if test="used != '' and used != null and used == '1'.toString()"> |
|||
left join epdc_house_rent_Info t1 on t.ID = t1.HOUSE_ID and t1.DEL_FLAG = '0' |
|||
</if> |
|||
<if test="used != '' and used != null and used == '2'.toString()"> |
|||
left join epdc_house_business_info t1 on t.ID = t1.HOUSE_ID and t1.DEL_FLAG = '0' |
|||
</if> |
|||
where t.DEL_FLAG ='0' and t.ID = #{id} |
|||
</select> |
|||
<select id="selectBasePopulationInformationExcelList" |
|||
resultType="com.elink.esua.epdc.dto.house.BasePopulationInformationExportDto"> |
|||
select |
|||
t2.ID, |
|||
t.HOUSE_ADDRESS, |
|||
t.BUYING_TIME, |
|||
t.HOUSE_AREA, |
|||
t.PROPERTY_OWNER, |
|||
t.PROPERTY_OWNER_IDENTITY_NO, |
|||
t.PROPERTY_OWNER_MOBILE, |
|||
t.PROPERTY_OWNER_CARD, |
|||
t.HOUSE_USE, |
|||
SUBSTRING_INDEX(t.ALL_DEPT_NAMES, '-', -1) as gridName, |
|||
t3.TENANT_NAME, |
|||
t3.TENANT_PHONE, |
|||
t3.TENANT_IDENTITY_NO, |
|||
t4.ENTERPRISE_NAME, |
|||
t4.SOCIAL_UNIFORM_CODE, |
|||
t4.LEGAL_REPRESENTATIVE, |
|||
t4.ENTERPRISE_PHONE, |
|||
t2.RESIDENTS_NAME, |
|||
t2.RESIDENTS_SEX, |
|||
t2.RESIDENTS_NATION, |
|||
t2.RESIDENTS_BIRTHDAY, |
|||
t2.EDUCATION_LEVEL, |
|||
t2.POLITICS_STATUS, |
|||
t2.JOIN_TIME, |
|||
t2.ORGANIZATIONAL_RELATIONSHIP_LOCATION, |
|||
t2.RESIDENTS_IDENTITY_NO, |
|||
t2.RESIDENTS_PHONE, |
|||
t2.BODY_STATUS, |
|||
t2.MARITAL_STATUS, |
|||
t2.ACCOUNT_TYPE, |
|||
t2.MILITARY_SERVICE, |
|||
t2.HOUSEHOLD_REGISTRATION_PLACE, |
|||
t2.EMPLOYMENT_STATUS, |
|||
t2.CURRENT_EMPLOYER, |
|||
t2.CURRENT_EMPLOYER_ADDRESS, |
|||
t2.UNEMPLOYMENT_REASON, |
|||
t2.REEMPLOYMENT_PERMIT, |
|||
t2.UNEMPLOYMENT_REGISTER, |
|||
t2.UNEMPLOYMENT_REGISTER_TIME, |
|||
t2.FAMILY_CATEGORY, |
|||
t2.HELP_STATUS, |
|||
t2.MOTOR_VEHICLE_NUM, |
|||
t2.MOTOR_VEHICLE_CATEGORY, |
|||
t2.DOG_STATUS |
|||
from epdc_housing_information t |
|||
left join epdc_house_resident t1 on t1.HOUSE_ID = t.ID and t1.DEL_FLAG = '0' |
|||
left join epdc_population_information t2 on t1.RESIDENT_ID = t2.ID and t2.DEL_FLAG = '0' and t2.RESIDENTS_IDENTITY_NO != '' and t2.RESIDENTS_IDENTITY_NO is not null |
|||
left join epdc_house_rent_info t3 on t.ID = t3.HOUSE_ID and t3.DEL_FLAG = '0' |
|||
left join epdc_house_business_info t4 on t.ID = t4.HOUSE_ID and t4.DEL_FLAG = '0' |
|||
where t.DEL_FLAG = '0' |
|||
<if test="houseAddress != '' and houseAddress != null">and t.HOUSE_ADDRESS like concat('%',#{houseAddress},'%') </if> |
|||
<if test="propertyOwner != '' and propertyOwner != null">and t.PROPERTY_OWNER like concat('%',#{propertyOwner},'%')</if> |
|||
<if test="propertyOwnerMobile != '' and propertyOwnerMobile != null">and t.PROPERTY_OWNER_MOBILE like concat('%',#{propertyOwnerMobile},'%')</if> |
|||
<if test="houseUse != '' and houseUse != null">and t.HOUSE_USE = #{houseUse}</if> |
|||
<if test="streetId != '' and streetId != null"> |
|||
AND (find_in_set(#{streetId},t.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{streetId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="communityId != '' and communityId != null"> |
|||
AND (find_in_set(#{communityId},t.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{communityId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="gridId != '' and gridId != null"> |
|||
and (t.grid_id = #{gridId} |
|||
OR find_in_set(#{gridId},t.ALL_DEPT_IDS)) |
|||
</if> |
|||
order by t.CREATED_TIME desc |
|||
</select> |
|||
<select id="selectBaseResidentInformationExcelList" |
|||
resultType="com.elink.esua.epdc.dto.house.BaseResidentInformationExportDto"> |
|||
select t2.RESIDENTS_NAME as houseHeadName,t2.RESIDENTS_IDENTITY_NO,t1.RESIDENTS_NAME,t.HOUSE_HEAD_RELATION,t1.RESIDENTS_SEX,t1.RESIDENTS_NATION,t1.CURRENT_EMPLOYER,t1.CURRENT_ADDRESS |
|||
from epdc_house_resident t |
|||
left join epdc_population_information t1 on t.RESIDENT_ID = t1.ID |
|||
left join epdc_population_information t2 on t.HOUSE_HEAD_ID = t2.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG = '0' and t2.DEL_FLAG ='0' |
|||
and t.HOUSE_HEAD_ID in |
|||
<foreach collection="houseHeadIds" index="index" item="houseHeadId" open="(" separator="," close=")"> |
|||
#{houseHeadId} |
|||
</foreach> |
|||
order by t.CREATED_TIME desc |
|||
</select> |
|||
<select id="getHouseInfoByHouseHeadID" resultType="com.elink.esua.epdc.dto.house.HousingInformationDTO"> |
|||
select t.HOUSE_ADDRESS,t.HOUSE_AREA,t.HOUSE_USE,t.PROPERTY_OWNER,t.PROPERTY_OWNER_MOBILE |
|||
from epdc_housing_information t |
|||
left join epdc_house_resident t1 on t1.HOUSE_ID = t.ID and t1.DEL_FLAG = '0' |
|||
where t.DEL_FLAG ='0' and t1.RESIDENT_ID = #{houseHeadId} and t1.IS_HOUSE_HEAD = '1' |
|||
|
|||
</select> |
|||
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.house.HousingInformationDTO"> |
|||
SELECT |
|||
ID, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES |
|||
FROM |
|||
epdc_housing_information |
|||
WHERE |
|||
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,696 @@ |
|||
<?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.vaccine.house.dao.PopulationInformationDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity" |
|||
id="populationInformationMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="residentsName" column="RESIDENTS_NAME"/> |
|||
<result property="residentsSex" column="RESIDENTS_SEX"/> |
|||
<result property="residentsNation" column="RESIDENTS_NATION"/> |
|||
<result property="residentsBirthday" column="RESIDENTS_BIRTHDAY"/> |
|||
<result property="educationLevel" column="EDUCATION_LEVEL"/> |
|||
<result property="politicsStatus" column="POLITICS_STATUS"/> |
|||
<result property="joinTime" column="JOIN_TIME"/> |
|||
<result property="organizationalRelationshipLocation" column="ORGANIZATIONAL_RELATIONSHIP_LOCATION"/> |
|||
<result property="residentsIdentityNo" column="RESIDENTS_IDENTITY_NO"/> |
|||
<result property="residentsPhone" column="RESIDENTS_PHONE"/> |
|||
<result property="bodyStatus" column="BODY_STATUS"/> |
|||
<result property="maritalStatus" column="MARITAL_STATUS"/> |
|||
<result property="accountType" column="ACCOUNT_TYPE"/> |
|||
<result property="militaryService" column="MILITARY_SERVICE"/> |
|||
<result property="householdRegistrationPlace" column="HOUSEHOLD_REGISTRATION_PLACE"/> |
|||
<result property="employmentStatus" column="EMPLOYMENT_STATUS"/> |
|||
<result property="currentEmployer" column="CURRENT_EMPLOYER"/> |
|||
<result property="currentEmployerAddress" column="CURRENT_EMPLOYER_ADDRESS"/> |
|||
<result property="unemploymentReason" column="UNEMPLOYMENT_REASON"/> |
|||
<result property="reemploymentPermit" column="REEMPLOYMENT_PERMIT"/> |
|||
<result property="unemploymentRegister" column="UNEMPLOYMENT_REGISTER"/> |
|||
<result property="unemploymentRegisterTime" column="UNEMPLOYMENT_REGISTER_TIME"/> |
|||
<result property="familyCategory" column="FAMILY_CATEGORY"/> |
|||
<result property="helpStatus" column="HELP_STATUS"/> |
|||
<result property="motorVehicleNum" column="MOTOR_VEHICLE_NUM"/> |
|||
<result property="motorVehicleCategory" column="MOTOR_VEHICLE_CATEGORY"/> |
|||
<result property="dogStatus" column="DOG_STATUS"/> |
|||
<result property="familyMemberNum" column="FAMILY_MEMBER_NUM"/> |
|||
<result property="familyMemberOutNum" column="FAMILY_MEMBER_OUT_NUM"/> |
|||
<result property="familyMemberOutReason" column="FAMILY_MEMBER_OUT_REASON"/> |
|||
<result property="familyMemberOutMonth" column="FAMILY_MEMBER_OUT_MONTH"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<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"/> |
|||
</resultMap> |
|||
<update id="setJionTimeToNull"> |
|||
update epdc_population_information |
|||
set JOIN_TIME = null |
|||
where ID = #{id} |
|||
</update> |
|||
<update id="setUnemploymentRegisterTimeToNull"> |
|||
update epdc_population_information |
|||
set UNEMPLOYMENT_REGISTER_TIME = null |
|||
where ID = #{id} |
|||
</update> |
|||
<select id="getInfoByIdentityNo" resultType="com.elink.esua.epdc.vaccine.house.entity.PopulationInformationEntity"> |
|||
select * |
|||
from epdc_population_information |
|||
where RESIDENTS_IDENTITY_NO = #{residentsIdentityNo} |
|||
and DEL_FLAG = '0' limit 1 |
|||
</select> |
|||
<select id="getHouseHeadInfo" resultType="com.elink.esua.epdc.dto.house.PopulationInformationDTO"> |
|||
select t.ID, |
|||
t.RESIDENTS_NAME, |
|||
t.RESIDENTS_SEX, |
|||
t.RESIDENTS_NATION, |
|||
t.RESIDENTS_BIRTHDAY, |
|||
t.EDUCATION_LEVEL, |
|||
t.POLITICS_STATUS, |
|||
t.JOIN_TIME, |
|||
t.ORGANIZATIONAL_RELATIONSHIP_LOCATION, |
|||
t.RESIDENTS_IDENTITY_NO, |
|||
t.RESIDENTS_PHONE, |
|||
t.BODY_STATUS, |
|||
t.MARITAL_STATUS, |
|||
t.ACCOUNT_TYPE, |
|||
t.MILITARY_SERVICE, |
|||
t.HOUSEHOLD_REGISTRATION_PLACE, |
|||
t.EMPLOYMENT_STATUS, |
|||
t.CURRENT_EMPLOYER, |
|||
t.CURRENT_EMPLOYER_ADDRESS, |
|||
t.UNEMPLOYMENT_REASON, |
|||
t.REEMPLOYMENT_PERMIT, |
|||
t.UNEMPLOYMENT_REGISTER, |
|||
t.UNEMPLOYMENT_REGISTER_TIME, |
|||
t.FAMILY_CATEGORY, |
|||
t.HELP_STATUS, |
|||
t.MOTOR_VEHICLE_NUM, |
|||
t.MOTOR_VEHICLE_CATEGORY, |
|||
t.DOG_STATUS, |
|||
t.CURRENT_ADDRESS, |
|||
t1.HOUSE_ID as houseId |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID |
|||
where t.DEL_FLAG = '0' |
|||
and t1.DEL_FLAG = '0' |
|||
and t1.IS_HOUSE_HEAD = '1' |
|||
and t1.HOUSE_ID = #{houseId} limit 1 |
|||
</select> |
|||
<select id="selectListOfPopulationInformationDTO" |
|||
resultType="com.elink.esua.epdc.dto.house.PopulationInformationDTO"> |
|||
select |
|||
t.ID,t.RESIDENTS_NAME,t.RESIDENTS_SEX,t.RESIDENTS_PHONE,t.RESIDENTS_IDENTITY_NO,t.RESIDENTS_NATION,t.HOUSEHOLD_REGISTRATION_PLACE, |
|||
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as |
|||
gridNames,t.HELP_STATUS,t.FAMILY_CATEGORY,group_concat(t2.HOUSE_ADDRESS) as houseAddress, |
|||
CASE t.VACCINATION_STATE |
|||
WHEN 0 THEN '未接种' |
|||
WHEN 1 THEN '接种中' |
|||
WHEN 2 THEN '接种完成' |
|||
ELSE '' END VACCINATION_STATE, |
|||
CASE t.CHECK_STATE |
|||
WHEN 0 THEN '已检测' |
|||
WHEN 1 THEN '未检测' |
|||
ELSE '' END CHECK_STATE, |
|||
t.CHECK_DATE |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join epdc_housing_information t2 on t1.HOUSE_ID = t2.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t2.DEL_FLAG ='0' and t.RESIDENTS_IDENTITY_NO is not null and |
|||
t.RESIDENTS_IDENTITY_NO != '' |
|||
<if test="streetId != '' and streetId != null"> |
|||
AND (find_in_set(#{streetId},t2.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{streetId},t2.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="communityId != '' and communityId != null"> |
|||
AND (find_in_set(#{communityId},t2.PARENT_DEPT_IDS) |
|||
OR find_in_set(#{communityId},t2.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="gridId != '' and gridId != null"> |
|||
and (t2.grid_id = #{gridId} |
|||
OR find_in_set(#{gridId},t2.ALL_DEPT_IDS)) |
|||
</if> |
|||
<if test="residentsName != '' and residentsName != null">and t.RESIDENTS_NAME like |
|||
concat('%',#{residentsName},'%') |
|||
</if> |
|||
<if test="residentsPhone != '' and residentsPhone != null">and t.RESIDENTS_PHONE like |
|||
concat('%',#{residentsPhone},'%') |
|||
</if> |
|||
<if test="residentsIdentityNo != '' and residentsIdentityNo != null">and t.RESIDENTS_IDENTITY_NO like |
|||
concat('%',#{residentsIdentityNo},'%') |
|||
</if> |
|||
<if test="familyCategory != '' and familyCategory != null">and FAMILY_CATEGORY = #{familyCategory}</if> |
|||
<if test="helpStatus != '' and helpStatus != null">and HELP_STATUS = #{helpStatus}</if> |
|||
group by t.ID |
|||
order by t.CREATED_TIME desc |
|||
</select> |
|||
<resultMap type="com.elink.esua.epdc.dto.house.PopulationInformationDTO" id="populationInformationMap2"> |
|||
<result property="id" column="ID"/> |
|||
<result property="residentsName" column="RESIDENTS_NAME"/> |
|||
<result property="residentsSex" column="RESIDENTS_SEX"/> |
|||
<result property="residentsNation" column="RESIDENTS_NATION"/> |
|||
<result property="residentsIdentityNo" column="RESIDENTS_IDENTITY_NO"/> |
|||
<result property="residentsPhone" column="RESIDENTS_PHONE"/> |
|||
<result property="householdRegistrationPlace" column="HOUSEHOLD_REGISTRATION_PLACE"/> |
|||
<collection property="housingInformationList" ofType="com.elink.esua.epdc.dto.house.HousingInformationDTO"> |
|||
<result property="houseAddress" column="HOUSE_ADDRESS"/> |
|||
<result property="propertyOwner" column="PROPERTY_OWNER"/> |
|||
<result property="propertyOwnerIdentityNo" column="PROPERTY_OWNER_IDENTITY_NO"/> |
|||
<result property="propertyOwnerMobile" column="PROPERTY_OWNER_MOBILE"/> |
|||
<result property="gridName" column="gridName"/> |
|||
</collection> |
|||
</resultMap> |
|||
<select id="selectDetailOfPopulationInformationDTO" resultMap="populationInformationMap2"> |
|||
select t.ID, |
|||
t.RESIDENTS_NAME, |
|||
t.RESIDENTS_SEX, |
|||
t.RESIDENTS_PHONE, |
|||
t.RESIDENTS_IDENTITY_NO, |
|||
t.RESIDENTS_NATION, |
|||
t.HOUSEHOLD_REGISTRATION_PLACE, |
|||
substring_index(t2.ALL_DEPT_NAMES, '-', -1) as gridName, |
|||
t2.HOUSE_ADDRESS, |
|||
t2.PROPERTY_OWNER, |
|||
t2.PROPERTY_OWNER_IDENTITY_NO, |
|||
t2.PROPERTY_OWNER_MOBILE |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join epdc_housing_information t2 on t1.HOUSE_ID = t2.ID |
|||
where t.DEL_FLAG = '0' |
|||
and t1.DEL_FLAG = '0' |
|||
and t2.DEL_FLAG = '0' |
|||
and t.ID = #{id}; |
|||
</select> |
|||
<select id="motorVehiclePage" resultType="com.elink.esua.epdc.dto.house.PopulationInformationDTO"> |
|||
select MOTOR_VEHICLE_NUM,MOTOR_VEHICLE_CATEGORY,RESIDENTS_NAME,RESIDENTS_PHONE |
|||
from epdc_population_information |
|||
where DEL_FLAG ='0' and MOTOR_VEHICLE_NUM is not null and MOTOR_VEHICLE_NUM > 0 |
|||
<if test="motorVehicleCategory != '' and motorVehicleCategory != null">and |
|||
find_in_set(#{motorVehicleCategory},MOTOR_VEHICLE_CATEGORY) |
|||
</if> |
|||
<if test="residentsName != '' and residentsName != null">and RESIDENTS_NAME like |
|||
concat('%',#{residentsName},'%') |
|||
</if> |
|||
order by CREATED_TIME desc |
|||
</select> |
|||
<select id="getPopulationInfoOverview" resultType="com.elink.esua.epdc.dto.house.PopulationInfoOverviewDTO"> |
|||
select count(t.HOUSE_USE = '0' or null) as sinceTheLiving, |
|||
count(t.HOUSE_USE = '1' or null) as rent, |
|||
count(t.HOUSE_USE = '2' or null) as business, |
|||
count(t.ID) as houseNum, |
|||
employment, |
|||
unemployment, |
|||
populationNum, |
|||
motorVehicleNum, |
|||
partyMemberNum |
|||
from epdc_housing_information t |
|||
left join( |
|||
select count(EMPLOYMENT_STATUS = '0' or null) as employment, |
|||
count(EMPLOYMENT_STATUS = '1' or null) as unemployment, |
|||
(select (select count(1) as houseHeadNum |
|||
from epdc_population_information |
|||
where DEL_FLAG = 0 |
|||
and RESIDENTS_IDENTITY_NO is not null |
|||
and RESIDENTS_IDENTITY_NO !='') + |
|||
(select count(1) as residentNum from epdc_house_resident t |
|||
left join epdc_population_information t1 on t.RESIDENT_ID = t1.ID |
|||
left join epdc_population_information t2 on t.HOUSE_HEAD_ID = t2.ID |
|||
where t.DEL_FLAG ='0' and t1.DEL_FLAG = '0' and t2.DEL_FLAG ='0' |
|||
order by t.CREATED_TIME desc)) as populationNum, |
|||
sum(MOTOR_VEHICLE_NUM) as motorVehicleNum, |
|||
count(POLITICS_STATUS= '1' or null) as partyMemberNum |
|||
from epdc_population_information |
|||
where DEL_FLAG = 0 and RESIDENTS_IDENTITY_NO is not null and RESIDENTS_IDENTITY_NO != '') a |
|||
on 1=1 |
|||
where t.DEL_FLAG ='0'; |
|||
</select> |
|||
<select id="getPopulationInfoOverviewForScreen" |
|||
resultType="com.elink.esua.epdc.dto.house.PopulationInfoOverviewDTO"> |
|||
select count(t.HOUSE_USE = '0' or null) as sinceTheLiving, |
|||
count(t.HOUSE_USE = '1' or null) as rent, |
|||
count(t.HOUSE_USE = '2' or null) as business, |
|||
count(t.ID) as houseNum, |
|||
employment, |
|||
unemployment, |
|||
populationNum, |
|||
motorVehicleNum, |
|||
partyMemberNum |
|||
from epdc_housing_information t |
|||
left join( |
|||
select count(EMPLOYMENT_STATUS = '0' or null) as employment, |
|||
count(EMPLOYMENT_STATUS = '1' or null) as unemployment, |
|||
(select count(a.ID) |
|||
+ |
|||
(select a.residentNum |
|||
from ( |
|||
SELECT hi.PARENT_DEPT_IDS, |
|||
SUM(t2.num1) as residentNum |
|||
FROM `epdc_housing_information` hi |
|||
LEFT JOIN( |
|||
SELECT hr1.`HOUSE_ID`, SUM(t.num) as num1 |
|||
FROM `epdc_house_resident` hr1 |
|||
LEFT JOIN( |
|||
SELECT hr.`HOUSE_HEAD_ID`, COUNT(hr.`ID`) AS num |
|||
FROM `epdc_house_resident` hr |
|||
WHERE hr.`DEL_FLAG` = '0' |
|||
AND `IS_HOUSE_HEAD` = '0' |
|||
GROUP BY hr.`HOUSE_HEAD_ID` |
|||
ORDER BY COUNT(hr.`ID`) DESC) t on t.HOUSE_HEAD_ID = hr1.`RESIDENT_ID` |
|||
WHERE hr1.`DEL_FLAG` = '0' |
|||
AND hr1.`IS_HOUSE_HEAD` = '1' |
|||
GROUP BY hr1.`HOUSE_ID`) t2 on t2.HOUSE_ID = hi.`ID` |
|||
AND hi.`DEL_FLAG` = '0' |
|||
GROUP BY hi.`PARENT_DEPT_NAMES`) a |
|||
where find_in_set(#{communityId}, a.PARENT_DEPT_IDS))) as populationNum, |
|||
sum(MOTOR_VEHICLE_NUM) as motorVehicleNum, |
|||
count(POLITICS_STATUS = '1' or null) as partyMemberNum |
|||
from epdc_population_information a |
|||
left join epdc_house_resident b on a.ID = b.RESIDENT_ID and b.DEL_FLAG = '0' |
|||
left join epdc_housing_information c on c.ID = b.HOUSE_ID |
|||
where a.DEL_FLAG = 0 |
|||
and b.IS_HOUSE_HEAD = 1 |
|||
and find_in_set(#{communityId}, c.PARENT_DEPT_IDS)) a on 1 = 1 |
|||
where t.DEL_FLAG = '0' |
|||
and find_in_set(#{communityId}, t.PARENT_DEPT_IDS); |
|||
</select> |
|||
<select id="selectListPeople" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenSelectPeopleResultDTO"> |
|||
select |
|||
data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity |
|||
as identityName from ( |
|||
select |
|||
t.RESIDENTS_NAME as name, |
|||
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName, |
|||
1 as identityFlag, |
|||
'户主' as identity, |
|||
'' as houseId, |
|||
t.ID as populationId, |
|||
t.CREATED_TIME |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG = '0' |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0' |
|||
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and |
|||
t1.IS_HOUSE_HEAD ='1' |
|||
<if test="name != null and name != ''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{name}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%') |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(#{communityId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and find_in_set(#{gridId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
group by t.ID |
|||
union all |
|||
select |
|||
t.RESIDENTS_NAME as name, |
|||
t2.gridName, |
|||
2 as identityFlag, |
|||
'居住人' as identity, |
|||
'' as houseId, |
|||
t.ID as populationId, |
|||
t.CREATED_TIME |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join |
|||
(select |
|||
t.ID,group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG ='0' |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0' |
|||
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and |
|||
t1.IS_HOUSE_HEAD ='1' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(#{communityId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and find_in_set(#{gridId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
group by t.ID |
|||
)t2 on t2.ID = t1.HOUSE_HEAD_ID |
|||
where t.DEL_FLAG = '0' and t1.DEL_FLAG ='0' and t2.gridName is not null |
|||
and (t.RESIDENTS_IDENTITY_NO is null or t.RESIDENTS_IDENTITY_NO = '') and t1.IS_HOUSE_HEAD = '0' |
|||
<if test="name != null and name != ''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{name}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%') |
|||
</if> |
|||
group by t.ID)data |
|||
order by CREATED_TIME desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="selectCountListPeople" |
|||
resultType="java.lang.Integer"> |
|||
select count(1) from( |
|||
select |
|||
data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity |
|||
as identityName from ( |
|||
select |
|||
t.RESIDENTS_NAME as name, |
|||
group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName, |
|||
1 as identityFlag, |
|||
'户主' as identity, |
|||
'' as houseId, |
|||
t.ID as populationId, |
|||
t.CREATED_TIME |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG = '0' |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0' |
|||
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and |
|||
t1.IS_HOUSE_HEAD ='1' |
|||
<if test="name != null and name != ''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{name}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%') |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(#{communityId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and find_in_set(#{gridId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
group by t.ID |
|||
union all |
|||
select |
|||
t.RESIDENTS_NAME as name, |
|||
t2.gridName, |
|||
2 as identityFlag, |
|||
'居住人' as identity, |
|||
'' as houseId, |
|||
t.ID as populationId, |
|||
t.CREATED_TIME |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join |
|||
(select |
|||
t.ID,group_concat(DISTINCT substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridName |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID and t1.DEL_FLAG ='0' |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID and t2.DEL_FLAG = '0' |
|||
where t.DEL_FLAG = '0' and t.RESIDENTS_IDENTITY_NO is not null and t.RESIDENTS_IDENTITY_NO != '' and |
|||
t1.IS_HOUSE_HEAD ='1' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(#{communityId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
and find_in_set(#{gridId},t2.ALL_DEPT_IDS) |
|||
</if> |
|||
group by t.ID |
|||
)t2 on t2.ID = t1.HOUSE_HEAD_ID |
|||
where t.DEL_FLAG = '0' and t1.DEL_FLAG ='0' and t2.gridName is not null |
|||
and (t.RESIDENTS_IDENTITY_NO is null or t.RESIDENTS_IDENTITY_NO = '') and t1.IS_HOUSE_HEAD = '0' |
|||
<if test="name != null and name != ''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{name}, '%') |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
and t.RESIDENTS_PHONE like concat('%', #{phone}, '%') |
|||
</if> |
|||
group by t.ID)data |
|||
order by CREATED_TIME desc |
|||
)a |
|||
</select> |
|||
<select id="selectHouseUseDataForScreen" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenHouseUseResultDTO"> |
|||
select count(HOUSE_USE = 0 or null) as sinceTheLivingNumber, |
|||
count(HOUSE_USE = 1 or null) as rentNumber, |
|||
count(HOUSE_USE = 2 or null) as businessNumber, |
|||
ROUND(count(HOUSE_USE = 0 or null) / count(*) * 100) as sinceTheLivingNumberPercent, |
|||
ROUND(count(HOUSE_USE = 1 or null) / count(*) * 100) as rentPercent, |
|||
ROUND(count(HOUSE_USE = 2 or null) / count(*) * 100) as businessPercent |
|||
from epdc_housing_information |
|||
where DEL_FLAG = '0'; |
|||
</select> |
|||
<select id="selectListGridRanking" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenGridRankingResultDTO"> |
|||
<if test="rankCategory!=null and rankCategory == 0"> |
|||
select ifnull(houseHead.houseHeadNum,0)+IFNULL(resident.residentNum,0) as total,houseHead.gridName from( |
|||
select count(1) as houseHeadNum,GRID_ID,gridName from( |
|||
select t2.GRID_ID,substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID |
|||
where t.DEL_FLAG = '0' |
|||
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0' |
|||
and t1.IS_HOUSE_HEAD ='1' |
|||
group by t2.GRID_ID,t.ID)end |
|||
group by end.GRID_ID)houseHead |
|||
left join |
|||
(select count(1) as residentNum,GRID_ID,gridName from( |
|||
select count(1),t3.GRID_ID,substring_index(t3.ALL_DEPT_NAMES,'-',-1) as gridName from |
|||
epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join epdc_house_resident t2 on t1.HOUSE_HEAD_ID = t2.RESIDENT_ID |
|||
left join epdc_housing_information t3 on t3.Id =t2.HOUSE_ID |
|||
where t.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD='0' and t2.DEL_FLAG ='0' and t3.DEL_FLAG ='0' |
|||
group by t3.GRID_ID,t.ID)end |
|||
group by end.GRID_ID)resident on houseHead.GRID_ID = resident.GRID_ID |
|||
order by total desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</if> |
|||
<if test="rankCategory!=null and rankCategory == 1"> |
|||
select substring_index(ALL_DEPT_NAMES,'-',-1)gridName,count(1) as total from epdc_housing_information where |
|||
DEL_FLAG ='0' |
|||
group by GRID_ID |
|||
order by total desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</if> |
|||
</select> |
|||
<select id="selectCountListGridRanking" resultType="java.lang.Integer"> |
|||
<if test="rankCategory!=null and rankCategory == 0"> |
|||
select count(1) from ( |
|||
select ifnull(houseHead.houseHeadNum,0)+IFNULL(resident.residentNum,0) as total,houseHead.gridName from( |
|||
select count(1) as houseHeadNum,GRID_ID,gridName from( |
|||
select t2.GRID_ID,substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName |
|||
from epdc_population_information t |
|||
left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID |
|||
left join epdc_housing_information t2 on t2.ID = t1.HOUSE_ID |
|||
where t.DEL_FLAG = '0' |
|||
and t1.DEL_FLAG = '0' and t2.DEL_FLAG='0' |
|||
and t1.IS_HOUSE_HEAD ='1' |
|||
group by t2.GRID_ID,t.ID)end |
|||
group by end.GRID_ID)houseHead |
|||
left join |
|||
(select count(1) as residentNum,GRID_ID,gridName from( |
|||
select count(1),t3.GRID_ID,substring_index(t3.ALL_DEPT_NAMES,'-',-1) as gridName from |
|||
epdc_population_information t |
|||
left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID |
|||
left join epdc_house_resident t2 on t1.HOUSE_HEAD_ID = t2.RESIDENT_ID |
|||
left join epdc_housing_information t3 on t3.Id =t2.HOUSE_ID |
|||
where t.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD='0' and t2.DEL_FLAG ='0' and t3.DEL_FLAG ='0' |
|||
group by t3.GRID_ID,t.ID)end |
|||
group by end.GRID_ID)resident on houseHead.GRID_ID = resident.GRID_ID |
|||
order by total desc)a |
|||
</if> |
|||
<if test="rankCategory!=null and rankCategory == 1"> |
|||
select count(1) from ( |
|||
select substring_index(ALL_DEPT_NAMES,'-',-1)gridName,count(1) as total from epdc_housing_information where |
|||
DEL_FLAG ='0' |
|||
group by GRID_ID |
|||
order by total desc)a |
|||
</if> |
|||
</select> |
|||
<select id="selectHouseByPeople" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenHouseInfoByPeopleResultDTO"> |
|||
select |
|||
epi.ID as populationId, |
|||
1 as identityFlag, |
|||
epi.RESIDENTS_NAME as houseHeadName, |
|||
substring_index(t.ALL_DEPT_NAMES, '-', -1) gridName, |
|||
t.HOUSE_ADDRESS as houseAddress, |
|||
epi.RESIDENTS_PHONE as houseHeadPhone |
|||
from epdc_housing_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.HOUSE_ID |
|||
left join epdc_population_information epi on ehr.RESIDENT_ID = epi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1' |
|||
and epi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},t.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="houseHeadName!=null and houseHeadName!=''"> |
|||
and epi.RESIDENTS_NAME like concat('%', #{houseHeadName}, '%') |
|||
</if> |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="selectCountHouseByPeople" |
|||
resultType="java.lang.Integer"> |
|||
select |
|||
count(1) |
|||
from epdc_housing_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.HOUSE_ID |
|||
left join epdc_population_information epi on ehr.RESIDENT_ID = epi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1' |
|||
and epi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},t.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="houseHeadName!=null and houseHeadName!=''"> |
|||
and epi.RESIDENTS_NAME like concat('%', #{houseHeadName}, '%') |
|||
</if> |
|||
</select> |
|||
<select id="selectPeopleByHouse" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenPopulationInfoByHouseResultDTO"> |
|||
select |
|||
t.ID as populationId, |
|||
1 as identityFlag, |
|||
t.RESIDENTS_NAME as houseHeadName, |
|||
substring_index(ehi.ALL_DEPT_NAMES, '-', -1) gridName, |
|||
ehi.HOUSE_ADDRESS as houseAddress, |
|||
t.RESIDENTS_PHONE as houseHeadPhone |
|||
from epdc_population_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|||
left join epdc_housing_information ehi on ehr.HOUSE_ID = ehi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1' |
|||
and ehi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},ehi.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="houseAddress!=null and houseAddress!=''"> |
|||
and HOUSE_ADDRESS like concat('%', #{houseAddress}, '%') |
|||
</if> |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
|
|||
</select> |
|||
<select id="selectCountPeopleByHouse" resultType="java.lang.Integer"> |
|||
select |
|||
count(1) |
|||
from epdc_population_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|||
left join epdc_housing_information ehi on ehr.HOUSE_ID = ehi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '1' |
|||
and ehi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},ehi.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="houseAddress!=null and houseAddress!=''"> |
|||
and HOUSE_ADDRESS like concat('%', #{houseAddress}, '%') |
|||
</if> |
|||
</select> |
|||
<select id="selectPeopleByCurrentAddress" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenResidentInfoByCurrentAddressResultDTO"> |
|||
select t.ID as populationId, |
|||
2 as identityFlag, |
|||
t.RESIDENTS_NAME as residentName, |
|||
t.CURRENT_ADDRESS as currentAddress, |
|||
hh.RESIDENTS_NAME as houseHeadName, |
|||
hh.RESIDENTS_PHONE as houseHeadPhone, |
|||
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress |
|||
from epdc_population_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|||
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID |
|||
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID |
|||
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' |
|||
and ehr.IS_HOUSE_HEAD = '0' |
|||
and hh.DEL_FLAG = '0' |
|||
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},ehi.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="currentAddress!=null and currentAddress!=''"> |
|||
and t.CURRENT_ADDRESS like concat('%', #{currentAddress}, '%') |
|||
</if> |
|||
<if test="residentName!=null and residentName!=''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{residentName}, '%') |
|||
</if> |
|||
group by t.ID |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="selectCountPeopleByCurrentAddress" resultType="java.lang.Integer"> |
|||
select count(1) from ( |
|||
select t.ID as populationId, |
|||
2 as identityFlag, |
|||
t.RESIDENTS_NAME as residentName, |
|||
t.CURRENT_ADDRESS as currentAddress, |
|||
hh.RESIDENTS_NAME as houseHeadName, |
|||
hh.RESIDENTS_PHONE as houseHeadPhone, |
|||
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress |
|||
from epdc_population_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|||
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID |
|||
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID |
|||
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' |
|||
and ehr.IS_HOUSE_HEAD = '0' |
|||
and hh.DEL_FLAG = '0' |
|||
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0' |
|||
<if test="communityId != null and communityId != ''"> |
|||
and find_in_set(${communityId},ehi.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="currentAddress!=null and currentAddress!=''"> |
|||
and t.CURRENT_ADDRESS like concat('%', #{currentAddress}, '%') |
|||
</if> |
|||
<if test="residentName!=null and residentName!=''"> |
|||
and t.RESIDENTS_NAME like concat('%', #{residentName}, '%') |
|||
</if> |
|||
group by t.ID)a |
|||
</select> |
|||
<select id="selectPeopleByCurrentAddressExportList" |
|||
resultType="com.elink.esua.epdc.dto.house.result.EpdcScreenResidentInfoByCurrentAddressResultDTO"> |
|||
select t.ID as populationId, |
|||
2 as identityFlag, |
|||
t.RESIDENTS_NAME as residentName, |
|||
t.CURRENT_ADDRESS as currentAddress, |
|||
hh.RESIDENTS_NAME as houseHeadName, |
|||
hh.RESIDENTS_PHONE as houseHeadPhone, |
|||
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress |
|||
from epdc_population_information t |
|||
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID |
|||
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID |
|||
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID |
|||
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID |
|||
where t.DEL_FLAG = '0' |
|||
and ehr.DEL_FLAG = '0' |
|||
and ehr.IS_HOUSE_HEAD = '0' |
|||
and hh.DEL_FLAG = '0' |
|||
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0' |
|||
<if test="houseAddress!=null and houseAddress!=''"> |
|||
and t.CURRENT_ADDRESS like concat('%', #{houseAddress}, '%') |
|||
</if> |
|||
group by t.ID |
|||
</select> |
|||
|
|||
<select id="selectListByIdentityNos" |
|||
resultType="com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicUserInfoDTO"> |
|||
SELECT |
|||
ui.ID as ID, |
|||
ui.RESIDENTS_IDENTITY_NO as idCard, |
|||
ui.VACCINATION_NUM, |
|||
ui.VACCINATION_STATE, |
|||
vc.MAX_DOSE |
|||
FROM |
|||
epdc_population_information ui |
|||
LEFT JOIN vaccination_info vi ON vi.IDENTITY_NO = ui.RESIDENTS_IDENTITY_NO |
|||
AND vi.DEL_FLAG = '0' |
|||
LEFT JOIN vaccine_company vc ON vc.id = vi.COMPANY_ID |
|||
AND vi.DEL_FLAG = '0' |
|||
WHERE ui.DEL_FLAG = '0' |
|||
AND ui.RESIDENTS_IDENTITY_NO IN |
|||
<foreach collection="residentsIdentityNos" index="index" item="residentsIdentityNo" open="(" separator="," |
|||
close=")"> |
|||
#{residentsIdentityNo} |
|||
</foreach> |
|||
</select> |
|||
|
|||
<update id="updatePersonInfo"> |
|||
UPDATE epdc_population_information |
|||
set VACCINATION_NUM = #{vaccinationNum} |
|||
<if test="vaccinationState != null"> |
|||
,VACCINATION_STATE = #{vaccinationState} |
|||
</if> |
|||
WHERE |
|||
RESIDENTS_IDENTITY_NO = #{residentsIdentityNo} |
|||
</update> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue