linwe
2023-12-26 f17a6dbf2290f73ced65e03121d0998d1416c959
bug修复
9 files modified
177 ■■■■■ changed files
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 83 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml 38 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskVO.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -157,46 +157,49 @@
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
        LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code
        LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
        LEFT JOIN jczz_gridman jgm on jgm.grid_id=jg.id
        WHERE
        jh.is_deleted = 0
        <if test="household.userId!=null">
            and jgm.user_id = #{household.userId}
        </if>
        <if test="household.name!=null and household.name !=''">
            and jh.name like concat('%',#{household.name},'%')
        </if>
        <if test="household.houseCode!=null and household.houseCode !=''">
            and jh.house_code = #{household.houseCode}
        </if>
        <if test="household.phoneNumber!=null and household.phoneNumber !=''">
            and jh.phone_number like concat('%',#{household.phoneNumber},'%')
        </if>
        <if test="household.idCard!=null and household.idCard !=''">
            and jh.id_card like concat('%',#{household.idCard},'%')
        </if>
        <if test="household.aoiName!=null and household.aoiName !=''">
            and jhs.district_name like concat('%',#{household.aoiName},'%')
        </if>
        <if test="household.confirmFlag != null ">
            and jh.confirm_flag = #{household.confirmFlag}
        </if>
        <if test="household.townStreetName!=null and household.townStreetName!=''">
            and jda.town_street_name like concat('%',#{household.townStreetName},'%')
        </if>
        <if test="household.neiName!=null and household.neiName!=''">
            and jda.nei_name like concat('%',#{household.neiName},'%')
        </if>
        <if test="household.housingRentalId != null ">
            and jh.housing_rental_id = #{household.housingRentalId}
        </if>
        <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
            AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
        </if>
        <if test="household.regionCode!=null and household.regionCode!=''">
            and jg.community_code like concat('%',#{household.regionCode},'%')
        </if>
        order by jh.create_time desc
        <where>
            <if test="household.userId!=null">
                AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId}
                )
            </if>
            <if test="household.name!=null and household.name !=''">
                and jh.name like concat('%',#{household.name},'%')
            </if>
            <if test="household.houseCode!=null and household.houseCode !=''">
                and jh.house_code = #{household.houseCode}
            </if>
            <if test="household.phoneNumber!=null and household.phoneNumber !=''">
                and jh.phone_number like concat('%',#{household.phoneNumber},'%')
            </if>
            <if test="household.idCard!=null and household.idCard !=''">
                and jh.id_card like concat('%',#{household.idCard},'%')
            </if>
            <if test="household.aoiName!=null and household.aoiName !=''">
                and jhs.district_name like concat('%',#{household.aoiName},'%')
            </if>
            <if test="household.confirmFlag != null ">
                and jh.confirm_flag = #{household.confirmFlag}
            </if>
            <if test="household.townStreetName!=null and household.townStreetName!=''">
                and jda.town_street_name like concat('%',#{household.townStreetName},'%')
            </if>
            <if test="household.neiName!=null and household.neiName!=''">
                and jda.nei_name like concat('%',#{household.neiName},'%')
            </if>
            <if test="household.housingRentalId != null ">
                and jh.housing_rental_id = #{household.housingRentalId}
            </if>
            <if test="household.startTime != null and household.startTime != '' and household.endTime != null and household.endTime != '' ">
                AND jh.create_time BETWEEN #{household.startTime} and #{household.endTime}
            </if>
            <if test="household.regionCode!=null and household.regionCode!=''">
                and jg.community_code like concat('%',#{household.regionCode},'%')
            </if>
            and jh.is_deleted = 0
            order by jh.create_time desc
        </where>
    </select>
    <!--查询房屋集合信息-->
src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
@@ -12,9 +12,15 @@
    <!--自定义分页查询-->
    <select id="selectPlaceExtPage" resultType="org.springblade.modules.place.vo.PlaceExtVO">
        select jpe.*,jp.place_name as placeName from jczz_place_ext jpe
        left join jczz_place jp on jpe.place_id = jp.id and jp.is_deleted = 0
        where jpe.is_deleted = 0
        SELECT
        jpe.*,
        jp.place_name AS placeName
        FROM
        jczz_place_ext jpe
        LEFT JOIN jczz_place jp ON jpe.place_id = jp.id
        AND jp.is_deleted = 0
        WHERE
        jpe.is_deleted = 0
        <if test="placeExt.placeName != null and placeExt.placeName != ''">
            and jp.place_name like concat('%',#{placeExt.placeName},'%')
        </if>
@@ -24,6 +30,9 @@
        <if test="placeExt.confirmFlag != null">
            and jpe.confirm_flag = #{placeExt.confirmFlag}
        </if>
        <if test="placeExt.startTime != null and placeExt.startTime != '' and placeExt.endTime != null and placeExt.endTime != '' ">
            AND jpe.create_time BETWEEN #{placeExt.startTime} and #{placeExt.endTime}
        </if>
        <if test="placeExt.roleName!=null and placeExt.roleName!='' and placeExt.createUser!=null">
            <choose>
                <when test="placeExt.roleName=='网格员'">
@@ -32,7 +41,7 @@
                    jp.create_user = #{placeExt.createUser}
                    <if test="houseCodeList != null and houseCodeList.size()>0">
                        or jp.house_code in
                        <foreach collection="houseCodeList" item="houseCode" separator ="," open="("  close=")">
                        <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")">
                            #{houseCode}
                        </foreach>
                    </if>
src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.place.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.place.entity.PlaceExtEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
@@ -56,4 +57,10 @@
     */
    private List<PlacePractitionerEntity> placePractitioner = new ArrayList<>();
    @ApiModelProperty("开始时间")
    private String startTime;
    @ApiModelProperty("结束时间")
    private String endTime;
}
src/main/java/org/springblade/modules/task/controller/TaskController.java
@@ -132,8 +132,8 @@
    @GetMapping("/countTypeNumber")
    @ApiOperationSupport(order = 9)
    @ApiOperation(value = "统计类型数量")
    public R countTypeNumber(@RequestParam(value = "neiCode", required = false) String neiCode) {
        return R.data(taskService.countTypeNumber());
    public R countTypeNumber(@RequestParam(value = "neiCode", required = false) String neiCode, @RequestParam(value = "roleType", defaultValue = "0") Integer roleType) {
        return R.data(taskService.countTypeNumber(roleType, neiCode));
    }
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -71,6 +71,9 @@
        <if test="task.createDept != null ">and jt.create_dept = #{task.createDept}</if>
        <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if>
        <if test="task.houseCode != null  and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if>
        <if test="task.startTime != null and task.startTime != '' and task.endTime != null and task.endTime != '' ">
            AND jt.create_time BETWEEN #{task.startTime} and #{task.endTime}
        </if>
        <!-- 取保候审 -->
        <if test="task.reportType != null and task.reportType == 1 ">
            and jt.report_type = 1
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
@@ -135,23 +135,27 @@
        FROM
        jczz_task_report_for_repairs jtr
        LEFT JOIN jczz_doorplate_address jda ON jtr.address_code = jda.address_code
        WHERE
        jtr.is_deleted = 0
        <if test="neiCode != null and neiCode != ''">
            and jda.nei_code = #{neiCode}
        </if>
        <if test="userId != null">
            AND jtr.address_code IN (
            SELECT
            jgr.house_code
            FROM
            jczz_grid_range jgr
            LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id
            LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
            WHERE
            jg.is_deleted = 0
            AND jgm.user_id = #{userId} )
        </if>
        <where>
            <if test="neiCode != null and neiCode != ''">
                and jda.nei_code = #{neiCode}
            </if>
            <if test="userId != null">
                AND jtr.address_code IN (
                SELECT
                jgr.house_code
                FROM
                jczz_grid_range jgr
                LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id
                LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
                WHERE
                jg.is_deleted = 0
                AND jgm.user_id = #{userId} )
            </if>
            and jtr.is_deleted = 0
            and jtr.confirm_flag = 1
        </where>
    </select>
src/main/java/org/springblade/modules/task/service/ITaskService.java
@@ -63,7 +63,7 @@
    Object countNumber(String houseCode, Integer status);
    Object countTypeNumber();
    Object countTypeNumber(Integer roleType,String neiCode);
    Object countFrequencyNumber();
}
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -127,26 +127,29 @@
    }
    @Override
    public Object countTypeNumber() {
    public Object countTypeNumber(Integer roleType, String neiCode) {
        TaskVO taskVO = new TaskVO();
        Map<String, Object> objectObjectHashMap = new HashMap<>();
        taskVO.setStatus(1);
        taskVO.setUserId(roleType > 0 ? AuthUtil.getUserId() : null);
        taskVO.setNeiCode(neiCode);
        taskVO.setReportType(2);
        // 标签时间
        // 标签事件
        Integer bqsj = baseMapper.selectTaskCount(taskVO);
        taskVO.setReportType(1);
        // 标签时间
        // 取保候审
        Integer qbhs = baseMapper.selectTaskCount(taskVO);
        // 报事报修
        Integer bsbx = SpringUtils.getBean(ITaskReportForRepairsService.class).getStatistics(AuthUtil.getUserId(), "");
        Integer bsbx = SpringUtils.getBean(ITaskReportForRepairsService.class).getStatistics(roleType > 0 ? AuthUtil.getUserId() : null, neiCode);
        // 住房审核
        Integer zhsh = iHouseholdService.statistics(AuthUtil.getUserId(),"");
        Integer zhsh = iHouseholdService.statistics(roleType > 0 ? AuthUtil.getUserId() : null, neiCode);
        // 出租审核
        HouseRentalTenantVO houseRentalTenantVO = new HouseRentalTenantVO();
        houseRentalTenantVO.setUserId(AuthUtil.getUserId());
        houseRentalTenantVO.setUserId(roleType > 0 ? AuthUtil.getUserId() : null);
        houseRentalTenantVO.setNeiCode(neiCode);
        Integer czsh = iHouseRentalService.getStatisticsCount(houseRentalTenantVO);
        // 场所审核
        Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(AuthUtil.getUserId(), "", 1);
        Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 1);
        objectObjectHashMap.put("qbhs", qbhs);
        objectObjectHashMap.put("bqsj", bqsj);
        objectObjectHashMap.put("bsbx", bsbx);
src/main/java/org/springblade/modules/task/vo/TaskVO.java
@@ -47,4 +47,10 @@
    private String neiCode;
    @ApiModelProperty("开始时间")
    private String startTime;
    @ApiModelProperty("结束时间")
    private String endTime;
}