zhongrj
2024-01-06 ad4416e4bdaef4fc8cae90210e98d1111acdcafb
房屋查询修改
3 files modified
59 ■■■■ changed files
src/main/java/org/springblade/modules/grid/entity/GridWorkLogEntity.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 44 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/entity/GridWorkLogEntity.java
@@ -70,9 +70,9 @@
    @ApiModelProperty(value = "重点人员类型")
    private Integer personType;
    /**
     * 被访人用户id
     * 住户id
     */
    @ApiModelProperty(value = "被访人用户id")
    @ApiModelProperty(value = "被访人住户id")
    private Long householdId;
//
//    /**
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -116,38 +116,20 @@
    <!--自定义分页数据查询-->
    <select id="selectHouseholdPage" resultMap="householdPageAndLabelMap">
        SELECT
        jh.id,
        jh.house_code,
        jh.NAME,
        jh.phone_number,
        jh.associated_user_id,
        jh.role_type,
        jh.associated_user_name,
        jh.relationship,
        jh.is_primary_contact,
        jh.residential_status,
        jh.birthday,
        jh.id_card,
        jh.hkmt_pass,
        jh.passport,
        jh.id,jh.house_code,jh.name,jh.phone_number,jh.associated_user_id,
        jh.role_type,jh.associated_user_name,jh.relationship,jh.is_primary_contact,
        jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.card_type,jh.hkmt_pass,
        ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
        jh.ethnicity,
        jh.education,
        jh.hukou_registration,
        jh.work_status,
        employer,
        jh.marital_status,
        jh.card_number,
        jh.other_contact,
        jh.current_address,
        jh.disability_cert,
        jh.party_ember,
        jh.create_user,
        jh.create_time,
        jh.update_user,
        jh.update_time,
        jh.confirm_flag,
        jh.remark,
        jh.passport,jh.ethnicity,jh.education,jh.resident_type,
        jh.hukou_registration,jh.resident_adcode,jh.native_place_adcode,
        jh.religious_belief,jh.health_status,jh.disease_name,
        jh.work_status,jh.employer,jh.occupation,jh.cmpy_reg_addr,
        jh.go_out_addr,jh.go_out_where,jh.go_out_time,jh.go_out_reason,
        jh.marital_status,jh.card_number,jh.other_contact,
        if(jda.id is not null,jda.address_name,jh.current_address) as current_address,
        jh.disability_cert,jh.party_ember,jh.remark,
        jh.confirm_flag,jh.housing_rental_id,
        if(jda.id is not null,substring(jda.town_street_code,1,9),jh.home_adcode) as home_adcode,
        jhs.district_name aoiName,
        concat( jhs.building, " ", unit, " ", room ) AS address,
        jda.town_street_name AS townStreetName,
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
@@ -79,22 +79,11 @@
    public IPage<HouseholdVO> selectHouseholdPage(IPage<HouseholdVO> page, HouseholdVO household) {
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
// doInsert();
// 执行业务等
        Dept dept = deptService.getById(AuthUtil.getDeptId());
        if (null!=dept){
            household.setRegionCode(dept.getRegionCode());
        }
        List<HouseholdVO> householdVOS = baseMapper.selectHouseholdPage(page, household);
        // 遍历
        // for (HouseholdVO householdVO : householdVOS) {
        //     // 设置对应的网格名称
        //     GridVO gridVO = gridService.getGridDetailByHouseCode(householdVO.getHouseCode());
        //     if (null!= gridVO){
        //         householdVO.setGridName(gridVO.getGridName());
        //     }
        // }
        // 返回
        stopWatch.stop();
        System.out.println("selectHouseholdPage:" + stopWatch.getTotalTimeMillis());
        return page.setRecords(householdVOS);