lin
2024-03-20 f075746fcd4be2b0c5322a5b9d7b5e81da8dcee8
租客管理查询
5 files modified
54 ■■■■■ changed files
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/HouseholdVO.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml 44 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -239,7 +239,7 @@
            <if test="household.relationship!=null and household.relationship == 18">
                and jh.relationship = #{household.relationship}
                <if test="household.minors!=null and household.minors ==1">
                <if test="household.minors!=null and household.minors ==2">
                    and TIMESTAMPDIFF(year, substring(jh.id_card, 7, 8), now()) &lt; 18
                </if>
            </if>
src/main/java/org/springblade/modules/house/vo/HouseholdVO.java
@@ -174,7 +174,7 @@
     */
    private Integer limit;
    @ApiModelProperty(value = "未成年", example = "")
    @ApiModelProperty(value = "未成年 1:否 2:是", example = "")
    private Integer minors;
    /**
src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java
@@ -25,6 +25,7 @@
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
@@ -66,6 +67,8 @@
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入taskResidencePermitApply")
    public R<IPage<TaskResidencePermitApplyVO>> list(TaskResidencePermitApplyEntity taskResidencePermitApply, Query query) {
        // 查询自己的记录
        taskResidencePermitApply.setUpdateUser(AuthUtil.getUserId());
        IPage<TaskResidencePermitApplyEntity> pages = taskResidencePermitApplyService.page(Condition.getPage(query), Condition.getQueryWrapper(taskResidencePermitApply));
        return R.data(TaskResidencePermitApplyWrapper.build().pageVO(pages));
    }
src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml
@@ -23,26 +23,29 @@
        left join blade_region br on br.code = jg.community_code
        <where>
            and jtrpa.is_deleted = 0
            <if test="residen.id != null ">and id = #{residen.id}</if>
            <if test="residen.name != null  and residen.name != ''">and name = #{residen.name}</if>
            <if test="residen.phone != null  and residen.phone != ''">and phone = #{residen.phone}</if>
            <if test="residen.idCard != null  and residen.idCard != ''">and id_card = #{residen.idCard}</if>
            <if test="residen.address != null  and residen.address != ''">and address = #{residen.address}</if>
            <if test="residen.houseCode != null  and residen.houseCode != ''">and house_code = #{residen.houseCode}</if>
            <if test="residen.taskId != null ">and task_id = #{residen.taskId}</if>
            <if test="residen.createTime != null ">and create_time = #{residen.createTime}</if>
            <if test="residen.updateTime != null ">and update_time = #{residen.updateTime}</if>
            <if test="residen.createUser != null ">and create_user = #{residen.createUser}</if>
            <if test="residen.houseRentalId != null ">and house_rental_id = #{residen.houseRentalId}</if>
            <if test="residen.isDeleted != null ">and is_deleted = #{residen.isDeleted}</if>
            <if test="residen.remak != null  and residen.remak != ''">and remak = #{residen.remak}</if>
            <if test="residen.gridCode != null  and residen.gridCode != ''"> and grid_code = #{residen.gridCode}</if>
            <if test="residen.updateUser != null "> and update_user = #{residen.updateUser}</if>
            <if test="residen.confirmUserId != null "> and confirm_user_id = #{residen.confirmUserId}</if>
            <if test="residen.confirmTime != null "> and confirm_time = #{residen.confirmTime}</if>
            <if test="residen.confirmFlag != null "> and confirm_flag = #{residen.confirmFlag}</if>
            <if test="residen.confirmNotion != null  and residen.confirmNotion != ''"> and confirm_notion = #{residen.confirmNotion}</if>
            <if test="residen.jwGridCode != null  and residen.jwGridCode != ''"> and jw_grid_code = #{residen.jwGridCode}</if>
            <if test="residen.minors!=null and residen.minors ==2">
                and TIMESTAMPDIFF(year, substring(jtrpa.id_card, 7, 8), now()) &lt; 18
            </if>
            <if test="residen.id != null ">and jtrpa.id = #{residen.id}</if>
            <if test="residen.name != null  and residen.name != ''">and jtrpa.name like CONCAT('%',#{residen.name},'%')</if>
            <if test="residen.phone != null  and residen.phone != ''">and jtrpa.phone like CONCAT('%',#{residen.phone},'%')</if>
            <if test="residen.idCard != null  and residen.idCard != ''">and jtrpa.id_card like CONCAT('%',#{residen.idCard},'%')</if>
            <if test="residen.address != null  and residen.address != ''">and jtrpa.address like CONCAT('%',#{residen.address},'%')</if>
            <if test="residen.houseCode != null  and residen.houseCode != ''">and jtrpa.house_code = #{residen.houseCode}</if>
            <if test="residen.taskId != null ">and jtrpa.task_id = #{residen.taskId}</if>
            <if test="residen.createTime != null ">and jtrpa.create_time = #{residen.createTime}</if>
            <if test="residen.updateTime != null ">and jtrpa.update_time = #{residen.updateTime}</if>
            <if test="residen.createUser != null ">and jtrpa.create_user = #{residen.createUser}</if>
            <if test="residen.houseRentalId != null ">and jtrpa.house_rental_id = #{residen.houseRentalId}</if>
            <if test="residen.isDeleted != null ">and jtrpa.is_deleted = #{residen.isDeleted}</if>
            <if test="residen.remak != null  and residen.remak != ''">and jtrpa.remak = #{residen.remak}</if>
            <if test="residen.gridCode != null  and residen.gridCode != ''"> and jtrpa.grid_code = #{residen.gridCode}</if>
            <if test="residen.updateUser != null "> and jtrpa.update_user = #{residen.updateUser}</if>
            <if test="residen.confirmUserId != null "> and jtrpa.confirm_user_id = #{residen.confirmUserId}</if>
            <if test="residen.confirmTime != null "> and jtrpa.confirm_time = #{residen.confirmTime}</if>
            <if test="residen.confirmFlag != null "> and jtrpa.confirm_flag = #{residen.confirmFlag}</if>
            <if test="residen.confirmNotion != null  and residen.confirmNotion != ''"> and jtrpa.confirm_notion = #{residen.confirmNotion}</if>
            <if test="residen.jwGridCode != null  and residen.jwGridCode != ''"> and jtrpa.jw_grid_code = #{residen.jwGridCode}</if>
            <if test="isAdministrator==2">
                <!-- 网格员及其他 -->
@@ -88,6 +91,7 @@
                </if>
            </if>
            order by jtrpa.create_time desc
        </where>
    </select>
src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java
@@ -54,4 +54,7 @@
    @ApiModelProperty(value = "街道名称", example = "")
    private String streetName;
    @ApiModelProperty(value = "未成年 1:否 2:是", example = "")
    private Integer minors;
}