提交代码
parent
26bd6af26d
commit
60f8ab935f
|
@ -89,7 +89,7 @@ PublicsController extends BaseController {
|
|||
dept.setComFlag(PublicStateEnum.COMZGS.getCode());
|
||||
List<SysDept> list = deptService.selectAllDeptList(dept);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
return success();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.yanzhu.jh.work.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -46,6 +47,17 @@ public class WorkFileUserController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计文件访问用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:workFile:list')")
|
||||
@GetMapping("/queryCount")
|
||||
public AjaxResult queryCount(WorkFileUser workFileUser)
|
||||
{
|
||||
List<Map<String,Object>> list = workFileUserService.queryCountByDeptType(workFileUser);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文件访问用户列表
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.jh.work.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.jh.work.domain.WorkFileUser;
|
||||
import com.yanzhu.jh.work.domain.WorkFileUserLog;
|
||||
|
||||
|
@ -28,6 +30,14 @@ public interface WorkFileUserMapper
|
|||
*/
|
||||
public List<WorkFileUser> selectWorkFileUserList(WorkFileUser workFileUser);
|
||||
|
||||
/**
|
||||
* 统计文件访问用户列表
|
||||
*
|
||||
* @param workFileUser 文件访问用户
|
||||
* @return 文件访问用户集合
|
||||
*/
|
||||
public List<Map<String,Object>> queryCountByDeptType(WorkFileUser workFileUser);
|
||||
|
||||
/**
|
||||
* 新增文件访问用户
|
||||
*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.jh.work.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.jh.work.domain.WorkFileUser;
|
||||
|
||||
/**
|
||||
|
@ -27,6 +29,14 @@ public interface IWorkFileUserService
|
|||
*/
|
||||
public List<WorkFileUser> selectWorkFileUserList(WorkFileUser workFileUser);
|
||||
|
||||
/**
|
||||
* 统计文件访问用户列表
|
||||
*
|
||||
* @param workFileUser 文件访问用户
|
||||
* @return 文件访问用户集合
|
||||
*/
|
||||
public List<Map<String,Object>> queryCountByDeptType(WorkFileUser workFileUser);
|
||||
|
||||
/**
|
||||
* 新增文件访问用户
|
||||
*
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.ruoyi.common.utils.DateUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.yanzhu.jh.work.domain.WorkFileUserLog;
|
||||
|
@ -48,6 +50,16 @@ public class WorkFileUserServiceImpl implements IWorkFileUserService
|
|||
return workFileUserMapper.selectWorkFileUserList(workFileUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计文件访问用户列表
|
||||
*
|
||||
* @param workFileUser 文件访问用户
|
||||
* @return 文件访问用户集合
|
||||
*/
|
||||
public List<Map<String,Object>> queryCountByDeptType(WorkFileUser workFileUser) {
|
||||
return workFileUserMapper.queryCountByDeptType(workFileUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件访问用户
|
||||
*
|
||||
|
|
|
@ -55,6 +55,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by wfu.create_by desc
|
||||
</select>
|
||||
|
||||
<select id="queryCountByDeptType" parameterType="WorkFileUser" resultType="map">
|
||||
select sd.type_flag as deptType, sdd.dict_label as deptTypeName, count(1) as total from work_file_user wfu
|
||||
left join sys_user su on su.user_id = wfu.user_id
|
||||
left join sys_dept sd on sd.dept_id = wfu.dept_id
|
||||
left join sys_dict_data sdd on sdd.dict_type='sys_dept_type' and sdd.dict_value=sd.type_flag
|
||||
<where>
|
||||
wfu.is_del=0
|
||||
<if test="fileId != null "> and wfu.file_id = #{fileId}</if>
|
||||
</where>
|
||||
group by sd.type_flag
|
||||
</select>
|
||||
|
||||
<select id="selectWorkFileUserById" parameterType="Long" resultMap="WorkFileUserWorkFileUserLogResult">
|
||||
select a.id, a.file_id, a.project_id, a.dept_id, a.user_id, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||
|
|
Loading…
Reference in New Issue