Browse Source

居民信息采集-家庭信息列表提交

feature/syp_points
songyunpeng 5 years ago
parent
commit
6cd8529628
  1. 69
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java
  2. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HouseBusinessInfoDTO.java
  3. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HouseResidentDTO.java
  4. 74
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInfoOverviewDTO.java
  5. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInformationDTO.java
  6. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HouseBusinessInfoController.java
  7. 77
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java
  8. 55
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java
  9. 13
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HouseBusinessInfoDao.java
  10. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HouseResidentDao.java
  11. 17
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  12. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/HouseResidentEntity.java
  13. 154
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BasePopulationInformationExcel.java
  14. 53
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java
  15. 50
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/FamilyInformationExcel.java
  16. 35
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/HouseBusinessInfoExcel.java
  17. 43
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/populationMotorVehicleExcel.java
  18. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HouseBusinessInfoService.java
  19. 26
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  20. 10
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HouseBusinessInfoServiceImpl.java
  21. 15
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HouseResidentServiceImpl.java
  22. 22
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  23. 24
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HouseBusinessInfoDao.xml
  24. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HouseResidentDao.xml
  25. 32
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

69
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/utils/ExcelUtils.java

@ -10,6 +10,8 @@ package com.elink.esua.epdc.commons.tools.utils;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@ -19,10 +21,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* Excel工具类
@ -80,4 +79,66 @@ public class ExcelUtils {
exportExcel(response, fileName, targetList, targetClass);
}
/**
* Excel导出先sourceList转换成List<targetClass>再导出
*
* @param response response
* @param fileName 文件名
* @param sourceList 原数据List
* @param sheetNames sheet名字列表
*/
public static void exportExcelToTargetWithSheets(HttpServletResponse response, String fileName, List<String> sheetNames,
List<Class<?>> targetClassList,List<Object>... sourceList) throws Exception {
if(sheetNames.size()!=targetClassList.size() && targetClassList.size()!=sourceList.length){
throw new RenException("参数传递出错");
}
// 将sheets使用得map进行包装
List<Map<String, Object>> sheetsList = new ArrayList<>();
for (int i = 0;i<sheetNames.size();i++) {
Map<String, Object> deptDataMap = new HashMap<>(4);
ExportParams exportParams = new ExportParams();
exportParams.setSheetName(sheetNames.get(i));
deptDataMap.put("title", exportParams);
// 模版导出对应得实体类型
deptDataMap.put("entity", targetClassList.get(i));
// sheet中要填充得数据
deptDataMap.put("data", sourceList[i]);
sheetsList.add(deptDataMap);
}
exportExcelWithSheets(response,fileName,sheetsList);
}
/**
* 多sheetExcel导出
*
* @param response response
* @param fileName 文件名
* @param sheetsList 多sheet组装
*/
public static void exportExcelWithSheets(HttpServletResponse response, String fileName, List<Map<String, Object>> sheetsList) throws IOException {
if(StringUtils.isBlank(fileName)){
//当前日期
fileName = DateUtils.format(new Date());
}
Workbook workbook = null;
try {
workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.HSSF);
} catch (Exception ex) {
workbook = ExcelExportUtil.exportExcel(sheetsList, ExcelType.XSSF);
}
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xls");
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
out.close();
}
}

5
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HouseBusinessInfoDTO.java

