zhongrj
2024-03-21 55561a93e2e0aa94659d15023bacf4023e8c6d7b
任务列表过滤修复,二手交易详情查询修改
6 files modified
246 ■■■■■ changed files
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java 16 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml 184 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
@@ -63,9 +63,9 @@
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
    public R<TaskLabelReportingEventVO> detail(TaskLabelReportingEventEntity taskLabelReportingEvent) {
    public R detail(TaskLabelReportingEventEntity taskLabelReportingEvent) {
        TaskLabelReportingEventEntity detail = taskLabelReportingEventService.getOne(Condition.getQueryWrapper(taskLabelReportingEvent));
        return R.data(TaskLabelReportingEventWrapper.build(). entityVO(detail));
        return R.data(detail);
    }
    /**
     * 打金店报事 分页
@@ -141,4 +141,16 @@
        ExcelUtil.export(response, "交易登记" + DateUtil.time(), "交易登记表", list, TaskLabelReportingEventExcel.class);
    }
    /**
     * 二手交易报事 详情
     */
    @GetMapping("/getDetail")
    @ApiOperationSupport(order = 9)
    @ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent")
    public R getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
        TaskLabelReportingEventVO detail = taskLabelReportingEventService.getDetail(taskLabelReportingEvent);
        return R.data(detail);
    }
}
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
@@ -76,4 +76,11 @@
                                                                         @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                                         @Param("isAdministrator") Integer isAdministrator,
                                                                         @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 二手交易报事 自定义详情
     * @param taskLabelReportingEvent
     * @return
     */
    TaskLabelReportingEventVO getDetail(@Param("taskLabelReportingEvent") TaskLabelReportingEventVO taskLabelReportingEvent);
}
src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
@@ -370,5 +370,27 @@
        order by jtlre.create_time desc,jtlre.id desc
    </select>
    <!--二手交易自定义分页查询-->
    <select id="getDetail" resultType="org.springblade.modules.task.vo.TaskLabelReportingEventVO">
        select
        jtlre.*,
        jp.place_name,
        jp.principal,
        jp.principal_phone,
        jp.nine_type ,
        jp.front_type ,
        jp.location
        from
        jczz_task_label_reporting_event jtlre
        LEFT JOIN jczz_place jp ON jtlre.place_id=jp.id and jp.is_deleted = 0
        where jtlre.is_deleted = 0
        <if test="taskLabelReportingEvent.id != null">
            AND jtlre.id = #{taskLabelReportingEvent.id}
        </if>
        <if test="taskLabelReportingEvent.taskId != null">
            AND jtlre.task_id = #{taskLabelReportingEvent.taskId}
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
@@ -53,59 +53,59 @@
        LEFT JOIN blade_region br on br.code = jg.community_code
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            <if test="task.roleName != null and task.roleName != ''">
                <if test="task.roleName=='wgy'">
                    <if test="isAdministrator==2">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jp.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jp.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </if>
                <if test="task.roleName=='mj'">
                    <if test="isAdministrator==2">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </if>
            </if>
            <if test="isAdministrator==2">
                <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
                        br.village_code in
                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                            #{code}
                        </foreach>
                        )
                    <when test="task.roleName != null and task.roleName != ''">
                        <if test="task.roleName=='wgy'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jh.grid_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jh.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="task.roleName=='mj' and isAdministrator==2">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and br.village_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and br.village_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        and
                        (
                        jg.grid_code in ('') or br.village_code in ('')
                        )
                        <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
                                br.village_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
                                and
                                (
                                jg.grid_code in ('') or br.village_code in ('')
                                )
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
@@ -194,57 +194,59 @@
        LEFT JOIN blade_region br on br.code = jg.community_code
        LEFT JOIN jczz_task_bail_reporting_event jtbre on jtbre.task_id = jt.id
        <where>
            <if test="task.roleName != null and task.roleName != ''">
                <if test="task.roleName=='wgy'">
                    <if test="isAdministrator==2">
            <if test="isAdministrator==2">
                <choose>
                    <when test="task.roleName != null and task.roleName != ''">
                        <if test="task.roleName=='wgy'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jh.grid_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jh.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="task.roleName=='mj' and isAdministrator==2">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and br.village_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and br.village_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jh.grid_code in
                                and
                                (
                                jg.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                or
                                br.village_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
                                and jh.grid_code in ('')
                                and
                                (
                                jg.grid_code in ('') or br.village_code in ('')
                                )
                            </otherwise>
                        </choose>
                    </if>
                </if>
                <if test="task.roleName=='mj' and isAdministrator==2">
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and br.village_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                        </when>
                        <otherwise>
                            and br.village_code in ('')
                        </otherwise>
                    </choose>
                </if>
            </if>
            <if test="isAdministrator==2">
                <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
                        br.village_code in
                        <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                            #{code}
                        </foreach>
                        )
                    </when>
                    <otherwise>
                        and
                        (
                        jg.grid_code in ('') or br.village_code in ('')
                        )
                    </otherwise>
                </choose>
            </if>
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
@@ -76,4 +76,11 @@
     * @return
     */
    boolean removeTaskByIds(List<Long> toLongList);
    /**
     * 二手交易报事 自定义详情
     * @param taskLabelReportingEvent
     * @return
     */
    TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent);
}
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -172,4 +172,14 @@
        // 返回
        return flag;
    }
    /**
     * 二手交易报事 自定义详情
     * @param taskLabelReportingEvent
     * @return
     */
    @Override
    public TaskLabelReportingEventVO getDetail(TaskLabelReportingEventVO taskLabelReportingEvent) {
        return baseMapper.getDetail(taskLabelReportingEvent);
    }
}