Browse Source

居民信息采集-数据浏览bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
b7d29074c0
  1. 15
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java
  2. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java
  3. BIN
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls
  4. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml
  5. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

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

@ -171,13 +171,14 @@ public class HousingInformationController {
}
//没有户主信息的房屋,转换excel时,替换是否时会出现null,此时将对应null值替换成空字符
basePopulationInformationExcelList.forEach(basePopulationInformationExportDto ->{
basePopulationInformationExportDto.setResidentsSex("");
basePopulationInformationExportDto.setMilitaryService("");
basePopulationInformationExportDto.setReemploymentPermit("");
basePopulationInformationExportDto.setUnemploymentRegister("");
basePopulationInformationExportDto.setDogStatus("");
});
if(StringUtils.isBlank(basePopulationInformationExportDto.getId())){
basePopulationInformationExportDto.setResidentsSex("");
basePopulationInformationExportDto.setMilitaryService("");
basePopulationInformationExportDto.setReemploymentPermit("");
basePopulationInformationExportDto.setUnemploymentRegister("");
basePopulationInformationExportDto.setDogStatus("");
}
});
//根据获取的户主ID查询居住人信息
List<BasePopulationInformationExportDto> basePopulationInformationExcelListWithHouseHead = new ArrayList<>();

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

@ -32,7 +32,7 @@ public class BaseResidentInformationExcel {
@Excel(name = "户主身份证号码")
private String residentsIdentityNo;
@Excel(name = "与户主关系",replace = {"子女_0","夫妻_1","其他_2","父母_3"})
@Excel(name = "与户主关系",replace = {"子女_0","夫妻_1","父母_2","其他_3"})
private String houseHeadRelation;
@Excel(name = "居住人姓名")

BIN
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls

Binary file not shown.

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml

@ -171,7 +171,7 @@
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'
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}

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

@ -148,7 +148,7 @@
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
order by CREATED_TIME desc
</select>
<select id="getPopulationInfoOverview" resultType="com.elink.esua.epdc.dto.PopulationInfoOverviewDTO">
select
@ -162,7 +162,14 @@
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,
(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

Loading…
Cancel
Save