@ -94,4 +94,9 @@ public class HouseBusinessInfoDTO implements Serializable {
*/
private Date updatedTime;
/**
* 辖区范围
*/
private String gridName;
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/HouseResidentDTO.java

@ -43,6 +43,10 @@ public class HouseResidentDTO implements Serializable {
* 房屋ID
*/
private String houseId;
/**
* 户主ID
*/
private String houseHeadId;
/**
* 居民ID

74
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInfoOverviewDTO.java

@ -0,0 +1,74 @@
/**
* 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.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 居民信息统计数据
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Data
public class PopulationInfoOverviewDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 自住数量
*/
private Integer sinceTheLiving;
/**
* 租赁数量
*/
private Integer rent;
/**
* 经营数量
*/
private Integer business;
/**
* 在岗数量
*/
private Integer employment;
/**
* 失业数量
*/
private Integer unemployment;
/**
* 房屋数量
*/
private Integer houseNum;
/**
* 人口数量
*/
private Integer populationNum;
/**
* 机动车数量
*/
private Integer motorVehicleNum;
/**
* 党员
*/
private Integer partyMemberNum;
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PopulationInformationDTO.java

@ -239,6 +239,10 @@ public class PopulationInformationDTO implements Serializable {
*/
private String residentId;
/**
* 户主ID
*/
private String houseHeadId;
/**
* 房屋ID
*/
private String houseId;
@ -257,4 +261,12 @@ public class PopulationInformationDTO implements Serializable {
*/
private String gridNames;
/**
* 房屋地址 ,隔开
*/
private String houseAddress;
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HouseBusinessInfoController.java

@ -51,7 +51,7 @@ public class HouseBusinessInfoController {
@GetMapping("page")
public Result<PageData<HouseBusinessInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<HouseBusinessInfoDTO> page = houseBusinessInfoService.page(params);
PageData<HouseBusinessInfoDTO> page = houseBusinessInfoService.listPage(params);
return new Result<PageData<HouseBusinessInfoDTO>>().ok(page);
}
@ -88,7 +88,7 @@ public class HouseBusinessInfoController {
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<HouseBusinessInfoDTO> list = houseBusinessInfoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, HouseBusinessInfoExcel.class);
ExcelUtils.exportExcelToTarget(response, "经营信息", list, HouseBusinessInfoExcel.class);
}
}

77
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java

@ -23,15 +23,19 @@ 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.UpdateGroup;
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.HousingInformationDTO;
import com.elink.esua.epdc.excel.BasePopulationInformationExcel;
import com.elink.esua.epdc.excel.BaseResidentInformationExcel;
import com.elink.esua.epdc.excel.HousingInformationExcel;
import com.elink.esua.epdc.service.HousingInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -89,4 +93,75 @@ public class HousingInformationController {
ExcelUtils.exportExcelToTarget(response, null, list, HousingInformationExcel.class);
}
/**
* @Description 导出模板
* @Author songyunpeng
* @Date 2020/8/27
* @Param [params, response]
* @return void
**/
@GetMapping("exportModule")
public void exportModule(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<Object> basePopulationInformationExcels = new ArrayList<>(1);
List<Object> baseResidentInformationExcels = new ArrayList<>(1);
BasePopulationInformationExcel basePopulationInformationExcel = new BasePopulationInformationExcel();
basePopulationInformationExcel.setHouseAddress("XX家园XX号楼XX单元XXX");
basePopulationInformationExcel.setBuyingTime("2020-02-02");
basePopulationInformationExcel.setHouseArea(new BigDecimal("0"));
basePopulationInformationExcel.setPropertyOwner("");
basePopulationInformationExcel.setPropertyOwnerIdentityNo("");
basePopulationInformationExcel.setPropertyOwnerMobile("");
basePopulationInformationExcel.setHouseUse("");
basePopulationInformationExcel.setTenantName("");
basePopulationInformationExcel.setTenantPhone("");
basePopulationInformationExcel.setTenantIdentityNo("");
basePopulationInformationExcel.setEnterpriseName("");
basePopulationInformationExcel.setSocialUniformCode("");
basePopulationInformationExcel.setLegalRepresentative("");
basePopulationInformationExcel.setEnterprisePhone("");
basePopulationInformationExcel.setResidentsName("");
basePopulationInformationExcel.setResidentsSex("");
basePopulationInformationExcel.setResidentsNation("");
basePopulationInformationExcel.setEducationLevel("");
basePopulationInformationExcel.setPoliticsStatus("");
basePopulationInformationExcel.setJoinTime("2020-02-02");
basePopulationInformationExcel.setOrganizationalRelationshipLocation("");
basePopulationInformationExcel.setResidentsIdentityNo("");
basePopulationInformationExcel.setResidentsPhone("");
basePopulationInformationExcel.setBodyStatus("");
basePopulationInformationExcel.setMaritalStatus("");
basePopulationInformationExcel.setAccountType("");
basePopulationInformationExcel.setMilitaryService("");
basePopulationInformationExcel.setHouseholdRegistrationPlace("");
basePopulationInformationExcel.setEmploymentStatus("");
basePopulationInformationExcel.setCurrentEmployer("");
basePopulationInformationExcel.setCurrentEmployerAddress("");
basePopulationInformationExcel.setUnemploymentReason("");
basePopulationInformationExcel.setReemploymentPermit("");
basePopulationInformationExcel.setUnemploymentRegister("");
basePopulationInformationExcel.setUnemploymentRegisterTime("2020-02-02");
basePopulationInformationExcel.setFamilyCategory("");
basePopulationInformationExcel.setHelpStatus("");
basePopulationInformationExcel.setMotorVehicleNum(0);
basePopulationInformationExcel.setMotorVehicleCategory("");
basePopulationInformationExcel.setDogStatus("");
BaseResidentInformationExcel baseResidentInformationExcel = new BaseResidentInformationExcel();
baseResidentInformationExcel.setResidentsIdentityNo("");
baseResidentInformationExcel.setHouseHeadRelation("");
baseResidentInformationExcel.setResidentsName("");
baseResidentInformationExcel.setResidentsSex("");
baseResidentInformationExcel.setResidentsNation("");
baseResidentInformationExcel.setCurrentEmployer("");
baseResidentInformationExcel.setCurrentAddress("");
basePopulationInformationExcels.add(basePopulationInformationExcel);
baseResidentInformationExcels.add(baseResidentInformationExcel);
List<Class<?>> classes = new ArrayList<>(2);
classes.add(basePopulationInformationExcel.getClass());
classes.add(baseResidentInformationExcel.getClass());
List<String> sheetNames = new ArrayList<>(2);
sheetNames.add("房屋信息和户主信息");
sheetNames.add("居民信息");
ExcelUtils.exportExcelToTargetWithSheets(response, "居民信息录入模板",sheetNames,classes,basePopulationInformationExcels,baseResidentInformationExcels);
}
}

55
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java

@ -26,8 +26,11 @@ 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.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.excel.FamilyInformationExcel;
import com.elink.esua.epdc.excel.PopulationInformationExcel;
import com.elink.esua.epdc.excel.populationMotorVehicleExcel;
import com.elink.esua.epdc.service.PopulationInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -109,5 +112,57 @@ public class PopulationInformationController {
}
return new Result();
}
/**
* @Description 获取机动车信息列表
* @Author songyunpeng
* @Date 2020/8/26
* @Param [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInformationDTO>>
**/
@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);
}
/**
* @Description 机动车信息列表导出
* @Author songyunpeng
* @Date 2020/8/26
* @Param [params, response]
* @return void
**/
@GetMapping("motorVehicle/export")
public void motorVehicleExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PopulationInformationDTO> list = populationInformationService.motorVehicleList(params);
ExcelUtils.exportExcelToTarget(response, "机动车信息", list, populationMotorVehicleExcel.class);
}
/**
* @Description 家庭信息导出
* @Author songyunpeng
* @Date 2020/8/28
* @Param [params, response]
* @return void
**/
@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);
}
/**
* @Description 获取居民信息采集总览数据
* @Author songyunpeng
* @Date 2020/8/27
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
@GetMapping("getPopulationInfoOverview")
public PopulationInfoOverviewDTO getPopulationInfoOverview() {
return populationInformationService.getPopulationInfoOverview();
}
}

13
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HouseBusinessInfoDao.java

@ -18,9 +18,13 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.HouseBusinessInfoDTO;
import com.elink.esua.epdc.entity.HouseBusinessInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 房屋经营信息表
*
@ -29,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface HouseBusinessInfoDao extends BaseDao<HouseBusinessInfoEntity> {
/**
* @Description 前端列表
* @Author songyunpeng
* @Date 2020/8/26
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.HouseBusinessInfoDTO>
**/
List<HouseBusinessInfoDTO> selectHouseBusinessInfoDTO(Map<String, Object> params);
}

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/HouseResidentDao.java

