tangzy
2021-12-04 0393a3b2b4d968b0423f0b81b0f7f8e6db75a016
1.首页现实表现
10 files modified
53 ■■■■■ changed files
src/main/java/org/springblade/modules/information/controller/InformationController.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/IInformationService.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IUserService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/vo/UserVO.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -1362,4 +1362,10 @@
        }
        return R.data(lists);
    }
    @PostMapping("/selectBxc")
    public R<IPage> selectBxc(String jurisdiction,String type,Query query) {
        IPage maps = informationService.selectBxc(Condition.getPage(query), jurisdiction,type);
        return R.data(maps);
    }
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java
@@ -225,4 +225,5 @@
     * @return
     */
    Integer selectInformationUnitExpireNumCount(@Param("dept")Dept dept);
    List<Map<Object,Object>> selectBxc(IPage page, String jurisdiction,String type);
}
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -3314,4 +3314,30 @@
                ischild != 0
            )
    </select>
    <select id="selectBxc" resultType="java.util.HashMap">
        SELECT u.real_name as realName,
        d.dept_name as deptName,
        u.sex,
        u.cardid,
        ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING(u.cardid, 7, 4), 0) AS age,
        u.securitynumber,
        u.phone,
        p.score
        FROM sys_performance p
        LEFT JOIN blade_user u ON p.securityId = u.id
        LEFT JOIN blade_dept d ON d.id = p.departmentid
        LEFT JOIN sys_jurisdiction j ON j.id = p.jurisdiction
        WHERE 1 =1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and (j.id = #{jurisdiction} or j.parent_id = #{jurisdiction})
        </if>
        <if test="type!=null and type=='1'.toString()">
            and to_days(p.time) = to_days(now())
        </if>
        <if test="type!=null and type=='2'.toString()">
            and DATE_FORMAT(p.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
        </if>
        and p.score = 3
    </select>
</mapper>
src/main/java/org/springblade/modules/information/service/IInformationService.java
@@ -204,4 +204,5 @@
     */
    List<ResponseVo> getSecurityHoldAndSoidAndDispatchGroupCountList(Integer type);
    List<Map<Object,Object>> seleFj(String jurisdiction);
    IPage selectBxc(IPage<List> page,String jurisdiction,String type);
}
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -475,4 +475,8 @@
    public List<Map<Object, Object>> seleFj(String jurisdiction) {
        return baseMapper.seleFj(jurisdiction);
    }
    @Override
    public IPage selectBxc(IPage page,String jurisdiction,String type) {
        return page.setRecords(baseMapper.selectBxc(page,jurisdiction,type));
    }
}
src/main/java/org/springblade/modules/system/mapper/UserMapper.java
@@ -47,7 +47,7 @@
     * @param tenantId
     * @return
     */
    List<User> selectUserPage(IPage<User> page, @Param("user") User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
    List<UserVO> selectUserPage(IPage<UserVO> page, @Param("user") UserVO user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
    /**
     * 获取用户
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.springblade.modules.system.mapper.UserMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="userResultMap" type="org.springblade.modules.system.entity.User">
    <resultMap id="userResultMap" type="org.springblade.modules.system.vo.UserVO">
        <result column="id" property="id"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="create_user" property="createUser"/>
@@ -182,6 +182,12 @@
        <if test="user.hold!=null and user.hold != ''">
            and bu.hold = #{user.hold}
        </if>
        <if test="user.types!=null and user.types=='1'.toString()">
            and to_days(bu.audit_time) = to_days(now())
        </if>
        <if test="user.types!=null and user.types=='2'.toString()">
            and DATE_FORMAT(bu.audit_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
        </if>
        <if test="user.jurisdiction!=null and user.jurisdiction!='' and user.jurisdiction!='1372091709474910209'">
            and (j.id = #{user.jurisdiction} or j.parent_id = #{user.jurisdiction})
        </if>
src/main/java/org/springblade/modules/system/service/IUserService.java
@@ -72,7 +72,7 @@
     * @param tenantId
     * @return
     */
    IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId);
    IPage<UserVO> selectUserPage(IPage<UserVO> page, UserVO user, Long deptId, String tenantId);
    /**
     * 自定义分页
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -138,7 +138,7 @@
    }
    @Override
    public IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId) {
    public IPage<UserVO> selectUserPage(IPage<UserVO> page, UserVO user, Long deptId, String tenantId) {
        List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
        return page.setRecords(baseMapper.selectUserPage(page, user, deptIdList, tenantId));
    }
src/main/java/org/springblade/modules/system/vo/UserVO.java
@@ -108,4 +108,5 @@
    private Integer type;
    private String types;
}