linwe
2024-05-23 98e7b11a29040cede17b3a60cb96d2c015a0a3f3
无诈审核优化
6 files modified
176 ■■■■ changed files
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml 135 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -256,7 +256,7 @@
            </if>
            <!-- 不等于18 就是非租户 -->
            <if test="household.relationship!=null and household.relationship != 18">
                and jh.relationship != #{household.relationship}
                and jh.relationship != 18
            </if>
            <if test="household.phoneNumber!=null and household.phoneNumber !=''">
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java
@@ -47,6 +47,19 @@
                                                                @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                                @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 统计总数
     * @param taskNoFraudReporting
     * @param isAdministrator
     * @param regionChildCodesList
     * @param gridCodeList
     * @return
     */
    Integer selectTaskNoFraudReportingCount(@Param("place") TaskNoFraudReportingVO taskNoFraudReporting,
                                                                @Param("isAdministrator") Integer isAdministrator,
                                                                @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                                @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 查询无炸上报任务表
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml
@@ -14,6 +14,7 @@
        <result property="houseCode" column="house_code"/>
        <result property="createUser" column="create_user"/>
        <result property="imageUrls" column="image_urls"/>
        <result property="type" column="type"/>
        <result property="status" column="status"/>
        <result property="deleteFlag" column="delete_flag"/>
        <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
@@ -100,11 +101,19 @@
                        <if test="place.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jpag.community_code in
                                    and (
                                    jpag.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                    or
                                    jtnfr.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                    )
                                </when>
                                <otherwise>
                                    and jpag.community_code in ('')
@@ -198,18 +207,7 @@
    <select id="selectTaskNoFraudReportingById" parameterType="long" resultMap="TaskNoFraudReportingDTOResult">
        SELECT
        jtnfpr.id,
        jtnfpr.task_id,
        jtnfpr.task_name,
        jtnfpr.place_name,
        jtnfpr.remark,
        jtnfpr.update_time,
        jtnfpr.create_time,
        jtnfpr.house_code,
        jtnfpr.create_user,
        jtnfpr.image_urls,
        jtnfpr.status,
        jtnfpr.delete_flag,
        jtnfpr.*,
        jp.id jpid,
        jp.place_name,
        jp.location,
@@ -373,4 +371,115 @@
    </select>
    <select id="selectTaskNoFraudReportingCount" resultType="java.lang.Integer">
        select count(1) from jczz_task_no_fraud_reporting jtnfr
        LEFT JOIN jczz_place jp ON jtnfr.house_code = jp.house_code and jp.is_deleted = 0
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code and jg.is_deleted = 0
        LEFT JOIN blade_region br ON br.`code` = jg.community_code
        LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id and jpe.is_deleted = 0
        LEFT JOIN blade_user bu ON bu.id = jtnfr.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            <if test="place.id != null ">and jtnfr.id = #{place.id}</if>
            <if test="place.taskId != null ">and jtnfr.task_id = #{place.taskId}</if>
            <if test="place.taskName != null  and place.taskName != ''">and jtnfr.task_name = #{place.taskName}</if>
            <if test="place.placeName != null  and place.placeName != ''">and jtnfr.place_name = #{place.placeName}</if>
            <if test="place.remark != null  and place.remark != ''">and jtnfr.remark = #{place.remark}</if>
            <if test="place.updateTime != null ">and jtnfr.update_time = #{place.updateTime}</if>
            <if test="place.createTime != null ">and jtnfr.create_time = #{place.createTime}</if>
            <if test="place.houseCode != null  and place.houseCode != ''">and jtnfr.house_code = #{place.houseCode}</if>
            <if test="place.createUser != null ">and jtnfr.create_user = #{place.createUser}</if>
            <if test="place.imageUrls != null  and place.imageUrls != ''">and jtnfr.image_urls = #{place.imageUrls}</if>
            <if test="place.status != null ">and jtnfr.status = #{place.status}</if>
            <if test="place.deleteFlag != null ">and jtnfr.delete_flag = #{place.deleteFlag}</if>
            <if test="place.noExplosionCategory != null ">and jp.no_explosion_category = #{place.noExplosionCategory}</if>
            <if test="place.placeName != null  and place.placeName != ''">
                and jp.place_name like concat('%', #{place.placeName},'%')
            </if>
            <if test="place.principal != null  and place.principal != ''">
                and jp.principal like concat('%', #{place.principal},'%')
            </if>
            <if test="place.streetName!=null and place.streetName!=''">
                and br.town_name like concat('%', #{place.streetName},'%')
            </if>
            <if test="place.communityName!=null and place.communityName!=''">
                and br.village_name like concat('%', #{place.communityName},'%')
            </if>
            <if test="place.gridName!=null and place.gridName!=''">
                and jg.grid_name like concat('%', #{place.gridName},'%')
            </if>
            <if test="place.pcsName!=null and place.pcsName!=''">
                and jtnfr.pcs_name like concat('%', #{place.pcsName},'%')
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="place.roleName != null and place.roleName != ''">
                        <if test="place.roleName=='wgy'">
                            <choose>
                                <when test="gridCodeList !=null and gridCodeList.size()>0">
                                    and jp.grid_code in
                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jp.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="place.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and (
                                    jpag.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                    or
                                    jtnfr.community_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                    )
                                </when>
                                <otherwise>
                                    and jpag.community_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and
                                (
                                jg.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                or
                                jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java
@@ -16,14 +16,11 @@
 */
package org.springblade.modules.task.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.task.dto.TaskNoFraudReportingDTO;
import org.springblade.modules.task.dto.TaskPlaceSelfCheckDTO;
import org.springblade.modules.task.entity.TaskNoFraudReportingEntity;
import org.springblade.modules.task.excel.TaskNoExplosionExcel;
import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
@@ -44,6 +41,7 @@
     */
    IPage<TaskNoFraudReportingVO> selectTaskNoFraudReportingPage(IPage<TaskNoFraudReportingVO> page, TaskNoFraudReportingVO taskNoFraudReporting);
    Integer selectTaskNoFraudReportingCount(TaskNoFraudReportingVO taskNoFraudReporting);
    Boolean saveNoFraudReporting(TaskNoFraudReportingVO taskNoFraudReporting);
src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java
@@ -64,6 +64,17 @@
    }
    @Override
    public Integer selectTaskNoFraudReportingCount(TaskNoFraudReportingVO taskNoFraudReporting) {
        CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskNoFraudReportingVO.class, taskNoFraudReporting);
        Integer count = baseMapper.selectTaskNoFraudReportingCount(
            taskNoFraudReporting,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList());
        return count;
    }
    @Override
    public TaskNoFraudReportingVO selectTaskNoFraudReportingById(TaskNoFraudReportingEntity taskNoFraudReporting) {
        return this.baseMapper.selectTaskNoFraudReportingById(taskNoFraudReporting);
    }
src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
@@ -49,6 +49,7 @@
import org.springblade.modules.task.entity.*;
import org.springblade.modules.task.mapper.TaskMapper;
import org.springblade.modules.task.service.*;
import org.springblade.modules.task.vo.TaskNoFraudReportingVO;
import org.springblade.modules.task.vo.TaskSchoolEvenVO;
import org.springblade.modules.task.vo.TaskVO;
import org.springframework.beans.factory.annotation.Autowired;
@@ -277,9 +278,11 @@
        // 居住证申请
        Integer jzzsq = residencePermitApplyService.getCount(neiCode, CommonConstant.NUMBER_ONE);
        // 无诈统计
        taskVO.setReportType(6);
        Integer wztj = baseMapper.selectTaskCount(taskVO, commonParamSet.getRegionChildCodesList(),
            commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList());
        ITaskNoFraudReportingService noFraudReportingService = SpringUtils.getBean(ITaskNoFraudReportingService.class);
        TaskNoFraudReportingVO taskNoFraudReportingVO = new TaskNoFraudReportingVO();
        taskNoFraudReportingVO.setStatus(1);
        Integer wztj = noFraudReportingService.selectTaskNoFraudReportingCount(taskNoFraudReportingVO);
        ITaskSchoolEvenService taskSchoolEvenService = SpringUtils.getBean(ITaskSchoolEvenService.class);
        TaskSchoolEvenVO taskSchoolEvenVO = new TaskSchoolEvenVO();
        taskSchoolEvenVO.setConfirmFlag(CommonConstant.NUMBER_ONE.toString());