@ -35,7 +35,7 @@ import java.util.Map;
@Mapper
public interface HouseResidentDao extends BaseDao<HouseResidentEntity> {
/**
* @Description 根据房子ID查询居住人信息
* @Description 根据户主ID查询居住人信息
* @Author songyunpeng
* @Date 2020/8/21
* @Param [params]

17
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java

@ -18,6 +18,7 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.entity.PopulationInformationEntity;
import org.apache.ibatis.annotations.Mapper;
@ -67,4 +68,20 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO>
**/
PopulationInformationDTO selectDetailOfPopulationInformationDTO(@Param("id") String id);
/**
* @Description 获取机动车列表信息
* @Author songyunpeng
* @Date 2020/8/26
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.PopulationInformationDTO>
**/
List<PopulationInformationDTO> motorVehiclePage(Map<String, Object> params);
/**
* @Description 获取居民信息采集总览数据
* @Author songyunpeng
* @Date 2020/8/27
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverview();
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/HouseResidentEntity.java

@ -39,6 +39,10 @@ public class HouseResidentEntity extends BaseEpdcEntity {
* 房屋ID
*/
private String houseId;
/**
* 户主ID
*/
private String houseHeadId;
/**
* 居民ID

154
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BasePopulationInformationExcel.java

@ -0,0 +1,154 @@
/**
* 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.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 BasePopulationInformationExcel {
@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 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 residentsNation;
@Excel(name = "文化程度")
private String educationLevel;
@Excel(name = "政治面貌",replace = {"群众_0","党员_1"})
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 = "身体状况",replace = {"病残_0","健康_1"})
private String bodyStatus;
@Excel(name = "婚姻状况",replace = {"未婚_0","已婚_1"})
private String maritalStatus;
@Excel(name = "户口类型",replace = {"城镇_0","农业_1"})
private String accountType;
@Excel(name = "服兵役",replace = {"否_0","是_1"})
private String militaryService;
@Excel(name = "户籍地")
private String householdRegistrationPlace;
@Excel(name = "就业情况",replace = {"在岗_0","就业_1"})
private String employmentStatus;
@Excel(name = "现工作单位")
private String currentEmployer;
@Excel(name = "现单位地址")
private String currentEmployerAddress;
@Excel(name = "失业原因",replace = {"原单位破产_0","解除合同_1","效益不好_2","减员_3","其他_4"})
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 = "家庭类别",replace = {"普通家庭_0","军烈_2","优抚_3","困难家庭_6"})
private String familyCategory;
@Excel(name = "救助情况",replace = {"低保_0","大病_1","廉租_2","教育_3","临时_4","其他_5"})
private String helpStatus;
@Excel(name = "机动车数量")
private Integer motorVehicleNum;
@Excel(name = "机动车类型",replace = {"轿车_0","摩托_1","其他_2"})
private String motorVehicleCategory;
@Excel(name = "宠物犬状况",replace = {"无_0","有_1"})
private String dogStatus;
}

53
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java

@ -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.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;
}

50
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/FamilyInformationExcel.java

@ -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.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;
}

35
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/HouseBusinessInfoExcel.java

@ -20,8 +20,6 @@ package com.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 房屋经营信息表
*
@ -31,41 +29,26 @@ import java.util.Date;
@Data
public class HouseBusinessInfoExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "企业名称")
private String enterpriseName;
@Excel(name = "社会统一代码")
private String socialUniformCode;
@Excel(name = "辖区范围")
private String gridName;
@Excel(name = "法人代表")
@Excel(name = "经营者姓名")
private String legalRepresentative;
@Excel(name = "电话")
@Excel(name = "联系电话")
private String enterprisePhone;
@Excel(name = "房屋ID")
private String houseId;
@Excel(name = "企业名称")
private String enterpriseName;
@Excel(name = "删除标识 (0:否 1:是)")
private String delFlag;
@Excel(name = "企业注册号")
private String socialUniformCode;
@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;
}

43
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/populationMotorVehicleExcel.java

@ -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.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 = "机动车类型",replace = {"轿车_0", "摩托_1","其他_2"})
private String motorVehicleCategory;
}

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/HouseBusinessInfoService.java

@ -101,4 +101,12 @@ public interface HouseBusinessInfoService extends BaseService<HouseBusinessInfoE
* @return com.elink.esua.epdc.entity.HouseRentInfoEntity
**/
HouseBusinessInfoEntity getHouseRentInfoEntityByHouseId(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);
}

