智慧保安后台管理-验收版本
Administrator
2021-09-15 1e848dde7598cf481a79385a9caebc9651db63cb
新增查询单个辖区内预警分页信息接口
7 files modified
144 ■■■■■ changed files
src/main/java/org/springblade/modules/information/controller/InformationController.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationsController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 96 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/IInformationService.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/vo/InformationVO.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -1118,6 +1118,7 @@
            }
            map.put("Count", count);
            map.put("jurname", jurname);
            map.put("id", id);
            lists.add(map);
        }
        return R.data(lists);
src/main/java/org/springblade/modules/information/controller/InformationsController.java
@@ -100,4 +100,15 @@
    public R<IPage<InformationVO>> getSecurityUnitExamLess50Page(InformationVO information, Query query){
        return R.data(informationService.getSecurityUnitExamLess50Page(Condition.getPage(query), information));
    }
    /**
     * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常)
     * @param query  分页条件
     * @param information 查询条件
     * @return
     */
    @GetMapping("/getSubstationWarnInfoPage")
    public R<IPage<InformationVO>> getSubstationWarnInfoPage(InformationVO information, Query query){
        return R.data(informationService.getSubstationWarnInfoPage(Condition.getPage(query), information));
    }
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.information.mapper;
import com.baomidou.mybatisplus.annotation.SqlParser;
import liquibase.pro.packaged.S;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
@@ -23,6 +24,8 @@
import org.springblade.modules.information.vo.InformationVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.boot.autoconfigure.quartz.QuartzDataSource;
import java.util.List;
import java.util.Map;
@@ -132,4 +135,13 @@
     * @return
     */
    List<InformationVO> getSecurityUnitExamLess50Page(IPage<InformationVO> page,@Param("information") InformationVO information);
    /**
     * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常)
     * @param page  分页条件
     * @param information 查询条件
     * @return
     */
    @SqlParser(filter = true)
    List<InformationVO> getSubstationWarnInfoPage(IPage<InformationVO> page,@Param("information") InformationVO information);
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1986,4 +1986,100 @@
            and (sj.id = #{information.jurisdiction} or sj.parent_id = #{information.jurisdiction})
        </if>
    </select>
    <sql id="getSubstationWarn">
        left join
            sys_information si
            on
            si.departmentid = bu.dept_id
            left join
            sys_jurisdiction sj
            on
            sj.id = si.jurisdiction
            where
            1=1
            and (si.stats = 2 or si.stats =4)
            and bu.is_deleted = 0
            and bu.`status` = 1
    </sql>
    <!--根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常)-->
    <select id="getSubstationWarnInfoPage" resultType="org.springblade.modules.information.vo.InformationVO">
        select jurisdictionName,enterprisename,detail from (
        (
        select
        si.jurisdiction id,
        sj.parent_id,
        sj.dept_name jurisdictionName,
        si.enterprisename,
        "表现差" detail
        from sys_performance sp
        left join
        blade_user bu
        on
        bu.id = sp.securityId
        left join
        sys_information si
        on
        bu.dept_id = si.departmentid
        left join
        sys_jurisdiction sj
        on
        sj.id = si.jurisdiction
        where
        1=1
        and (si.stats = 2 or si.stats =4)
        and bu.is_deleted = 0
        and bu.`status` = 1
        and sp.score = 3
        )
        union
        (
        select
        sj.id,
        sj.parent_id,
        sj.dept_name jurisdictionName,
        si.enterprisename,
        if(bu.hold=2,"未持证","证件吊销") as detail
        from
        blade_user bu
        <include refid="getSubstationWarn"/>
        and (bu.hold = 2 or bu.hold = 3)
        )
        union
        (
        select
        sj.id,
        sj.parent_id,
        sj.dept_name jurisdictionName,
        si.enterprisename,
        "未缴纳社保" as detail
        from
        blade_user bu
        <include refid="getSubstationWarn"/>
        and bu.soil = 1
        )
        union
        (
        select
        sj.id,
        sj.parent_id,
        sj.dept_name jurisdictionName,
        si.enterprisename,
        "审查异常" as detail
        from
        blade_user bu
        <include refid="getSubstationWarn"/>
        and bu.examination_type = 1
        )
        ) a
        where 1=1
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
            and (a.id = #{information.jurisdiction} or a.parent_id = #{information.jurisdiction})
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/information/service/IInformationService.java
@@ -146,4 +146,12 @@
     * @return
     */
    IPage<InformationVO> getSecurityUnitExamLess50Page(IPage<InformationVO> page, InformationVO information);
    /**
     * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常)
     * @param page  分页条件
     * @param information 查询条件
     * @return
     */
    IPage<InformationVO> getSubstationWarnInfoPage(IPage<InformationVO> page, InformationVO information);
}
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -360,4 +360,15 @@
    public IPage<InformationVO> getSecurityUnitExamLess50Page(IPage<InformationVO> page, InformationVO information) {
        return page.setRecords(baseMapper.getSecurityUnitExamLess50Page(page, information));
    }
    /**
     * 根据辖区查询统计当前辖区下的保安公司(本市保安公司,分公司)预警信息,包含(未持证,现实表现差,未缴纳社保,资格审查异常)
     * @param page  分页条件
     * @param information 查询条件
     * @return
     */
    @Override
    public IPage<InformationVO> getSubstationWarnInfoPage(IPage<InformationVO> page, InformationVO information) {
        return page.setRecords(baseMapper.getSubstationWarnInfoPage(page, information));
    }
}
src/main/java/org/springblade/modules/information/vo/InformationVO.java
@@ -41,4 +41,9 @@
     * 辖区名称
     */
    private String jurisdictionName;
    /**
     * 明细
     */
    private String detail;
}