diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java index 9f51415d..02fd87af 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/HousingInformationController.java +++ b/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 basePopulationInformationExcelListWithHouseHead = new ArrayList<>(); diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java index 4a707513..8ec366b8 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/BaseResidentInformationExcel.java +++ b/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 = "居住人姓名") diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls index 3121b6a2..0063f2f8 100644 Binary files a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls and b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/excel/居民信息录入模板.xls differ diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml index 059130db..daa8d2a4 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/HousingInformationDao.xml +++ b/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 #{houseHeadId} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml index db5d769d..b3fc8da5 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml +++ b/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 and find_in_set(#{motorVehicleCategory},MOTOR_VEHICLE_CATEGORY) and RESIDENTS_NAME like concat('%',#{residentsName},'%') - order by CREATED_TIME + order by CREATED_TIME desc