26
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java

@ -20,6 +20,7 @@ package com.elink.esua.epdc.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.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.entity.PopulationInformationEntity;
@ -117,4 +118,29 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
* @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();
}

10
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HouseBusinessInfoServiceImpl.java

@ -61,9 +61,7 @@ public class HouseBusinessInfoServiceImpl extends BaseServiceImpl<HouseBusinessI
@Override
public List<HouseBusinessInfoDTO> list(Map<String, Object> params) {
List<HouseBusinessInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, HouseBusinessInfoDTO.class);
return baseDao.selectHouseBusinessInfoDTO(params);
}
private QueryWrapper<HouseBusinessInfoEntity> getWrapper(Map<String, Object> params){
@ -113,4 +111,10 @@ public class HouseBusinessInfoServiceImpl extends BaseServiceImpl<HouseBusinessI
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()); }
}

15
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/HouseResidentServiceImpl.java

@ -326,6 +326,9 @@ public class HouseResidentServiceImpl extends BaseServiceImpl<HouseResidentDao,
@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));
}
@ -333,6 +336,8 @@ public class HouseResidentServiceImpl extends BaseServiceImpl<HouseResidentDao,
@Override
public PageData<PopulationInformationDTO> listPage(Map<String, Object> params) {
IPage<PopulationInformationDTO> page = getPage(params);
PopulationInformationDTO populationInformationDTO = populationInformationService.getHouseHeadInfo(params.get("houseId") + "");
params.put("houseHeadId",populationInformationDTO.getId());
List<PopulationInformationDTO> list = baseDao.selectListOfPopulationInformationDTO(params);
return new PageData<>(list, page.getTotal());
}
@ -341,8 +346,13 @@ public class HouseResidentServiceImpl extends BaseServiceImpl<HouseResidentDao,
public Result saveWithoutIdentifyNo(HouseResidentDTO dto) {
PopulationInformationEntity populationInformationEntity = ConvertUtils.sourceToTarget(dto,PopulationInformationEntity.class);
populationInformationService.insert(populationInformationEntity);
HouseResidentEntity houseResidentEntity = ConvertUtils.sourceToTarget(dto,HouseResidentEntity.class);
HouseResidentEntity houseResidentEntity = new HouseResidentEntity();
//居住人与户主关联,与房屋不关联
//取房屋的户主ID
PopulationInformationDTO houseHeadInfo = populationInformationService.getHouseHeadInfo(dto.getHouseId());
houseResidentEntity.setResidentId(populationInformationEntity.getId());
houseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation());
houseResidentEntity.setHouseHeadId(houseHeadInfo.getId());
houseResidentEntity.setIsHouseHead("0");
this.insert(houseResidentEntity);
return new Result();
@ -357,7 +367,8 @@ public class HouseResidentServiceImpl extends BaseServiceImpl<HouseResidentDao,
populationInformationEntity.setCurrentEmployer(dto.getCurrentEmployer());
populationInformationEntity.setCurrentAddress(dto.getCurrentAddress());
populationInformationService.updateById(populationInformationEntity);
HouseResidentEntity houseResidentEntity = ConvertUtils.sourceToTarget(dto,HouseResidentEntity.class);
HouseResidentEntity houseResidentEntity = new HouseResidentEntity();
houseResidentEntity.setHouseHeadRelation(dto.getHouseHeadRelation());
this.updateById(houseResidentEntity);
return new Result();
}

22
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dao.HouseResidentDao;
import com.elink.esua.epdc.dao.PopulationInformationDao;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.entity.HouseResidentEntity;
import com.elink.esua.epdc.entity.HousingInformationEntity;
@ -74,9 +75,7 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
@Override
public List<PopulationInformationDTO> list(Map<String, Object> params) {
List<PopulationInformationEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PopulationInformationDTO.class);
return baseDao.selectListOfPopulationInformationDTO(params);
}
private QueryWrapper<PopulationInformationEntity> getWrapper(Map<String, Object> params){
@ -196,4 +195,21 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
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();
}
}

24
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HouseBusinessInfoDao.xml

@ -17,6 +17,30 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="selectHouseBusinessInfoDTO" resultType="com.elink.esua.epdc.dto.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 != '' and enterpriseName != null">and t.ENTERPRISE_NAME like concat('%',#{enterpriseName},'%') </if>
<if test="socialUniformCode != '' and socialUniformCode != null">and t.SOCIAL_UNIFORM_CODE like concat('%',#{socialUniformCode},'%') </if>
<if test="legalRepresentative != '' and legalRepresentative != null">and t.LEGAL_REPRESENTATIVE like concat('%',#{legalRepresentative},'%') </if>
order by t.CREATED_TIME desc
</select>
</mapper>

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HouseResidentDao.xml

@ -30,9 +30,10 @@
t.RESIDENTS_PHONE,
t.CURRENT_EMPLOYER,
t.CURRENT_ADDRESS,
t1.HOUSE_HEAD_RELATION
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_ID = #{houseId}
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.PopulationInformationDTO">
@ -49,7 +50,8 @@
t.CURRENT_EMPLOYER,
t.CURRENT_ADDRESS,
t1.HOUSE_HEAD_RELATION,
t.ID as residentId
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>

32
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -90,11 +90,11 @@
resultType="com.elink.esua.epdc.dto.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(substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridNames
group_concat(substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridNames,t.HELP_STATUS,t.FAMILY_CATEGORY,group_concat(t2.HOUSE_ADDRESS) as houseAddress
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
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))
@ -110,6 +110,8 @@
<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>
@ -138,6 +140,32 @@
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.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 MOTOR_VEHICLE_CATEGORY = #{motorVehicleCategory} </if>
<if test="residentsName != '' and residentsName != null">and RESIDENTS_NAME like concat('%',#{residentsName},'%') </if>
order by CREATED_TIME
</select>
<select id="getPopulationInfoOverview" resultType="com.elink.esua.epdc.dto.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(ID) from epdc_population_information where DEL_FLAG = 0 ) 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>
</mapper>
Loading…
Cancel
Save